patch-2.1.100 linux/net/packet/af_packet.c
Next file: linux/net/rose/af_rose.c
Previous file: linux/net/netsyms.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Wed May 6 10:56:08 1998
- Orig file:
v2.1.99/linux/net/packet/af_packet.c
- Orig date:
Thu Mar 26 15:57:25 1998
diff -u --recursive --new-file v2.1.99/linux/net/packet/af_packet.c linux/net/packet/af_packet.c
@@ -691,7 +691,7 @@
struct sock *sk;
int err;
- if (!suser())
+ if (!capable(CAP_NET_RAW))
return -EPERM;
if (sock->type != SOCK_DGRAM && sock->type != SOCK_RAW
#ifdef CONFIG_SOCK_PACKET
@@ -1089,7 +1089,8 @@
err = get_user(pid, (int *) arg);
if (err)
return err;
- if (current->pid != pid && current->pgrp != -pid && !suser())
+ if (current->pid != pid && current->pgrp != -pid &&
+ !capable(CAP_NET_ADMIN))
return -EPERM;
sk->proc = pid;
return(0);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov