Fix checking password from /etc/passwd and /etc/shadow

Michael Steffens michael.steffens at hp.com
Thu Sep 25 01:12:27 EST 2003


Krzysztof Oledzki wrote:
> Hello,
> 
> This patch fix order of checking password in systems that contains
> /etc/shadow file (Linux for example). The order is exactly like in
> linux-shadow-password package. First is checked /etc/passwd but if
> password field contains "x" then password is read from /etc/shadow
> instead.

What is wrong with the current approach of first checking /etc/shadow
using getspnam, falling back to /etc/passwd if the first didn't return
anything?

Reversing that order and making the decision depend on a non-zero
value returned from /etc/passwd ("x", "*", whatever?) looks like
making it more complicated to me.

Cheers!
Michael




More information about the openssh-unix-dev mailing list