diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-29 00:47:18 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-29 00:47:18 -0500 |
commit | 0a8c5395f90f06d128247844b2515c8bf3f2826b (patch) | |
tree | d95382dcdfa303b99d480c01763d6cb6767fdaca /fs/fcntl.c | |
parent | 25051158bbed127e8672b43396c71c5eb610e5f1 (diff) | |
parent | 3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff) |
[XFS] Fix merge failures
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
fs/xfs/linux-2.6/xfs_cred.h
fs/xfs/linux-2.6/xfs_globals.h
fs/xfs/linux-2.6/xfs_ioctl.c
fs/xfs/xfs_vnodeops.h
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r-- | fs/fcntl.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c index 549daf8005fb..cdc141946724 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c | |||
@@ -212,13 +212,14 @@ static void f_modown(struct file *filp, struct pid *pid, enum pid_type type, | |||
212 | int __f_setown(struct file *filp, struct pid *pid, enum pid_type type, | 212 | int __f_setown(struct file *filp, struct pid *pid, enum pid_type type, |
213 | int force) | 213 | int force) |
214 | { | 214 | { |
215 | const struct cred *cred = current_cred(); | ||
215 | int err; | 216 | int err; |
216 | 217 | ||
217 | err = security_file_set_fowner(filp); | 218 | err = security_file_set_fowner(filp); |
218 | if (err) | 219 | if (err) |
219 | return err; | 220 | return err; |
220 | 221 | ||
221 | f_modown(filp, pid, type, current->uid, current->euid, force); | 222 | f_modown(filp, pid, type, cred->uid, cred->euid, force); |
222 | return 0; | 223 | return 0; |
223 | } | 224 | } |
224 | EXPORT_SYMBOL(__f_setown); | 225 | EXPORT_SYMBOL(__f_setown); |
@@ -407,10 +408,17 @@ static const long band_table[NSIGPOLL] = { | |||
407 | static inline int sigio_perm(struct task_struct *p, | 408 | static inline int sigio_perm(struct task_struct *p, |
408 | struct fown_struct *fown, int sig) | 409 | struct fown_struct *fown, int sig) |
409 | { | 410 | { |
410 | return (((fown->euid == 0) || | 411 | const struct cred *cred; |
411 | (fown->euid == p->suid) || (fown->euid == p->uid) || | 412 | int ret; |
412 | (fown->uid == p->suid) || (fown->uid == p->uid)) && | 413 | |
413 | !security_file_send_sigiotask(p, fown, sig)); | 414 | rcu_read_lock(); |
415 | cred = __task_cred(p); | ||
416 | ret = ((fown->euid == 0 || | ||
417 | fown->euid == cred->suid || fown->euid == cred->uid || | ||
418 | fown->uid == cred->suid || fown->uid == cred->uid) && | ||
419 | !security_file_send_sigiotask(p, fown, sig)); | ||
420 | rcu_read_unlock(); | ||
421 | return ret; | ||
414 | } | 422 | } |
415 | 423 | ||
416 | static void send_sigio_to_task(struct task_struct *p, | 424 | static void send_sigio_to_task(struct task_struct *p, |