[RFC][PATCH 4/4] smack: modified file->f_security assignment in smack_file_alloc_security()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 'f_security' field of the file descriptor structure is initialized
using the credentials set in the 'f_cred' field of the same structure.

Signed-off-by: Roberto Sassu <roberto.sassu@xxxxxxxxx>
---
 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 489a85a..6d4fe6e 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -895,7 +895,7 @@ static int smack_file_permission(struct file *file, int mask)
  */
 static int smack_file_alloc_security(struct file *file)
 {
-	file->f_security = current_security();
+	file->f_security = file->f_cred->security;
 	return 0;
 }
 
-- 
1.7.2.3

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux