diff options
Diffstat (limited to 'tryshsgr.c')
| -rw-r--r-- | tryshsgr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tryshsgr.c b/tryshsgr.c new file mode 100644 index 0000000..807e15d --- /dev/null +++ b/tryshsgr.c | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | void main() | ||
| 2 | { | ||
| 3 | short x[4]; | ||
| 4 | |||
| 5 | x[0] = x[1] = 1; | ||
| 6 | if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1); | ||
| 7 | |||
| 8 | if (getgroups(1,x) == -1) _exit(1); | ||
| 9 | if (x[1] != 1) _exit(1); | ||
| 10 | x[1] = 2; | ||
| 11 | if (getgroups(1,x) == -1) _exit(1); | ||
| 12 | if (x[1] != 2) _exit(1); | ||
| 13 | _exit(0); | ||
| 14 | } | ||
