Lines Matching refs:pwd
1127 uv_passwd_t pwd; in uv_os_homedir() local
1140 r = uv_os_get_passwd(&pwd); in uv_os_homedir()
1146 len = strlen(pwd.homedir); in uv_os_homedir()
1150 uv_os_free_passwd(&pwd); in uv_os_homedir()
1154 memcpy(buffer, pwd.homedir, len + 1); in uv_os_homedir()
1156 uv_os_free_passwd(&pwd); in uv_os_homedir()
1213 static int uv__getpwuid_r(uv_passwd_t *pwd, uid_t uid) { in uv__getpwuid_r() argument
1223 if (pwd == NULL) in uv__getpwuid_r()
1256 pwd->username = uv__malloc(name_size + homedir_size + shell_size); in uv__getpwuid_r()
1258 if (pwd->username == NULL) { in uv__getpwuid_r()
1264 memcpy(pwd->username, pw.pw_name, name_size); in uv__getpwuid_r()
1267 pwd->homedir = pwd->username + name_size; in uv__getpwuid_r()
1268 memcpy(pwd->homedir, pw.pw_dir, homedir_size); in uv__getpwuid_r()
1271 pwd->shell = pwd->homedir + homedir_size; in uv__getpwuid_r()
1272 memcpy(pwd->shell, pw.pw_shell, shell_size); in uv__getpwuid_r()
1275 pwd->uid = pw.pw_uid; in uv__getpwuid_r()
1276 pwd->gid = pw.pw_gid; in uv__getpwuid_r()
1369 int uv_os_get_passwd(uv_passwd_t* pwd) { in uv_os_get_passwd() argument
1370 return uv__getpwuid_r(pwd, geteuid()); in uv_os_get_passwd()
1374 int uv_os_get_passwd2(uv_passwd_t* pwd, uv_uid_t uid) { in uv_os_get_passwd2() argument
1375 return uv__getpwuid_r(pwd, uid); in uv_os_get_passwd2()