2002-05-01 03:41:36

by Alexander Viro

[permalink] [raw]
Subject: [PATCH] missing checks in exec_permission_light()

Missing checks added...

diff -urN C12-0/fs/namei.c C12-current/fs/namei.c
--- C12-0/fs/namei.c Tue Apr 30 20:23:38 2002
+++ C12-current/fs/namei.c Tue Apr 30 23:37:15 2002
@@ -324,6 +324,12 @@
if (mode & MAY_EXEC)
return 0;

+ if ((inode->i_mode & S_IXUGO) && capable(CAP_DAC_OVERRIDE))
+ return 0;
+
+ if (S_ISDIR(inode->i_mode) && capable(CAP_DAC_READ_SEARCH))
+ return 0;
+
return -EACCES;
}