Lines Matching refs:pwd
139 static void update_audit(struct passwd *pwd);
143 struct passwd pwd; variable
287 if (getpwuid_r(getuid(), &pwd, pwdbuf, sizeof (pwdbuf)) == NULL || in main()
288 pam_set_item(pamh, PAM_AUSER, pwd.pw_name) != PAM_SUCCESS) in main()
322 if (getpwnam_r(nptr, &pwd, pwdbuf, sizeof (pwdbuf)) == NULL) in main()
349 pwd.pw_name, username, ttyn); in main()
359 pwd.pw_name, username, ttyn); in main()
377 syslog(pwd.pw_uid == 0 ? LOG_NOTICE : LOG_INFO, in main()
379 pwd.pw_name, username, ttyn); in main()
384 if ((getpwnam_r(nptr, &pwd, pwdbuf, sizeof (pwdbuf)) == NULL) || in main()
409 pwd.pw_name, username, ttyn); in main()
417 update_audit(&pwd); in main()
419 syslog(pwd.pw_uid == 0 ? LOG_NOTICE : LOG_INFO, in main()
421 pwd.pw_name, username, ttyn); in main()
424 audit_success(pw_change, &pwd); in main()
425 uid = pwd.pw_uid; in main()
426 gid = pwd.pw_gid; in main()
427 dir = strdup(pwd.pw_dir); in main()
428 shprog = strdup(pwd.pw_shell); in main()
429 name = strdup(pwd.pw_name); in main()
786 audit_success(int pw_change, struct passwd *pwd) in audit_success() argument
799 if (((user_entry = getusernam(pwd->pw_name)) != NULL) && in audit_success()
809 if (adt_set_user(ah, pwd->pw_uid, pwd->pw_gid, pwd->pw_uid, in audit_success()
810 pwd->pw_gid, NULL, ADT_USER) != 0) { in audit_success()
1007 audit_failure(int pw_change, struct passwd *pwd, char *user, int pamerr) in audit_failure() argument
1021 if (pwd != NULL) { in audit_failure()
1023 if (adt_set_user(ah, pwd->pw_uid, pwd->pw_gid, pwd->pw_uid, in audit_failure()
1024 pwd->pw_gid, NULL, ADT_UPDATE) != 0) { in audit_failure()
1028 if (((user_entry = getusernam(pwd->pw_name)) != NULL) && in audit_failure()
1047 if (pwd == NULL) { in audit_failure()
1330 log(Sulog, pwd.pw_name, 0); /* log entry */ in validate()
1334 "'%s' has expired"), pwd.pw_name); in validate()
1343 audit_failure(PW_FAILED, &pwd, NULL, error); in validate()
1347 pwd.pw_name, usernam, ttyn); in validate()
1355 audit_failure(PW_FALSE, &pwd, NULL, error); in validate()
1358 pwd.pw_name, usernam, ttyn); in validate()
1433 update_audit(struct passwd *pwd) in update_audit() argument
1442 pwd->pw_name, username); in update_audit()
1446 if (adt_set_user(ah, pwd->pw_uid, pwd->pw_gid, pwd->pw_uid, in update_audit()
1447 pwd->pw_gid, NULL, ADT_UPDATE) != 0) { in update_audit()
1451 pwd->pw_name, username); in update_audit()