Changeset 510 in openpam
- Timestamp:
- Dec 31, 2011, 1:14:23 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/pam_get_authtok.c
r455 r510 51 51 52 52 static const char authtok_prompt[] = "Password:"; 53 static const char authtok_prompt_remote[] = "Password for %u@%h:"; 53 54 static const char oldauthtok_prompt[] = "Old Password:"; 54 55 static const char newauthtok_prompt[] = "New Password:"; … … 70 71 const void *oldauthtok, *prevauthtok, *promptp; 71 72 const char *prompt_option, *default_prompt; 73 const void *lhost, *rhost; 72 74 char *resp, *resp2; 73 75 int pitem, r, style, twice; … … 83 85 prompt_option = "authtok_prompt"; 84 86 default_prompt = authtok_prompt; 87 r = pam_get_item(pamh, PAM_RHOST, &rhost); 88 if (r == PAM_SUCCESS && rhost != NULL) { 89 r = pam_get_item(pamh, PAM_HOST, &lhost); 90 if (r == PAM_SUCCESS && lhost != NULL) { 91 if (strcmp(rhost, lhost) != 0) 92 default_prompt = authtok_prompt_remote; 93 } 94 } 85 95 r = pam_get_item(pamh, PAM_OLDAUTHTOK, &oldauthtok); 86 96 if (r == PAM_SUCCESS && oldauthtok != NULL) {
Note: See TracChangeset
for help on using the changeset viewer.