Set PAM_RHOST to work around a bug in Solaris 7 and lower that

results in a segv.
This commit is contained in:
Todd C. Miller
2007-09-13 22:42:15 +00:00
parent 57ee080a08
commit bb07eea18f

View File

@@ -190,9 +190,11 @@ pam_prep_user(pw)
/* /*
* Set PAM_USER to the user we are changing *to* and * Set PAM_USER to the user we are changing *to* and
* set PAM_RUSER to the user we are coming *from*. * set PAM_RUSER to the user we are coming *from*.
* We set PAM_RHOST to avoid a bug in Solaris 7 and below.
*/ */
(void) pam_set_item(pamh, PAM_USER, pw->pw_name); (void) pam_set_item(pamh, PAM_USER, pw->pw_name);
(void) pam_set_item(pamh, PAM_RUSER, user_name); (void) pam_set_item(pamh, PAM_RUSER, user_name);
(void) pam_set_item(pamh, PAM_RHOST, user_host);
/* /*
* Set credentials (may include resource limits, device ownership, etc). * Set credentials (may include resource limits, device ownership, etc).