aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wan/sbni.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-09-04 08:09:09 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-09-04 08:09:09 -0700
commit0ccd8c39bc664bf5e9fcc26caad50cc17ff866d1 (patch)
tree29cec0edf3acf18c6978b750a8d6560f445df6df /drivers/net/wan/sbni.c
parent1625324d22409e32e3f8eb86018cad72e1c09d61 (diff)
parentec0c15afb41fd9ad45b53468b60db50170e22346 (diff)
Merge branch 'linus' into x86/core
Diffstat (limited to 'drivers/net/wan/sbni.c')
-rw-r--r--drivers/net/wan/sbni.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index e59255a155a..6596cd0742b 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -1317,7 +1317,7 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
break;
case SIOCDEVRESINSTATS :
- if( current->euid != 0 ) /* root only */
+ if (!capable(CAP_NET_ADMIN))
return -EPERM;
memset( &nl->in_stats, 0, sizeof(struct sbni_in_stats) );
break;
@@ -1334,7 +1334,7 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
break;
case SIOCDEVSHWSTATE :
- if( current->euid != 0 ) /* root only */
+ if (!capable(CAP_NET_ADMIN))
return -EPERM;
spin_lock( &nl->lock );
@@ -1355,7 +1355,7 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
#ifdef CONFIG_SBNI_MULTILINE
case SIOCDEVENSLAVE :
- if( current->euid != 0 ) /* root only */
+ if (!capable(CAP_NET_ADMIN))
return -EPERM;
if (copy_from_user( slave_name, ifr->ifr_data, sizeof slave_name ))
@@ -1370,7 +1370,7 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
return enslave( dev, slave_dev );
case SIOCDEVEMANSIPATE :
- if( current->euid != 0 ) /* root only */
+ if (!capable(CAP_NET_ADMIN))
return -EPERM;
return emancipate( dev );