forked from enlightenment/enlightenment
expoand group list # to 65k - in case, and handle < 0 return.
SVN revision: 53716
This commit is contained in:
parent
a4693a06df
commit
02a6422cf0
|
@ -30,7 +30,7 @@ main(int argc, char **argv)
|
||||||
int test = 0;
|
int test = 0;
|
||||||
char *action, *cmd;
|
char *action, *cmd;
|
||||||
uid_t uid;
|
uid_t uid;
|
||||||
gid_t gid, gl[1024], egid;
|
gid_t gid, gl[65536], egid;
|
||||||
|
|
||||||
for (i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++)
|
||||||
{
|
{
|
||||||
|
@ -62,8 +62,12 @@ main(int argc, char **argv)
|
||||||
uid = getuid();
|
uid = getuid();
|
||||||
gid = getgid();
|
gid = getgid();
|
||||||
egid = getegid();
|
egid = getegid();
|
||||||
gn = getgroups(1024, gl);
|
gn = getgroups(65536, gl);
|
||||||
|
if (gn < 0)
|
||||||
|
{
|
||||||
|
printf("ERROR: MEMBER OF MORE THAN 65536 GROUPS\n");
|
||||||
|
exit(3);
|
||||||
|
}
|
||||||
if (setuid(0) != 0)
|
if (setuid(0) != 0)
|
||||||
{
|
{
|
||||||
printf("ERROR: UNABLE TO ASSUME ROOT PRIVILEDGES\n");
|
printf("ERROR: UNABLE TO ASSUME ROOT PRIVILEDGES\n");
|
||||||
|
|
Loading…
Reference in New Issue