]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/exec.c
[PATCH] add a file_permission helper
[net-next-2.6.git] / fs / exec.c
index 7bbb781b9ac68a5b3e4c7edf691b8ff3f7d0579f..c466fec5de2005cee77acfc7a2f120afefcd33f8 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -896,7 +896,7 @@ int flush_old_exec(struct linux_binprm * bprm)
        flush_thread();
 
        if (bprm->e_uid != current->euid || bprm->e_gid != current->egid || 
-           permission(bprm->file->f_dentry->d_inode,MAY_READ, NULL) ||
+           file_permission(bprm->file, MAY_READ) ||
            (bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) {
                suid_keys(current);
                current->mm->dumpable = suid_dumpable;