(2.6.24-rc8-mm1) -mm Smack socket label setting fix
Subsystems (2)
Casey Schaufler
maintainerPATCH 1/1 (2.6.24-rc8-mm1) -mm Smack socket label setting fix
From: Casey Schaufler <[email protected]>
Correct the checks in smack_inode_setxattr to include the socket labeling attributes. Simplify and correct smack_sock_graft, while the values it was setting were safe they were not correct and the job was not being done efficiently. smack_inode_setsecurity wasn't invoking the required netlabel function in the case where smk_ipout was set. It does now, but that change required the hook to be moved in the file. This movement accounts for the bulk of the patch.
Signed-off-by Casey Schaufler <[email protected]>
---
security/smack/smack.h | 2 security/smack/smack_lsm.c | 136 ++++++++++++++++------------------- 2 files changed, 67 insertions(+), 71 deletions(-)
security/smack/smack.h +2 -0
@@ -130,6 +130,8 @@ struct smack_known {#define XATTR_SMACK_IPIN "SMACK64IPIN"#define XATTR_SMACK_IPOUT "SMACK64IPOUT"#define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX +#define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN +#define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT/* * smackfs macic number
security/smack/smack_lsm.c +65 -71
169 lines not on this page · raw message