From 33370e0287649c135eef8e7a0e22aee754deeac5 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 9 Feb 2005 22:17:28 +1100 Subject: - (dtucker) [configure.ac session.c] Some platforms (eg some SCO) require the username to be passed to the passwd command when changing expired passwords. ok djm@ --- ChangeLog | 5 ++++- configure.ac | 3 ++- session.c | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a1e2c6836..3b943f3c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,9 @@ to resolve it for binaries other than sshd. ok djm@ - (dtucker) [configure.ac] Bug #854: prepend pwd to relative --with-ssl-dir paths. ok djm@ + - (dtucker) [configure.ac session.c] Some platforms (eg some SCO) require + the username to be passed to the passwd command when changing expired + passwords. ok djm@ 20050208 - (dtucker) [regress/test-exec.sh] Bug #912: Set _POSIX2_VERSION for the @@ -2112,4 +2115,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3646 2005/02/09 11:12:30 dtucker Exp $ +$Id: ChangeLog,v 1.3647 2005/02/09 11:17:28 dtucker Exp $ diff --git a/configure.ac b/configure.ac index 3ccbbaf0c..e79e89ac2 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.238 2005/02/09 11:12:31 dtucker Exp $ +# $Id: configure.ac,v 1.239 2005/02/09 11:17:28 dtucker Exp $ # # Copyright (c) 1999-2004 Damien Miller # @@ -403,6 +403,7 @@ mips-sony-bsd|mips-sony-newsos4) AC_DEFINE(BROKEN_SETREGID) AC_DEFINE(WITH_ABBREV_NO_TTY) AC_DEFINE(BROKEN_UPDWTMPX) + AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd]) AC_CHECK_FUNCS(getluid setluid) MANTYPE=man TEST_SHELL=ksh diff --git a/session.c b/session.c index a50bfcff7..1896e141f 100644 --- a/session.c +++ b/session.c @@ -1346,7 +1346,12 @@ do_pwchange(Session *s) if (s->ttyfd != -1) { fprintf(stderr, "You must change your password now and login again!\n"); +#ifdef PASSWD_NEEDS_USERNAME + execl(_PATH_PASSWD_PROG, "passwd", s->pw->pw_name, + (char *)NULL); +#else execl(_PATH_PASSWD_PROG, "passwd", (char *)NULL); +#endif perror("passwd"); } else { fprintf(stderr, -- cgit v1.2.3