aboutsummaryrefslogtreecommitdiffstats
path: root/security/commoncap.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/commoncap.c')
-rw-r--r--security/commoncap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index 399bfdb9e2da..3976613db829 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -279,10 +279,10 @@ static int get_file_caps(struct linux_binprm *bprm)
279 struct vfs_cap_data vcaps; 279 struct vfs_cap_data vcaps;
280 struct inode *inode; 280 struct inode *inode;
281 281
282 if (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID) { 282 bprm_clear_caps(bprm);
283 bprm_clear_caps(bprm); 283
284 if (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)
284 return 0; 285 return 0;
285 }
286 286
287 dentry = dget(bprm->file->f_dentry); 287 dentry = dget(bprm->file->f_dentry);
288 inode = dentry->d_inode; 288 inode = dentry->d_inode;