diff options
Diffstat (limited to 'src/port/path.c')
-rw-r--r-- | src/port/path.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/port/path.c b/src/port/path.c index 5ac26f4bcf7..69bb8fe40b7 100644 --- a/src/port/path.c +++ b/src/port/path.c @@ -815,16 +815,7 @@ get_home_path(char *ret_path) home = getenv("HOME"); if (home == NULL || home[0] == '\0') - { - char pwdbuf[BUFSIZ]; - struct passwd pwdstr; - struct passwd *pwd = NULL; - - (void) pqGetpwuid(geteuid(), &pwdstr, pwdbuf, sizeof(pwdbuf), &pwd); - if (pwd == NULL) - return false; - home = pwd->pw_dir; - } + return pg_get_user_home_dir(geteuid(), ret_path, MAXPGPATH); strlcpy(ret_path, home, MAXPGPATH); return true; #else |