Lines Matching defs:passwd
95 int __pw_parse_entry(char *, size_t, struct passwd *, int, int *errnop);
97 static void pwd_init(struct passwd *);
104 static struct passwd *getpw(int (*fn)(union key, struct passwd *, char *,
105 size_t, struct passwd **), union key);
106 static int wrap_getpwnam_r(union key, struct passwd *, char *,
107 size_t, struct passwd **);
108 static int wrap_getpwuid_r(union key, struct passwd *, char *, size_t,
109 struct passwd **);
110 static int wrap_getpwent_r(union key, struct passwd *, char *, size_t,
111 struct passwd **);
115 static int pwdb_parse_entry_v3(char *, size_t, struct passwd *, int *);
118 static int pwdb_parse_entry_v4(char *, size_t, struct passwd *, int *);
124 int (*parse)(char *, size_t, struct passwd *, int *);
181 struct passwd template;
194 static void compat_clear_template(struct passwd *);
195 static int compat_set_template(struct passwd *, struct passwd *);
196 static int compat_use_template(struct passwd *, struct passwd *, char *,
200 struct passwd *, char *, size_t, int *);
262 struct passwd *pwd;
266 struct passwd new_pwd;
284 pwd = va_arg(ap, struct passwd *);
288 desired_size = sizeof(struct passwd) + sizeof(char *) +
307 memcpy(&new_pwd, pwd, sizeof(struct passwd));
311 p = buffer + sizeof(struct passwd) + sizeof(char *);
312 memcpy(buffer + sizeof(struct passwd), &p, sizeof(char *));
356 memcpy(buffer, &new_pwd, sizeof(struct passwd));
366 struct passwd *pwd;
387 pwd = va_arg(ap, struct passwd *);
393 buffer_size - sizeof(struct passwd) - sizeof(char *)) {
398 memcpy(pwd, buffer, sizeof(struct passwd));
399 memcpy(&p, buffer + sizeof(struct passwd), sizeof(char *));
400 memcpy(orig_buf, buffer + sizeof(struct passwd) + sizeof(char *),
401 buffer_size - sizeof(struct passwd) - sizeof(char *));
411 *((struct passwd **)retval) = pwd;
416 NSS_MP_CACHE_HANDLING(passwd);
424 passwd, (void *)nss_lt_all,
451 passwd, (void *)nss_lt_all,
480 passwd, (void *)nss_lt_all,
503 getpwent_r(struct passwd *pwd, char *buffer, size_t bufsize,
504 struct passwd **result)
508 passwd, (void *)nss_lt_all,
541 getpwnam_r(const char *name, struct passwd *pwd, char *buffer, size_t bufsize,
542 struct passwd **result)
547 passwd, (void *)nss_lt_name,
580 getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize,
581 struct passwd **result)
586 passwd, (void *)nss_lt_id,
619 pwd_init(struct passwd *pwd)
635 static struct passwd pwd;
640 static struct passwd *
641 getpw(int (*fn)(union key, struct passwd *, char *, size_t, struct passwd **),
645 struct passwd *res;
675 wrap_getpwnam_r(union key key, struct passwd *pwd, char *buffer,
676 size_t bufsize, struct passwd **res)
683 wrap_getpwuid_r(union key key, struct passwd *pwd, char *buffer,
684 size_t bufsize, struct passwd **res)
691 wrap_getpwent_r(union key key __unused, struct passwd *pwd, char *buffer,
692 size_t bufsize, struct passwd **res)
698 struct passwd *
708 struct passwd *
718 struct passwd *
813 struct passwd *pwd;
839 pwd = va_arg(ap, struct passwd *);
932 *(struct passwd **)retval = pwd;
966 pwdb_parse_entry_v3(char *buffer, size_t bufsize, struct passwd *pwd,
1037 pwdb_parse_entry_v4(char *buffer, size_t bufsize, struct passwd *pwd,
1108 struct passwd *pwd;
1132 pwd = va_arg(ap, struct passwd *);
1159 if (snprintf(buf, sizeof(buf), "passwd-%ld",
1166 how == nss_lt_id ? "uid" : "passwd");
1199 *(struct passwd **)retval = pwd;
1218 * Test for the presence of special FreeBSD-specific master.passwd.by*
1222 * the master.passwd.by* maps don't exist, then let the lookup routine try
1223 * the regular passwd.by* maps instead. If the lookup routine fails, it
1234 if (snprintf(buffer, bufsize, "master.passwd.by%s",
1244 if (snprintf(buffer, bufsize, "passwd.by%s",
1260 rv = yp_match(domain, "passwd.adjunct.byname", name, strlen(name),
1304 struct passwd *pwd;
1325 pwd = va_arg(ap, struct passwd *);
1420 *(struct passwd **)retval = pwd;
1435 compat_clear_template(struct passwd *template)
1447 compat_set_template(struct passwd *src, struct passwd *template)
1478 compat_use_template(struct passwd *pwd, struct passwd *template, char *buffer,
1481 struct passwd hold;
1592 uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize, int *errnop)
1749 struct passwd *pwd;
1774 pwd = va_arg(ap, struct passwd *);
1954 *(struct passwd **)retval = pwd;
1961 * common passwd line matching and parsing
2002 __pw_parse_entry(char *buffer, size_t bufsize __unused, struct passwd *pwd,