sp_expire is 0 in QNX Neutrino

Darren Tucker dtucker at zip.com.au
Fri Sep 21 13:13:49 EST 2007


On Wed, Sep 19, 2007 at 06:55:23AM -0600, David Bacon wrote:
> Tim Rice wrote, circa 2007-09-18 22:20 MDT:
[...]
> > What happens if you undef HAS_SHADOW_EXPIRE in config.h?
> 
> I would expect that to work, but be harder to
> maintain.  (Odd that this macro isn't called
> HAVE_SHADOW_EXPIRE, by the way, isn't it.)
> 
> Presumably a proper solution is to have
> configure.ac recognize the existence of
> broken shadow password expiry support, and
> define a symbol reflecting that.

Right.

> Or at
> least to have it beef up the check that
> allows HAS_SHADOW_EXPIRE to be defined.

That's probably hard as reading the shadow file requires privilege and
configure can (and usually does) run without privilege.

Could you please confirm that the following patch works?  Again, you will
need to run "autoreconf" to rebuild configure and then rerun configure.
Thanks.

Index: configure.ac
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh/configure.ac,v
retrieving revision 1.384
diff -u -p -r1.384 configure.ac
--- configure.ac	10 Sep 2007 23:24:18 -0000	1.384
+++ configure.ac	21 Sep 2007 03:11:35 -0000
@@ -785,6 +785,7 @@ mips-sony-bsd|mips-sony-newsos4)
 	AC_DEFINE(MISSING_FD_MASK, 1, [Define on *nto-qnx systems])
 	AC_DEFINE(DISABLE_LASTLOG)
 	AC_DEFINE(SSHD_ACQUIRES_CTTY)
+	AC_DEFINE(BROKEN_SHADOW_EXPIRE, 1, [QNX shadow support is broken])
 	enable_etc_default_login=no	# has incompatible /etc/default/login
 	case "$host" in
 	*-*-nto-qnx6*)
Index: defines.h
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh/defines.h,v
retrieving revision 1.144
diff -u -p -r1.144 defines.h
--- defines.h	17 Sep 2007 15:32:33 -0000	1.144
+++ defines.h	21 Sep 2007 03:07:29 -0000
@@ -540,6 +540,10 @@ struct winsize {
 # undef HAVE_UPDWTMPX
 #endif
 
+#if defined(BROKEN_SHADOW_EXPIRE) && defined(HAS_SHADOW_EXPIRE)
+# undef HAS_SHADOW_EXPIRE
+#endif
+
 #if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) && \
     defined(SYSLOG_R_SAFE_IN_SIGHAND)
 # define DO_LOG_SAFE_IN_SIGHAND

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


More information about the openssh-unix-dev mailing list