diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-13 15:25:59 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-13 15:25:59 +0100 |
commit | 30beab1491f0b96b2f23d3fb68af01fd921a16d8 (patch) | |
tree | c580bdc0846269fbb10feeda901ecec1a48ee2ef /fs/reiserfs/xattr_security.c | |
parent | 21af6c4f2aa5f63138871b4ddd77d7ebf2588c9d (diff) | |
parent | c32511e2718618f0b53479eb36e07439aa363a74 (diff) |
Merge with /shiny/git/linux-2.6/.git
Diffstat (limited to 'fs/reiserfs/xattr_security.c')
-rw-r--r-- | fs/reiserfs/xattr_security.c | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c index e044d511711..5e90a95ad60 100644 --- a/fs/reiserfs/xattr_security.c +++ b/fs/reiserfs/xattr_security.c @@ -9,57 +9,55 @@ #define XATTR_SECURITY_PREFIX "security." static int -security_get (struct inode *inode, const char *name, void *buffer, size_t size) +security_get(struct inode *inode, const char *name, void *buffer, size_t size) { - if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) - return -EINVAL; + if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) + return -EINVAL; - if (is_reiserfs_priv_object(inode)) - return -EPERM; + if (is_reiserfs_priv_object(inode)) + return -EPERM; - return reiserfs_xattr_get (inode, name, buffer, size); + return reiserfs_xattr_get(inode, name, buffer, size); } static int -security_set (struct inode *inode, const char *name, const void *buffer, - size_t size, int flags) +security_set(struct inode *inode, const char *name, const void *buffer, + size_t size, int flags) { - if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) - return -EINVAL; + if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) + return -EINVAL; - if (is_reiserfs_priv_object(inode)) - return -EPERM; + if (is_reiserfs_priv_object(inode)) + return -EPERM; - return reiserfs_xattr_set (inode, name, buffer, size, flags); + return reiserfs_xattr_set(inode, name, buffer, size, flags); } -static int -security_del (struct inode *inode, const char *name) +static int security_del(struct inode *inode, const char *name) { - if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) - return -EINVAL; + if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX)) + return -EINVAL; - if (is_reiserfs_priv_object(inode)) - return -EPERM; + if (is_reiserfs_priv_object(inode)) + return -EPERM; - return 0; + return 0; } static int -security_list (struct inode *inode, const char *name, int namelen, char *out) +security_list(struct inode *inode, const char *name, int namelen, char *out) { - int len = namelen; + int len = namelen; - if (is_reiserfs_priv_object(inode)) - return 0; + if (is_reiserfs_priv_object(inode)) + return 0; - if (out) - memcpy (out, name, len); + if (out) + memcpy(out, name, len); - return len; + return len; } - struct reiserfs_xattr_handler security_handler = { .prefix = XATTR_SECURITY_PREFIX, .get = security_get, |