Fix tests when run as root; use bin account but current directory
This commit is contained in:
@@ -36,12 +36,6 @@ char *argv[];
|
||||
|
||||
sync();
|
||||
|
||||
if (geteuid() == 0 || getuid() == 0) {
|
||||
realpath(argv[0], buffer);
|
||||
execl("/usr/bin/su", "/usr/bin/su", "-", "ast", "-c", buffer, NULL);
|
||||
printf("Test 3 cannot run as root; test aborted\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (argc == 2) m = atoi(argv[1]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user