do_pwchange() is broken on SCO UnixWare 7
Darren Tucker
dtucker at zip.com.au
Sat Dec 4 10:19:04 EST 2004
Mike Thompson wrote:
> The do_pwchange() function in session.c needs to pass the username as an
> argument to the passwd command. Without it, passwd always fails with
> something like "passwd: unknown user" as if its getting a blank user
> arg. It's strange but so are many other things in SCO, which BTW was NOT
> my OS of choice :(
>
> To make it work I simply changed line 1317 to this:
> execl(_PATH_PASSWD_PROG, "passwd", s->pw->pw_name, (char*)NULL);
FWIW my old password expiry patches did this:
permanently_set_uid(pw);
if (geteuid() == 0)
execl(PASSWD_PROGRAM_PATH, "passwd", pw->pw_name,
(char *)NULL);
else
execl(PASSWD_PROGRAM_PATH, "passwd", (char *)NULL);
so it only provided the user name when running as root.
From memory, various platforms didn't like having the username supplied
to passwd when run as a non-root user so it would need to be optional
and enabled in configure only on the platforms that need it.
--
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