Fix difference between PGID and GID. Correctly set UID and GID of new processes. Implement set/get PGID and GID.

This commit is contained in:
Enrico Fraccaroli
2021-12-27 00:49:28 +01:00
parent 2226eebdc8
commit 7c4a4ac0ba
20 changed files with 216 additions and 92 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ int main(int argc, char** argv)
}
int fd = open(argv[1], O_RDONLY, 0);
if (fd < 0) {
fd = open(argv[1], O_CREAT, 0);
fd = open(argv[1], O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
if (fd >= 0) {
close(fd);
}