diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-01-20 03:13:20 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-01-20 03:13:20 -0800 |
| commit | 76ef5df33f02b6db0f67ca2cb78bde84145d47a0 (patch) | |
| tree | f9f5b7a6e0bd5fdc52e9515906bd0b6970a24be6 | |
| parent | 66a6ef19520f037127edabb4d663378fbb92b843 (diff) | |
[PATCH] Move XATTR_SECURITY_PREFIX macro to common location
From: Chris Wright <chrisw@osdl.org>
Move the XATTR_SECURITY_PREFIX macro to the xattr.h header so that it's in a
common location.
(Acked by Stephen Smalley)
| -rw-r--r-- | fs/devpts/xattr_security.c | 2 | ||||
| -rw-r--r-- | fs/ext2/xattr_security.c | 2 | ||||
| -rw-r--r-- | fs/ext3/xattr_security.c | 2 | ||||
| -rw-r--r-- | include/linux/xattr.h | 2 | ||||
| -rw-r--r-- | security/selinux/hooks.c | 7 |
5 files changed, 5 insertions, 10 deletions
diff --git a/fs/devpts/xattr_security.c b/fs/devpts/xattr_security.c index b7c9b7cac1b0..4291d7b35f20 100644 --- a/fs/devpts/xattr_security.c +++ b/fs/devpts/xattr_security.c @@ -8,8 +8,6 @@ #include <linux/security.h> #include "xattr.h" -#define XATTR_SECURITY_PREFIX "security." - static size_t devpts_xattr_security_list(struct dentry *dentry, char *buffer) { diff --git a/fs/ext2/xattr_security.c b/fs/ext2/xattr_security.c index 65a97edcefce..837abd7bd1ca 100644 --- a/fs/ext2/xattr_security.c +++ b/fs/ext2/xattr_security.c @@ -10,8 +10,6 @@ #include <linux/ext2_fs.h> #include "xattr.h" -#define XATTR_SECURITY_PREFIX "security." - static size_t ext2_xattr_security_list(char *list, struct inode *inode, const char *name, int name_len) diff --git a/fs/ext3/xattr_security.c b/fs/ext3/xattr_security.c index f7488fc63400..c948effaa257 100644 --- a/fs/ext3/xattr_security.c +++ b/fs/ext3/xattr_security.c @@ -11,8 +11,6 @@ #include <linux/ext3_fs.h> #include "xattr.h" -#define XATTR_SECURITY_PREFIX "security." - static size_t ext3_xattr_security_list(char *list, struct inode *inode, const char *name, int name_len) diff --git a/include/linux/xattr.h b/include/linux/xattr.h index 9e967b58ee2e..d9c5d5c83d49 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h @@ -12,4 +12,6 @@ #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ +#define XATTR_SECURITY_PREFIX "security." + #endif /* _LINUX_XATTR_H */ diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 27b80131617b..cf1a9eca6629 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -16,10 +16,6 @@ * as published by the Free Software Foundation. */ -#define XATTR_SECURITY_PREFIX "security." -#define XATTR_SELINUX_SUFFIX "selinux" -#define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX - #include <linux/config.h> #include <linux/module.h> #include <linux/init.h> @@ -65,6 +61,9 @@ #include "objsec.h" #include "netif.h" +#define XATTR_SELINUX_SUFFIX "selinux" +#define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX + #ifdef CONFIG_SECURITY_SELINUX_DEVELOP int selinux_enforcing = 0; |
