From e356b5a127028423b29c2446f7ddaa5c714ff4e2 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Thu, 30 Oct 2008 11:52:23 -0500 Subject: [PATCH] --- yaml --- r: 118289 b: refs/heads/master c: 3318a386e4ca68c76e0294363d29bdc46fcad670 h: refs/heads/master i: 118287: 79351f35e45807006e590468643a97223b74b417 v: v3 --- [refs] | 2 +- trunk/security/commoncap.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 9f4b74c19a14..0d339ffb9fa1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e06f42d6c127883e58b747048752f44ae208ae47 +refs/heads/master: 3318a386e4ca68c76e0294363d29bdc46fcad670 diff --git a/trunk/security/commoncap.c b/trunk/security/commoncap.c index 399bfdb9e2da..3976613db829 100644 --- a/trunk/security/commoncap.c +++ b/trunk/security/commoncap.c @@ -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;