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 /metastore.c | |
parent | 201f1e4dfd09f41cce99182294824af0274898ae (diff) |
Add caching uid/gid lookup functions
Diffstat (limited to 'metastore.c')
-rw-r--r-- | metastore.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/metastore.c b/metastore.c index affcf19..a03e0ef 100644 --- a/metastore.c +++ b/metastore.c @@ -20,8 +20,6 @@ #include <sys/types.h> #include <sys/stat.h> -#include <pwd.h> -#include <grp.h> #include <getopt.h> #include <utime.h> #include <attr/xattr.h> @@ -121,7 +119,7 @@ compare_fix(struct metaentry *real, struct metaentry *stored, int cmp) if (cmp & DIFF_OWNER) { msg(MSG_NORMAL, "\tchanging owner from %s to %s\n", real->path, real->group, stored->group); - owner = getpwnam(stored->owner); + owner = xgetpwnam(stored->owner); if (!owner) { msg(MSG_DEBUG, "\tgetpwnam failed: %s\n", strerror(errno)); @@ -133,7 +131,7 @@ compare_fix(struct metaentry *real, struct metaentry *stored, int cmp) if (cmp & DIFF_GROUP) { msg(MSG_NORMAL, "\tchanging group from %s to %s\n", real->path, real->group, stored->group); - group = getgrnam(stored->group); + group = xgetgrnam(stored->group); if (!group) { msg(MSG_DEBUG, "\tgetgrnam failed: %s\n", strerror(errno)); |