Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
670d8abf
Commit
670d8abf
authored
Feb 04, 2004
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use MY_GID() instead of getgid().
parent
b2bffbb2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
getgroups.c
getgroups.c
+1
-1
uidlist.c
uidlist.c
+2
-2
No files found.
getgroups.c
View file @
670d8abf
...
@@ -36,7 +36,7 @@ main(UNUSED(int argc), UNUSED(char *argv[]))
...
@@ -36,7 +36,7 @@ main(UNUSED(int argc), UNUSED(char *argv[]))
{
{
int
n
,
i
;
int
n
,
i
;
gid_t
list
[
NGROUPS_MAX
];
gid_t
list
[
NGROUPS_MAX
];
gid_t
gid
=
getgid
();
gid_t
gid
=
MY_GID
();
int
gid_in_list
=
0
;
int
gid_in_list
=
0
;
if
((
n
=
getgroups
(
NGROUPS_MAX
,
list
))
<
0
)
{
if
((
n
=
getgroups
(
NGROUPS_MAX
,
list
))
<
0
)
{
...
...
uidlist.c
View file @
670d8abf
...
@@ -126,7 +126,7 @@ static int is_in_group(gid_t gid)
...
@@ -126,7 +126,7 @@ static int is_in_group(gid_t gid)
if
(
gid
==
last_in
)
if
(
gid
==
last_in
)
return
last_out
;
return
last_out
;
if
(
ngroups
<
-
1
)
{
if
(
ngroups
<
-
1
)
{
gid_t
mygid
=
getgid
();
gid_t
mygid
=
MY_GID
();
ngroups
=
getgroups
(
0
,
0
);
ngroups
=
getgroups
(
0
,
0
);
/* If that didn't work, perhaps 0 isn't treated specially? */
/* If that didn't work, perhaps 0 isn't treated specially? */
if
(
ngroups
<=
0
)
if
(
ngroups
<=
0
)
...
@@ -165,7 +165,7 @@ static int is_in_group(gid_t gid)
...
@@ -165,7 +165,7 @@ static int is_in_group(gid_t gid)
#else
#else
static
gid_t
mygid
=
GID_NONE
;
static
gid_t
mygid
=
GID_NONE
;
if
(
mygid
==
GID_NONE
)
{
if
(
mygid
==
GID_NONE
)
{
mygid
=
getgid
();
mygid
=
MY_GID
();
if
(
verbose
>
3
)
if
(
verbose
>
3
)
rprintf
(
FINFO
,
"process has gid %ld
\n
"
,
(
long
)
mygid
);
rprintf
(
FINFO
,
"process has gid %ld
\n
"
,
(
long
)
mygid
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment