lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <201011221657.47087.roberto.sassu@polito.it>
Date:	Mon, 22 Nov 2010 16:57:46 +0100
From:	Roberto Sassu <roberto.sassu@...ito.it>
To:	Alexander Viro <viro@...iv.linux.org.uk>
Cc:	Stephen Smalley <sds@...ho.nsa.gov>,
	James Morris <jmorris@...ei.org>,
	Eric Paris <eparis@...isplace.org>,
	Casey Schaufler <casey@...aufler-ca.com>,
	Paul Moore <paul.moore@...com>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.org, selinux@...ho.nsa.gov
Subject: [RFC][PATCH 3/4] selinux: use file->f_cred to determine task's SID

The Security IDentifier to be associated to the newly created file
descriptor is computed from the credentials set in the 'f_cred' field of
the same structure instead of those relative to the 'current' process.

Signed-off-by: Roberto Sassu <roberto.sassu@...ito.it>
---
 security/selinux/hooks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 0346d26..aff2d59 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -229,7 +229,7 @@ static void inode_free_security(struct inode *inode)
 static int file_alloc_security(struct file *file)
 {
 	struct file_security_struct *fsec;
-	u32 sid = current_sid();
+	u32 sid = cred_sid(file->f_cred);
 
 	fsec = kzalloc(sizeof(struct file_security_struct), GFP_KERNEL);
 	if (!fsec)
-- 
1.7.2.3


Download attachment "smime.p7s" of type "application/pkcs7-signature" (4707 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ