diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-07-13 23:09:23 +0100 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-07-13 23:09:23 +0100 |
commit | c514720716c7b109ff980f8b3cb93f9af872c91c (patch) | |
tree | 490a9578995705de69712893a190b67651bddc56 /fs/reiserfs/xattr_security.c | |
parent | 07929dcb963786512c760dd3ecd148d89295e7e5 (diff) | |
parent | 1e279dd855d15b72364b4103f872d67d8592647e (diff) | |
download | linux-c514720716c7b109ff980f8b3cb93f9af872c91c.tar.gz linux-c514720716c7b109ff980f8b3cb93f9af872c91c.tar.xz |
Automatic merge with /usr/src/ntfs-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 e044d5117117..5e90a95ad60b 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, |