David van Moolenbroek 99e8768deb tests: fixes
- test3: support running the test set from a pseudoterminal;
- test60: fix number conversion bug that caused chmod errors;
- test65: remove nonworking package installation instructions;
- testisofs: work around failure due to having a timezone set;
- testisofs: exclude extra RR_MOVED directory from output.

Change-Id: Ibfcc631de7e2f4da46bac3ad9de8d7c7cd7a6189
2016-01-25 14:26:20 +01:00

19 lines
345 B
C

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
/* Return our tainted state to the parent */
int newmode;
char cmd[30];
if (argc < 2) return(-2);
if ((newmode = atoi(argv[1])) > 0) {
snprintf(cmd, sizeof(cmd), "chmod %d %s", newmode, argv[0]);
system(cmd);
}
return(issetugid());
}