Lines Matching defs:pwd
38 #include <pwd.h>
70 static int home_passwd(const struct passwd *pwd,
91 if (!S_ISREG(st.st_mode) || (pwd->pw_uid != st.st_uid) ||
92 (pwd->pw_gid != st.st_gid) ||
142 static int afppasswd(const struct passwd *pwd,
171 if ( strlen(pwd->pw_name) == (p - buf) &&
172 strncmp(buf, pwd->pw_name, p - buf) == 0) {
175 LOG(log_info, logtype_uams, "invalid password entry for %s", pwd->pw_name);
262 static int randpass(const struct passwd *pwd, const char *file,
273 if ( (strlen(pwd->pw_dir) + i - 1) > MAXPATHLEN)
276 strcpy(path, pwd->pw_dir );
280 seteuid(pwd->pw_uid); /* change ourselves to the user */
281 i = home_passwd(pwd, path, i, passwd, len, set);
294 i = afppasswd(pwd, file, i, passwd, len, set);
438 struct passwd *pwd, char *ibuf,
445 if (uam_checkuser(pwd) < 0)
455 if ((err = randpass(pwd, passwdfile, seskey,
479 err = randpass(pwd, passwdfile, (unsigned char *)ibuf + PASSWDLEN, sizeof(seskey), 1);