Moved from rootless-containers/runrootless#19
expected result: 44:43
actual result: 44:0
#include <stdio.h>
#include <unistd.h>
int main(int ac, char *av[]){
if (ac != 2) {
fprintf(stderr, "usage: %s FILE\n", av[0]);
return 1;
}
const char *path = av[1];
if (chown(path, 42, 43) < 0) {
perror("chown(42, 43)");
return 1;
}
if (chown(path, 44, -1) < 0) {
perror("chown(44, -1)");
return 1;
}
return 0;
}