Lines Matching refs:pwd

91 	struct passwd *pwd;  in pam_sm_authenticate()  local
103 pwd = getpwnam(user); in pam_sm_authenticate()
107 if (pwd != NULL) { in pam_sm_authenticate()
109 realpw = pwd->pw_passwd; in pam_sm_authenticate()
126 lc = login_getpwclass(pwd); in pam_sm_authenticate()
165 struct passwd *pwd; in pam_sm_acct_mgmt() local
178 if (user == NULL || (pwd = getpwnam(user)) == NULL) in pam_sm_acct_mgmt()
191 if (*pwd->pw_passwd == '\0' && in pam_sm_acct_mgmt()
195 if (strncmp(pwd->pw_passwd, LOCKED_PREFIX, LOCKED_PREFIX_LEN) == 0) in pam_sm_acct_mgmt()
198 lc = login_getpwclass(pwd); in pam_sm_acct_mgmt()
206 if (pwd->pw_change || pwd->pw_expire) in pam_sm_acct_mgmt()
214 if (pwd->pw_expire) { in pam_sm_acct_mgmt()
217 if (tp.tv_sec >= pwd->pw_expire) { in pam_sm_acct_mgmt()
220 } else if (pwd->pw_expire - tp.tv_sec < warntime && in pam_sm_acct_mgmt()
223 ctime(&pwd->pw_expire)); in pam_sm_acct_mgmt()
228 if (pwd->pw_change) { in pam_sm_acct_mgmt()
231 if (tp.tv_sec >= pwd->pw_change) { in pam_sm_acct_mgmt()
233 } else if (pwd->pw_change - tp.tv_sec < warntime && in pam_sm_acct_mgmt()
236 ctime(&pwd->pw_change)); in pam_sm_acct_mgmt()
288 struct passwd *pwd, *old_pwd; in pam_sm_chauthtok() local
301 pwd = getpwnam(user); in pam_sm_chauthtok()
303 if (pwd == NULL) in pam_sm_chauthtok()
313 (pwd->pw_fields & _PWF_SOURCE) == _PWF_FILES) in pam_sm_chauthtok()
318 (pwd->pw_fields & _PWF_SOURCE) == _PWF_NIS) { in pam_sm_chauthtok()
341 if (pwd->pw_passwd[0] == '\0' in pam_sm_chauthtok()
358 encrypted = crypt(old_pass, pwd->pw_passwd); in pam_sm_chauthtok()
362 if (strcmp(encrypted, pwd->pw_passwd) != 0) in pam_sm_chauthtok()
392 if ((old_pwd = pw_dup(pwd)) == NULL) in pam_sm_chauthtok()
395 lc = login_getclass(pwd->pw_class); in pam_sm_chauthtok()
401 pwd->pw_change = 0; in pam_sm_chauthtok()
404 pwd->pw_change = time(NULL) + passwordtime; in pam_sm_chauthtok()
408 pwd->pw_passwd = crypt(new_pass, salt); in pam_sm_chauthtok()
420 else if (pw_copy(pfd, tfd, pwd, old_pwd) == -1) in pam_sm_chauthtok()
422 else if (pw_mkdb(pwd->pw_name) == -1) in pam_sm_chauthtok()
438 ypclnt_passwd(ypclnt, pwd, old_pass) == -1) { in pam_sm_chauthtok()
448 pwd->pw_fields & _PWF_SOURCE); in pam_sm_chauthtok()