From: James Morris Date: Tue, 22 May 2012 01:21:06 +0000 (+1000) Subject: Merge branch 'master' of git://git.infradead.org/users/eparis/selinux into next X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=ff2bb047c4bce9742e94911eeb44b4d6ff4734ab;p=openwrt%2Fstaging%2Fblogic.git Merge branch 'master' of git://git.infradead.org/users/eparis/selinux into next Per pull request, for 3.5. --- ff2bb047c4bce9742e94911eeb44b4d6ff4734ab diff --cc security/selinux/hooks.c index 0b06685787b9,e94349b85bfe..fa2341b68331 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@@ -2032,12 -1995,10 +2002,11 @@@ static int selinux_bprm_set_creds(struc return rc; } - COMMON_AUDIT_DATA_INIT(&ad, PATH); - ad.selinux_audit_data = &sad; + ad.type = LSM_AUDIT_DATA_PATH; ad.u.path = bprm->file->f_path; - if (bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID) + if ((bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID) || + (bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS)) new_tsec->sid = old_tsec->sid; if (new_tsec->sid == old_tsec->sid) {