Use a better method to get user credentials to account for (legal)
duplications of UID's in /etc/*passwd.
This commit is contained in:
parent
1dec611e10
commit
921b216c2d
@ -69,7 +69,7 @@ level.
|
||||
This option will require the user
|
||||
to authenticate themself as the user
|
||||
given by
|
||||
.Xr getuid 2 ,
|
||||
.Xr getlogin 2 ,
|
||||
not as the account they are attempting to access.
|
||||
This is primarily for services like
|
||||
.Xr su 1 ,
|
||||
@ -84,6 +84,7 @@ default OPIE password database.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr passwd 1 ,
|
||||
.Xr getlogin 2 ,
|
||||
.Xr opiechallenge 3 ,
|
||||
.Xr syslog 3 ,
|
||||
.Xr opie 4 ,
|
||||
|
@ -74,7 +74,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv)
|
||||
|
||||
user = NULL;
|
||||
if (pam_test_option(&options, PAM_OPT_AUTH_AS_SELF, NULL)) {
|
||||
pwd = getpwuid(getuid());
|
||||
pwd = getpwnam(getlogin());
|
||||
user = pwd->pw_name;
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user