Lines Matching refs:pwd

39                 const struct passwd *pwd,  in nss_passwd_to_user_record()  argument
46 assert(pwd); in nss_passwd_to_user_record()
49 if (isempty(pwd->pw_name)) in nss_passwd_to_user_record()
52 if (spwd && !streq_ptr(spwd->sp_namp, pwd->pw_name)) in nss_passwd_to_user_record()
59 r = free_and_strdup(&hr->user_name, pwd->pw_name); in nss_passwd_to_user_record()
67 if (isempty(pwd->pw_gecos) || streq_ptr(pwd->pw_gecos, hr->user_name)) in nss_passwd_to_user_record()
69 else if (valid_gecos(pwd->pw_gecos)) { in nss_passwd_to_user_record()
70 r = free_and_strdup(&hr->real_name, pwd->pw_gecos); in nss_passwd_to_user_record()
76 mangled = mangle_gecos(pwd->pw_gecos); in nss_passwd_to_user_record()
83 r = free_and_strdup(&hr->home_directory, utf8_only(empty_to_null(pwd->pw_dir))); in nss_passwd_to_user_record()
87 r = free_and_strdup(&hr->shell, utf8_only(empty_to_null(pwd->pw_shell))); in nss_passwd_to_user_record()
91 hr->uid = pwd->pw_uid; in nss_passwd_to_user_record()
92 hr->gid = pwd->pw_gid; in nss_passwd_to_user_record()
168 int nss_spwd_for_passwd(const struct passwd *pwd, struct spwd *ret_spwd, char **ret_buffer) { in nss_spwd_for_passwd() argument
172 assert(pwd); in nss_spwd_for_passwd()
184 r = getspnam_r(pwd->pw_name, &spwd, buf, buflen, &result); in nss_spwd_for_passwd()
212 struct passwd pwd, *result; in nss_user_record_by_name() local
226 r = getpwnam_r(name, &pwd, buf, buflen, &result); in nss_user_record_by_name()
270 struct passwd pwd, *result; in nss_user_record_by_uid() local
283 r = getpwuid_r(uid, &pwd, buf, buflen, &result); in nss_user_record_by_uid()