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
|