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
1df395f7
Commit
1df395f7
authored
Feb 04, 2004
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the new HAVE_GETGROUPS define.
parent
5fdf2e70
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
getgroups.c
getgroups.c
+4
-0
uidlist.c
uidlist.c
+5
-2
No files found.
getgroups.c
View file @
1df395f7
...
...
@@ -39,10 +39,14 @@ main(UNUSED(int argc), UNUSED(char *argv[]))
gid_t
gid
=
MY_GID
();
int
gid_in_list
=
0
;
#ifdef HAVE_GETGROUPS
if
((
n
=
getgroups
(
NGROUPS_MAX
,
list
))
<
0
)
{
perror
(
"getgroups"
);
return
1
;
}
#else
n
=
0
;
#endif
for
(
i
=
0
;
i
<
n
;
i
++
)
{
printf
(
"%lu "
,
(
unsigned
long
)
list
[
i
]);
...
...
uidlist.c
View file @
1df395f7
...
...
@@ -25,7 +25,10 @@
#include "rsync.h"
#ifdef GETGROUPS_T
#ifdef HAVE_GETGROUPS
# if !defined(GETGROUPS_T)
# define GETGROUPS_T gid_t
# endif
# ifndef NGROUPS_MAX
/* It ought to be defined, but just in case. */
# define NGROUPS_MAX 32
...
...
@@ -117,7 +120,7 @@ static uid_t match_uid(uid_t uid)
static
int
is_in_group
(
gid_t
gid
)
{
#ifdef
GETGROUPS_T
#ifdef
HAVE_GETGROUPS
static
gid_t
last_in
=
GID_NONE
,
last_out
;
static
int
ngroups
=
-
2
;
static
GETGROUPS_T
*
gidset
;
...
...
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