Lines Matching refs:pw
98 static int display(const char *tfn, struct passwd *pw);
99 static struct passwd *verify(const char *tfn, struct passwd *pw);
104 edit(const char *tfn, CFDictionaryRef pw)
107 edit(const char *tfn, struct passwd *pw)
118 if (display(tfn, pw) == -1)
132 return (pw_dup(pw));
137 if ((npw = verify(tfn, pw)) != NULL)
163 display(const char *tfn, struct passwd *pw)
204 "#Changing user information for %s.\n", pw->pw_name);
206 (void)fprintf(fp, "Login: %s\n", pw->pw_name);
207 (void)fprintf(fp, "Password: %s\n", pw->pw_passwd);
208 (void)fprintf(fp, "Uid [#]: %lu\n", (unsigned long)pw->pw_uid);
210 (unsigned long)pw->pw_gid);
212 ttoa(pw->pw_change));
214 ttoa(pw->pw_expire));
215 (void)fprintf(fp, "Class: %s\n", pw->pw_class);
216 (void)fprintf(fp, "Home directory: %s\n", pw->pw_dir);
218 *pw->pw_shell ? pw->pw_shell : _PATH_BSHELL);
222 else if (ok_shell(pw->pw_shell))
228 else if ((!list[E_SHELL].restricted && ok_shell(pw->pw_shell)) ||
236 *pw->pw_shell ? pw->pw_shell : _PATH_BSHELL);
240 if ((bp = gecos = strdup(pw->pw_gecos)) == NULL) {
285 verify(const char* tfn, CFDictionaryRef pw)
288 verify(const char *tfn, struct passwd *pw)
307 if ((pw = pw_dup(pw)) == NULL)
314 free(pw);
322 free(pw);
375 if ((ep->func)(val, pw, ep))
391 free(pw);
396 pw->pw_gecos = p;
397 buf = pw_make(pw);
398 free(pw);
410 free(pw);