Commit 7a125767 authored by Jeff Garzik's avatar Jeff Garzik

s/suser/capable/ cleanup for the LMC WAN driver.

Contributed by one of the kernel janitors.
parent 8d6e369a
...@@ -175,7 +175,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/ ...@@ -175,7 +175,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
case LMCIOCSINFO: /*fold01*/ case LMCIOCSINFO: /*fold01*/
sp = &((struct ppp_device *) dev)->sppp; sp = &((struct ppp_device *) dev)->sppp;
if (!suser ()) { if (!capable(CAP_NET_ADMIN)) {
ret = -EPERM; ret = -EPERM;
break; break;
} }
...@@ -210,7 +210,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/ ...@@ -210,7 +210,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
u_int16_t old_type = sc->if_type; u_int16_t old_type = sc->if_type;
u_int16_t new_type; u_int16_t new_type;
if (!suser ()) { if (!capable(CAP_NET_ADMIN)) {
ret = -EPERM; ret = -EPERM;
break; break;
} }
...@@ -290,7 +290,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/ ...@@ -290,7 +290,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
break; break;
case LMCIOCCLEARLMCSTATS: /*fold01*/ case LMCIOCCLEARLMCSTATS: /*fold01*/
if (!suser ()){ if (!capable(CAP_NET_ADMIN)){
ret = -EPERM; ret = -EPERM;
break; break;
} }
...@@ -304,7 +304,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/ ...@@ -304,7 +304,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
break; break;
case LMCIOCSETCIRCUIT: /*fold01*/ case LMCIOCSETCIRCUIT: /*fold01*/
if (!suser ()){ if (!capable(CAP_NET_ADMIN)){
ret = -EPERM; ret = -EPERM;
break; break;
} }
...@@ -322,7 +322,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/ ...@@ -322,7 +322,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
break; break;
case LMCIOCRESET: /*fold01*/ case LMCIOCRESET: /*fold01*/
if (!suser ()){ if (!capable(CAP_NET_ADMIN)){
ret = -EPERM; ret = -EPERM;
break; break;
} }
...@@ -355,7 +355,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/ ...@@ -355,7 +355,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
{ {
struct lmc_xilinx_control xc; /*fold02*/ struct lmc_xilinx_control xc; /*fold02*/
if (!suser ()){ if (!capable(CAP_NET_ADMIN)){
ret = -EPERM; ret = -EPERM;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment