diff options
author | David Härdeman <david@hardeman.nu> | 2007-05-21 14:48:18 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2007-05-21 14:48:18 +0200 |
commit | 36d91ba2fe1ecc8120a252c12c19729519bdb078 (patch) | |
tree | 3437dfc9dd5056c84215b44d766086c9087a66fa /metaentry.c | |
parent | 201f1e4dfd09f41cce99182294824af0274898ae (diff) |
Add caching uid/gid lookup functions
Diffstat (limited to 'metaentry.c')
-rw-r--r-- | metaentry.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/metaentry.c b/metaentry.c index 683a126..a2ab65b 100644 --- a/metaentry.c +++ b/metaentry.c @@ -25,8 +25,6 @@ #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> -#include <pwd.h> -#include <grp.h> #include <attr/xattr.h> #include <limits.h> #include <dirent.h> @@ -203,14 +201,14 @@ mentry_create(const char *path) return NULL; } - pbuf = getpwuid(sbuf.st_uid); + pbuf = xgetpwuid(sbuf.st_uid); if (!pbuf) { msg(MSG_ERROR, "getpwuid failed for %i: %s\n", (int)sbuf.st_uid, strerror(errno)); return NULL; } - gbuf = getgrgid(sbuf.st_gid); + gbuf = xgetgrgid(sbuf.st_gid); if (!gbuf) { msg(MSG_ERROR, "getgrgid failed for %i: %s\n", (int)sbuf.st_gid, strerror(errno)); |