aboutsummaryrefslogtreecommitdiffstats
path: root/uidlist.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-02-04 16:27:47 +0000
committerWayne Davison <wayned@samba.org>2004-02-04 16:27:47 +0000
commit187e9c24f1cf93cc8ef2a5dd50a43bc894db6779 (patch)
treea75db27dacd0f148821f26b51d37461fd072c037 /uidlist.c
parenteddeaf76f8df1344b3918f17ac8e9639b63f94f2 (diff)
downloadandroid_external_rsync-187e9c24f1cf93cc8ef2a5dd50a43bc894db6779.tar.gz
android_external_rsync-187e9c24f1cf93cc8ef2a5dd50a43bc894db6779.tar.bz2
android_external_rsync-187e9c24f1cf93cc8ef2a5dd50a43bc894db6779.zip
Another improvement to the debug info we output.
Diffstat (limited to 'uidlist.c')
-rw-r--r--uidlist.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/uidlist.c b/uidlist.c
index e9ab35da..930a01a7 100644
--- a/uidlist.c
+++ b/uidlist.c
@@ -142,10 +142,16 @@ static int is_in_group(gid_t gid)
if (n == ngroups)
gidset[ngroups++] = mygid;
if (verbose > 3) {
+ char gidbuf[NGROUPS_MAX*16+32];
+ int pos;
+ sprintf(gidbuf, "process has %d gid%s: ",
+ ngroups, ngroups == 1? "" : "s");
+ pos = strlen(gidbuf);
for (n = 0; n < ngroups; n++) {
- rprintf(FINFO, "process has gid %ld\n",
- (long)gidset[n]);
+ sprintf(gidbuf+pos, " %ld", (long)gidset[n]);
+ pos += strlen(gidbuf+pos);
}
+ rprintf(FINFO, "%s\n", gidbuf);
}
}
@@ -158,8 +164,11 @@ static int is_in_group(gid_t gid)
#else
static gid_t mygid = GID_NONE;
- if (mygid == GID_NONE)
+ if (mygid == GID_NONE) {
mygid = getgid();
+ if (verbose > 3)
+ rprintf(FINFO, "process has gid %ld\n", (long)mygid);
+ }
return gid == mygid;
#endif
}