Lines Matching refs:shpwd
89 struct spwd *shpwd) in check_for_login_inactivity() argument
115 if ((shpwd->sp_inact > 0) && (retval == sizeof (ll)) && in check_for_login_inactivity()
124 if (((time_t)((ll.ll_time / DAY) + shpwd->sp_inact) in check_for_login_inactivity()
126 (shpwd->sp_lstchg != 0) && in check_for_login_inactivity()
127 (shpwd->sp_lstchg != -1) && in check_for_login_inactivity()
128 ((shpwd->sp_lstchg + shpwd->sp_inact) < DAY_NOW)) { in check_for_login_inactivity()
149 new_password_check(shpwd, flags) in new_password_check() argument
150 struct spwd *shpwd; in new_password_check()
163 if (shpwd->sp_pwdp[0] == '\0') {
164 if (((shpwd->sp_max == -1) ||
165 ((time_t)shpwd->sp_lstchg > now) ||
166 ((now >= (time_t)(shpwd->sp_lstchg +
167 shpwd->sp_min)) &&
168 (shpwd->sp_max >= shpwd->sp_min)))) {
183 struct spwd *shpwd, in perform_passwd_aging_check() argument
203 if (shpwd->sp_lstchg == 0) in perform_passwd_aging_check()
207 if (shpwd->sp_max < 0 || shpwd->sp_max < shpwd->sp_min) in perform_passwd_aging_check()
211 if (now < (time_t)(shpwd->sp_lstchg + shpwd->sp_max)) in perform_passwd_aging_check()
219 if (idledays > 0 && (now < (time_t)(shpwd->sp_lstchg + idledays))) in perform_passwd_aging_check()
244 struct spwd shpwd) in warn_user_passwd_will_expire() argument
251 if ((shpwd.sp_warn > 0) && (shpwd.sp_max > 0) && in warn_user_passwd_will_expire()
252 (now + shpwd.sp_warn) >= (time_t)(shpwd.sp_lstchg + shpwd.sp_max)) { in warn_user_passwd_will_expire()
253 days = (time_t)(shpwd.sp_lstchg + shpwd.sp_max) - now; in warn_user_passwd_will_expire()
297 struct spwd shpwd = {NULL, NULL, in pam_sm_acct_mgmt() local
326 shpwd.sp_namp = user; in pam_sm_acct_mgmt()
367 shpwd.sp_pwdp = attr_pw[2].data.val_s; in pam_sm_acct_mgmt()
394 shpwd.sp_lstchg = attr_spw[0].data.val_i; in pam_sm_acct_mgmt()
395 shpwd.sp_min = attr_spw[1].data.val_i; in pam_sm_acct_mgmt()
396 shpwd.sp_max = attr_spw[2].data.val_i; in pam_sm_acct_mgmt()
397 shpwd.sp_warn = attr_spw[3].data.val_i; in pam_sm_acct_mgmt()
398 shpwd.sp_inact = attr_spw[4].data.val_i; in pam_sm_acct_mgmt()
399 shpwd.sp_expire = attr_spw[5].data.val_i; in pam_sm_acct_mgmt()
400 shpwd.sp_flag = attr_spw[6].data.val_i; in pam_sm_acct_mgmt()
406 if (shpwd.sp_pwdp == NULL) in pam_sm_acct_mgmt()
408 else if (strncmp(shpwd.sp_pwdp, LOCKSTRING, in pam_sm_acct_mgmt()
411 else if (strcmp(shpwd.sp_pwdp, NOPWDRTR) == 0) in pam_sm_acct_mgmt()
424 user, pw, shpwd.sp_lstchg, shpwd.sp_min, shpwd.sp_max, in pam_sm_acct_mgmt()
425 shpwd.sp_warn, shpwd.sp_inact, shpwd.sp_expire); in pam_sm_acct_mgmt()
447 if (shpwd.sp_pwdp != NULL && in pam_sm_acct_mgmt()
448 strncmp(shpwd.sp_pwdp, LOCKSTRING, sizeof (LOCKSTRING) - 1) == 0) { in pam_sm_acct_mgmt()
466 if (shpwd.sp_pwdp[0] == '\0' && in pam_sm_acct_mgmt()
485 if (shpwd.sp_expire > 0 && in pam_sm_acct_mgmt()
486 (time_t)shpwd.sp_expire < DAY_NOW) { in pam_sm_acct_mgmt()
494 if (check_for_login_inactivity(pw_uid, &shpwd)) { in pam_sm_acct_mgmt()
502 if (error = new_password_check(&shpwd, flags)) { in pam_sm_acct_mgmt()
509 if ((error = perform_passwd_aging_check(pamh, &shpwd, flags)) in pam_sm_acct_mgmt()
518 warn_user_passwd_will_expire(pamh, shpwd); in pam_sm_acct_mgmt()
543 if (shpwd.sp_pwdp) { in pam_sm_acct_mgmt()
544 (void) memset(shpwd.sp_pwdp, 0, strlen(shpwd.sp_pwdp)); in pam_sm_acct_mgmt()
545 free(shpwd.sp_pwdp); in pam_sm_acct_mgmt()