Require exec permission to exec (finally)

This commit is contained in:
K. Lange 2018-08-12 18:16:44 +09:00
parent f372859ddb
commit 68a4e0ce50
1 changed files with 4 additions and 0 deletions

View File

@ -274,6 +274,10 @@ int exec(
return -ENOENT;
}
if (!has_permission(file, 01)) {
return -EACCES;
}
/* Read four bytes of the file */
unsigned char head[4];
read_fs(file, 0, 4, head);