From e08c1d7c3c56c99cafde076529b17c956ef3aeb0 Mon Sep 17 00:00:00 2001 From: Karel Klic Date: Fri, 12 Feb 2010 16:06:50 +0100 Subject: get_home_dir uses uid_t for the uid --- inc/abrtlib.h | 2 +- lib/Utils/xfuncs.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/abrtlib.h b/inc/abrtlib.h index 2f7b3bf7..ae8fef34 100644 --- a/inc/abrtlib.h +++ b/inc/abrtlib.h @@ -255,7 +255,7 @@ bool string_to_bool(const char *s); /* C++ style stuff */ std::string ssprintf(const char *format, ...); -std::string get_home_dir(int uid); +std::string get_home_dir(uid_t uid); std::string concat_path_file(const char *path, const char *filename); double get_dirsize(const char *pPath); double get_dirsize_find_largest_dir( diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp index 16f4cb0e..7301d7f0 100644 --- a/lib/Utils/xfuncs.cpp +++ b/lib/Utils/xfuncs.cpp @@ -252,7 +252,7 @@ void xstat(const char *name, struct stat *stat_buf) perror_msg_and_die("can't stat '%s'", name); } -std::string get_home_dir(int uid) +std::string get_home_dir(uid_t uid) { struct passwd* pw = getpwuid(uid); return pw ? pw->pw_dir : ""; -- cgit