xfs
[Top] [All Lists]

Re: [patch] security. namespace

To: Chris PeBenito <pebenito@xxxxxxxxxx>
Subject: Re: [patch] security. namespace
From: Nathan Scott <nathans@xxxxxxx>
Date: Wed, 3 Dec 2003 16:25:10 +1100
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <1070301662.7842.11.camel@chris.pebenito.net>
References: <1070301662.7842.11.camel@chris.pebenito.net>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.3i
On Mon, Dec 01, 2003 at 12:01:02PM -0600, Chris PeBenito wrote:
> Here is a patch against -test10 that adds an option for the security.
> namespace (controlled by a configure option), which is used by SELinux
> to store it's security labels.  I created this patch based off Tad
> Glines' (tadglines@xxxxxxxxxxx) 2.4 patch
> (http://www.glines.com/xfs.patch.bz2).  Please critique this ...

hi Chris,

What is the permissions model for the security attribute(s)?

It seems from the patch that nothing is enforced, e.g. for
setting a new value it seems anyone can do it (which can't
be right, can it?)...

@@ -667,6 +673,15 @@
                VOP_ATTR_SET(vp, p, (void *) data, size, xflags, NULL, error);
                return -error;
        }
+#ifdef CONFIG_XFS_XATTR_SECURITY
+       if (strncmp(name, xfs_namespaces[SECURITY_NAMES].name,
+                       xfs_namespaces[SECURITY_NAMES].namelen) == 0) {
+               xflags |= ATTR_SECURITY;
+               p += xfs_namespaces[SECURITY_NAMES].namelen;
+               VOP_ATTR_SET(vp, p, (void *) data, size, xflags, NULL, error);
+               return -error;
+       }
+#endif


If you look at the "trusted" and "user" attrs, they call
capable/capable_user_xattr respectively before allowing
any operations to proceed (get/set/remove).

cheers.

-- 
Nathan


<Prev in Thread] Current Thread [Next in Thread>