projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[TCP]: fix memory leak in net/ipv4/tcp_probe.c::tcpprobe_read()
[powerpc.git]
/
security
/
commoncap.c
diff --git
a/security/commoncap.c
b/security/commoncap.c
index
8a6e097
..
f50fc29
100644
(file)
--- a/
security/commoncap.c
+++ b/
security/commoncap.c
@@
-8,7
+8,6
@@
*/
#include <linux/capability.h>
*/
#include <linux/capability.h>
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
@@
-33,9
+32,9
@@
int cap_netlink_send(struct sock *sk, struct sk_buff *skb)
EXPORT_SYMBOL(cap_netlink_send);
EXPORT_SYMBOL(cap_netlink_send);
-int cap_netlink_recv(struct sk_buff *skb)
+int cap_netlink_recv(struct sk_buff *skb
, int cap
)
{
{
- if (!cap_raised(NETLINK_CB(skb).eff_cap,
CAP_NET_ADMIN
))
+ if (!cap_raised(NETLINK_CB(skb).eff_cap,
cap
))
return -EPERM;
return 0;
}
return -EPERM;
return 0;
}
@@
-60,8
+59,8
@@
int cap_settime(struct timespec *ts, struct timezone *tz)
int cap_ptrace (struct task_struct *parent, struct task_struct *child)
{
/* Derived from arch/i386/kernel/ptrace.c:sys_ptrace. */
int cap_ptrace (struct task_struct *parent, struct task_struct *child)
{
/* Derived from arch/i386/kernel/ptrace.c:sys_ptrace. */
- if (!cap_issubset
(child->cap_permitted, cur
rent->cap_permitted) &&
- !
capable(
CAP_SYS_PTRACE))
+ if (!cap_issubset
(child->cap_permitted, pa
rent->cap_permitted) &&
+ !
__capable(parent,
CAP_SYS_PTRACE))
return -EPERM;
return 0;
}
return -EPERM;
return 0;
}