]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - security/commoncap.c
file caps: always start with clear bprm->caps_*
[linux-2.6-omap-h63xx.git] / security / commoncap.c
index 399bfdb9e2da99c4ef81fdd8b0391b1f5571c371..3976613db829044ab435ee21b7a6ad2161a6441c 100644 (file)
@@ -279,10 +279,10 @@ static int get_file_caps(struct linux_binprm *bprm)
        struct vfs_cap_data vcaps;
        struct inode *inode;
 
-       if (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID) {
-               bprm_clear_caps(bprm);
+       bprm_clear_caps(bprm);
+
+       if (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)
                return 0;
-       }
 
        dentry = dget(bprm->file->f_dentry);
        inode = dentry->d_inode;