* src/groupmems.c: Remove isgroup(), which always returns TRUE.
This commit is contained in:
parent
44db9db053
commit
e6c015e0d0
@ -1,3 +1,7 @@
|
|||||||
|
2008-07-27 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* src/groupmems.c: Remove isgroup(), which always returns TRUE.
|
||||||
|
|
||||||
2008-07-27 Nicolas François <nicolas.francois@centraliens.net>
|
2008-07-27 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* src/groupmems.c: Reuse the functions from libmisc/list.c to deal
|
* src/groupmems.c: Reuse the functions from libmisc/list.c to deal
|
||||||
|
@ -71,14 +71,6 @@ static char *Prog;
|
|||||||
|
|
||||||
#define isroot() (getuid () == 0)
|
#define isroot() (getuid () == 0)
|
||||||
|
|
||||||
static int isgroup (void)
|
|
||||||
{
|
|
||||||
gid_t g = getgid ();
|
|
||||||
struct group *grp = getgrgid (g); /* local, no need for xgetgrgid */
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *whoami (void)
|
static char *whoami (void)
|
||||||
{
|
{
|
||||||
/* local, no need for xgetgrgid */
|
/* local, no need for xgetgrgid */
|
||||||
@ -189,9 +181,6 @@ int main (int argc, char **argv)
|
|||||||
exit (EXIT_NOT_ROOT);
|
exit (EXIT_NOT_ROOT);
|
||||||
} else if (isroot () && NULL != thisgroup) {
|
} else if (isroot () && NULL != thisgroup) {
|
||||||
name = thisgroup;
|
name = thisgroup;
|
||||||
} else if (!isgroup ()) {
|
|
||||||
fputs (_("Group access is required\n"), stderr);
|
|
||||||
exit (EXIT_NOT_EROOT);
|
|
||||||
} else if (NULL == (name = whoami ())) {
|
} else if (NULL == (name = whoami ())) {
|
||||||
fputs (_("Not primary owner of current group\n"), stderr);
|
fputs (_("Not primary owner of current group\n"), stderr);
|
||||||
exit (EXIT_NOT_PRIMARY);
|
exit (EXIT_NOT_PRIMARY);
|
||||||
|
Loading…
Reference in New Issue
Block a user