diff options
| author | David Woodhouse <dwmw2@infradead.org> | 2007-04-26 04:31:28 -0400 |
|---|---|---|
| committer | David Woodhouse <dwmw2@infradead.org> | 2007-04-26 04:31:28 -0400 |
| commit | ef2e58ea6b9931c3a4816c66593da49bb20e3b24 (patch) | |
| tree | ce7432add3becbe78de4ea06425cd2d9e91f4ada /security/selinux/hooks.c | |
| parent | 06d63cc51d47f572009138a7f3ac34d95773405d (diff) | |
| parent | de46c33745f5e2ad594c72f2cf5f490861b16ce1 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'security/selinux/hooks.c')
| -rw-r--r-- | security/selinux/hooks.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 19a385e9968e..d41e24d6ae41 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
| @@ -4468,11 +4468,12 @@ static void selinux_d_instantiate (struct dentry *dentry, struct inode *inode) | |||
| 4468 | } | 4468 | } |
| 4469 | 4469 | ||
| 4470 | static int selinux_getprocattr(struct task_struct *p, | 4470 | static int selinux_getprocattr(struct task_struct *p, |
| 4471 | char *name, void *value, size_t size) | 4471 | char *name, char **value) |
| 4472 | { | 4472 | { |
| 4473 | struct task_security_struct *tsec; | 4473 | struct task_security_struct *tsec; |
| 4474 | u32 sid; | 4474 | u32 sid; |
| 4475 | int error; | 4475 | int error; |
| 4476 | unsigned len; | ||
| 4476 | 4477 | ||
| 4477 | if (current != p) { | 4478 | if (current != p) { |
| 4478 | error = task_has_perm(current, p, PROCESS__GETATTR); | 4479 | error = task_has_perm(current, p, PROCESS__GETATTR); |
| @@ -4500,7 +4501,10 @@ static int selinux_getprocattr(struct task_struct *p, | |||
| 4500 | if (!sid) | 4501 | if (!sid) |
| 4501 | return 0; | 4502 | return 0; |
| 4502 | 4503 | ||
| 4503 | return selinux_getsecurity(sid, value, size); | 4504 | error = security_sid_to_context(sid, value, &len); |
| 4505 | if (error) | ||
| 4506 | return error; | ||
| 4507 | return len; | ||
| 4504 | } | 4508 | } |
| 4505 | 4509 | ||
| 4506 | static int selinux_setprocattr(struct task_struct *p, | 4510 | static int selinux_setprocattr(struct task_struct *p, |
