Fix fchmod permissions for loader (#268)

Bug: https://github.com/proot-me/proot/issues/227
This commit is contained in:
Lucas Ramage 2021-11-05 19:16:09 -04:00 committed by GitHub
parent 185f6fdc17
commit db16f34966
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -502,7 +502,7 @@ static char *extract_loader(const Tracee *tracee, bool wants_32bit_version)
goto end;
}
status = fchmod(fd, S_IRUSR|S_IXUSR);
status = fchmod(fd, S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
if (status < 0) {
note(tracee, ERROR, SYSTEM, "can't change loader permissions (u+rx)");
goto end;