git.samba.org
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2bffbb
)
Use MY_GID() instead of getgid().
author
Wayne Davison
<wayned@samba.org>
Wed, 4 Feb 2004 17:05:44 +0000
(17:05 +0000)
committer
Wayne Davison
<wayned@samba.org>
Wed, 4 Feb 2004 17:05:44 +0000
(17:05 +0000)
getgroups.c
patch
|
blob
|
history
uidlist.c
patch
|
blob
|
history
diff --git
a/getgroups.c
b/getgroups.c
index 4a10fe7dfa9d176c12e9e536e75af8604eb58bfc..8dfe264c6c02c90bd58bd536c84528454ccfd16e 100644
(file)
--- a/
getgroups.c
+++ b/
getgroups.c
@@
-36,7
+36,7
@@
main(UNUSED(int argc), UNUSED(char *argv[]))
{
int n, i;
gid_t list[NGROUPS_MAX];
- gid_t gid =
getgid
();
+ gid_t gid =
MY_GID
();
int gid_in_list = 0;
if ((n = getgroups(NGROUPS_MAX, list)) < 0) {
diff --git
a/uidlist.c
b/uidlist.c
index 930a01a7ba91ccfdec3866dd83b11e3457a156e7..170b9e625bbe20446e51f847ab6e6836489d6445 100644
(file)
--- a/
uidlist.c
+++ b/
uidlist.c
@@
-126,7
+126,7
@@
static int is_in_group(gid_t gid)
if (gid == last_in)
return last_out;
if (ngroups < -1) {
- gid_t mygid =
getgid
();
+ gid_t mygid =
MY_GID
();
ngroups = getgroups(0, 0);
/* If that didn't work, perhaps 0 isn't treated specially? */
if (ngroups <= 0)
@@
-165,7
+165,7
@@
static int is_in_group(gid_t gid)
#else
static gid_t mygid = GID_NONE;
if (mygid == GID_NONE) {
- mygid =
getgid
();
+ mygid =
MY_GID
();
if (verbose > 3)
rprintf(FINFO, "process has gid %ld\n", (long)mygid);
}