diff options
Diffstat (limited to 'tools/test/stress2/misc/ftruncate.sh')
| -rwxr-xr-x | tools/test/stress2/misc/ftruncate.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/test/stress2/misc/ftruncate.sh b/tools/test/stress2/misc/ftruncate.sh index ddec85b6745a..f9aa1869756f 100755 --- a/tools/test/stress2/misc/ftruncate.sh +++ b/tools/test/stress2/misc/ftruncate.sh @@ -170,7 +170,7 @@ main(int argc, char **argv) if ((pw = getpwnam("nobody")) == NULL) err(1, "failed to resolve nobody"); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setegid(pw->pw_gid) || setgid(pw->pw_gid) || seteuid(pw->pw_uid) || setuid(pw->pw_uid)) err(1, "Can't drop privileges to \"nobody\""); |
