Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eddeaf7
)
Another improvement to the debug info we output.
author
Wayne Davison
<wayned@samba.org>
Wed, 4 Feb 2004 16:27:47 +0000
(16:27 +0000)
committer
Wayne Davison
<wayned@samba.org>
Wed, 4 Feb 2004 16:27:47 +0000
(16:27 +0000)
uidlist.c
patch
|
blob
|
blame
|
history
diff --git
a/uidlist.c
b/uidlist.c
index
e9ab35d
..
930a01a
100644
(file)
--- 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) {
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++) {
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;
#else
static gid_t mygid = GID_NONE;
- if (mygid == GID_NONE)
+ if (mygid == GID_NONE)
{
mygid = getgid();
mygid = getgid();
+ if (verbose > 3)
+ rprintf(FINFO, "process has gid %ld\n", (long)mygid);
+ }
return gid == mygid;
#endif
}
return gid == mygid;
#endif
}