diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-10 08:05:45 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-10 08:05:45 -0400 |
commit | 3ce9bcb583536c45a46c7302747029450e22279c (patch) | |
tree | 7a4167189ffc6dc909151d1a5d040f9f0656a9f4 /drivers/net/wan/sbni.c | |
parent | 26fd10517e810dd59ea050b052de24a75ee6dc07 (diff) | |
parent | f7d0b926ac8c8ec0c7a83ee69409bd2e6bb39f81 (diff) |
Merge branch 'core/xen' into x86/xen
Diffstat (limited to 'drivers/net/wan/sbni.c')
-rw-r--r-- | drivers/net/wan/sbni.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index e59255a155a9..6596cd0742b9 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 ) | |||
1317 | break; | 1317 | break; |
1318 | 1318 | ||
1319 | case SIOCDEVRESINSTATS : | 1319 | case SIOCDEVRESINSTATS : |
1320 | if( current->euid != 0 ) /* root only */ | 1320 | if (!capable(CAP_NET_ADMIN)) |
1321 | return -EPERM; | 1321 | return -EPERM; |
1322 | memset( &nl->in_stats, 0, sizeof(struct sbni_in_stats) ); | 1322 | memset( &nl->in_stats, 0, sizeof(struct sbni_in_stats) ); |
1323 | break; | 1323 | break; |
@@ -1334,7 +1334,7 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd ) | |||
1334 | break; | 1334 | break; |
1335 | 1335 | ||
1336 | case SIOCDEVSHWSTATE : | 1336 | case SIOCDEVSHWSTATE : |
1337 | if( current->euid != 0 ) /* root only */ | 1337 | if (!capable(CAP_NET_ADMIN)) |
1338 | return -EPERM; | 1338 | return -EPERM; |
1339 | 1339 | ||
1340 | spin_lock( &nl->lock ); | 1340 | spin_lock( &nl->lock ); |
@@ -1355,7 +1355,7 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd ) | |||
1355 | #ifdef CONFIG_SBNI_MULTILINE | 1355 | #ifdef CONFIG_SBNI_MULTILINE |
1356 | 1356 | ||
1357 | case SIOCDEVENSLAVE : | 1357 | case SIOCDEVENSLAVE : |
1358 | if( current->euid != 0 ) /* root only */ | 1358 | if (!capable(CAP_NET_ADMIN)) |
1359 | return -EPERM; | 1359 | return -EPERM; |
1360 | 1360 | ||
1361 | if (copy_from_user( slave_name, ifr->ifr_data, sizeof slave_name )) | 1361 | 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 ) | |||
1370 | return enslave( dev, slave_dev ); | 1370 | return enslave( dev, slave_dev ); |
1371 | 1371 | ||
1372 | case SIOCDEVEMANSIPATE : | 1372 | case SIOCDEVEMANSIPATE : |
1373 | if( current->euid != 0 ) /* root only */ | 1373 | if (!capable(CAP_NET_ADMIN)) |
1374 | return -EPERM; | 1374 | return -EPERM; |
1375 | 1375 | ||
1376 | return emancipate( dev ); | 1376 | return emancipate( dev ); |