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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1303907657-18366-4-git-send-email-roberto.sassu@polito.it>
Date:	Wed, 27 Apr 2011 14:34:11 +0200
From:	Roberto Sassu <roberto.sassu@...ito.it>
To:	linux-security-module@...r.kernel.org
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	dhowells@...hat.com, jmorris@...ei.org, zohar@...ux.vnet.ibm.com,
	safford@...son.ibm.com, tyhicks@...ux.vnet.ibm.com,
	kirkland@...onical.com, ecryptfs-devel@...ts.launchpad.net,
	casey@...aufler-ca.com, eparis@...hat.com, sds@...ho.nsa.gov,
	selinux@...ho.nsa.gov, viro@...iv.linux.org.uk,
	Roberto Sassu <roberto.sassu@...ito.it>
Subject: [RFC][PATCH 3/7] smack: assign the label set in file->f_cred to new file descriptors

The SMACK label of new file descriptors is obtained from the credentials
set in the 'f_cred' field of the same structure.

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

diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index c6f8fca..e3c9e54 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -1011,7 +1011,7 @@ static int smack_file_permission(struct file *file, int mask)
  */
 static int smack_file_alloc_security(struct file *file)
 {
-	file->f_security = smk_of_current();
+	file->f_security = smk_of_task(file->f_cred->security);
 	return 0;
 }
 
-- 
1.7.4.4


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ