1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:27:35 +00:00

Add some basic field width support to printf().

Use it to make "ls" output a bit better. Also sys$spawn now fails with EACCES
if the path is not a file that's executable by the current uid/gid.
This commit is contained in:
Andreas Kling 2018-10-27 16:43:03 +02:00
parent de2fb183cc
commit 8f91a47aeb
8 changed files with 212 additions and 272 deletions

View file

@ -230,6 +230,11 @@ Task* Task::createUserTask(const String& path, uid_t uid, gid_t gid, pid_t paren
return nullptr;
}
if (!handle->metadata().mayExecute(uid, gid)) {
error = -EACCES;
return nullptr;
}
auto elfData = handle->readEntireFile();
if (!elfData) {
error = -EIO; // FIXME: Get a more detailed error from VFS.