All of lore.kernel.org
 help / color / mirror / Atom feed
* selinux_inode_init_security() initialises XATTR_SELINUX_SUFFIX and not XATTR_NAME_SELINUX?
@ 2011-05-19 21:05 Sam Gandhi
  2011-05-20 11:43 ` Stephen Smalley
  0 siblings, 1 reply; 2+ messages in thread
From: Sam Gandhi @ 2011-05-19 21:05 UTC (permalink / raw)
  To: selinux

Hello SeLinux Experts,

Looking at the latest SELinux code I see that in function
selinux_inode_init_security() the initial XATTR is initialised as
XATTR_SELINUX_SUFFIX ("security.selinux"), where as all the
subsequence searches are done with XATTR_NAME_SELINUX.  Unfortunately
I don't understand why initialisation is done with
XATTR_SELINUX_SUFFIX ("selinux")

Should we be making following change to the code?

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 8fb2488..c8d14d5 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2566,7 +2566,7 @@ static int selinux_inode_init_security(struct
inode *inode, struct inode *dir,
                return -EOPNOTSUPP;

        if (name) {
-               namep = kstrdup(XATTR_SELINUX_SUFFIX, GFP_NOFS);
+               namep = kstrdup(XATTR_NAME_SELINUX, GFP_NOFS);
                if (!namep)
                        return -ENOMEM;
                *name = namep;



-Sam

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-20 11:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-19 21:05 selinux_inode_init_security() initialises XATTR_SELINUX_SUFFIX and not XATTR_NAME_SELINUX? Sam Gandhi
2011-05-20 11:43 ` Stephen Smalley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.