toaruos/userspace/tests/test-chmod.c
2015-08-06 19:07:20 -07:00

11 lines
209 B
C

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int main(int argc, char * argv[]) {
struct stat s;
stat(argv[1], &s);
chmod(argv[1], s.st_mode | S_IXUSR | S_IXGRP | S_IXOTH);
return 0;
}