projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[GFS2] patch to check for recursive lock requests in gfs2_rename code path
[powerpc.git]
/
fs
/
xattr.c
diff --git
a/fs/xattr.c
b/fs/xattr.c
index
3864613
..
6645b73
100644
(file)
--- a/
fs/xattr.c
+++ b/
fs/xattr.c
@@
-9,7
+9,6
@@
*/
#include <linux/fs.h>
#include <linux/slab.h>
*/
#include <linux/fs.h>
#include <linux/slab.h>
-#include <linux/smp_lock.h>
#include <linux/file.h>
#include <linux/xattr.h>
#include <linux/namei.h>
#include <linux/file.h>
#include <linux/xattr.h>
#include <linux/namei.h>
@@
-61,8
+60,7
@@
xattr_permission(struct inode *inode, const char *name, int mask)
if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode))
return -EPERM;
if (S_ISDIR(inode->i_mode) && (inode->i_mode & S_ISVTX) &&
if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode))
return -EPERM;
if (S_ISDIR(inode->i_mode) && (inode->i_mode & S_ISVTX) &&
- (mask & MAY_WRITE) && (current->fsuid != inode->i_uid) &&
- !capable(CAP_FOWNER))
+ (mask & MAY_WRITE) && !is_owner_or_cap(inode))
return -EPERM;
}
return -EPERM;
}
@@
-269,7
+267,7
@@
sys_fsetxattr(int fd, char __user *name, void __user *value,
if (!f)
return error;
dentry = f->f_path.dentry;
if (!f)
return error;
dentry = f->f_path.dentry;
- audit_inode(NULL, dentry
->d_inode
);
+ audit_inode(NULL, dentry);
error = setxattr(dentry, name, value, size, flags);
fput(f);
return error;
error = setxattr(dentry, name, value, size, flags);
fput(f);
return error;
@@
-351,6
+349,7
@@
sys_fgetxattr(int fd, char __user *name, void __user *value, size_t size)
f = fget(fd);
if (!f)
return error;
f = fget(fd);
if (!f)
return error;
+ audit_inode(NULL, f->f_path.dentry);
error = getxattr(f->f_path.dentry, name, value, size);
fput(f);
return error;
error = getxattr(f->f_path.dentry, name, value, size);
fput(f);
return error;
@@
-423,6
+422,7
@@
sys_flistxattr(int fd, char __user *list, size_t size)
f = fget(fd);
if (!f)
return error;
f = fget(fd);
if (!f)
return error;
+ audit_inode(NULL, f->f_path.dentry);
error = listxattr(f->f_path.dentry, list, size);
fput(f);
return error;
error = listxattr(f->f_path.dentry, list, size);
fput(f);
return error;
@@
-485,7
+485,7
@@
sys_fremovexattr(int fd, char __user *name)
if (!f)
return error;
dentry = f->f_path.dentry;
if (!f)
return error;
dentry = f->f_path.dentry;
- audit_inode(NULL, dentry
->d_inode
);
+ audit_inode(NULL, dentry);
error = removexattr(dentry, name);
fput(f);
return error;
error = removexattr(dentry, name);
fput(f);
return error;