Applying uid/gid fix from trunk.
authorWayne Davison <wayne@opencoder.net>
Tue, 13 Jan 2009 20:12:56 +0000 (12:12 -0800)
committerWayne Davison <wayne@opencoder.net>
Tue, 13 Jan 2009 20:12:56 +0000 (12:12 -0800)
usermap.diff

index fdcee09..a17bac8 100644 (file)
@@ -351,7 +351,7 @@ diff --git a/uidlist.c b/uidlist.c
 +      if (node)
 +              id2 = node->id2;
 +      else if (*name && id) {
-+              if (idmap == uidmap) {
++              if (idlist_ptr == &uidlist) {
 +                      uid_t uid;
 +                      id2 = name_to_uid(name, &uid) ? uid : id;
 +              } else {
@@ -372,14 +372,14 @@ diff --git a/uidlist.c b/uidlist.c
 -
 -      node = add_to_list(&gidlist, id, name, id2,
 -              !am_root && !is_in_group(id2) ? FLAG_SKIP_GROUP : 0);
-+      flag = idmap == gidmap && !am_root && !is_in_group(id2) ? FLAG_SKIP_GROUP : 0;
++      flag = idlist_ptr == &gidlist && !am_root && !is_in_group(id2) ? FLAG_SKIP_GROUP : 0;
 +      node = add_to_list(idlist_ptr, id, *name ? name : NULL, id2, flag);
  
        if (verbose > 3) {
 -              rprintf(FINFO, "gid %u(%s) maps to %u\n",
 -                      (unsigned)id, name ? name : "", (unsigned)id2);
 +              rprintf(FINFO, "%sid %u(%s) maps to %u\n",
-+                      idmap == uidmap ? "u" : "g",
++                      idlist_ptr == &uidlist ? "u" : "g",
 +                      (unsigned)id, name, (unsigned)id2);
        }