patch-2.3.99-pre1 linux/drivers/net/hamradio/scc.c
Next file: linux/drivers/net/hamradio/soundmodem/sm.c
Previous file: linux/drivers/net/hamradio/pt.c
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Mon Mar 13 09:50:16 2000
- Orig file:
v2.3.51/linux/drivers/net/hamradio/scc.c
- Orig date:
Wed Feb 16 17:03:52 2000
diff -u --recursive --new-file v2.3.51/linux/drivers/net/hamradio/scc.c linux/drivers/net/hamradio/scc.c
@@ -1791,7 +1791,7 @@
{
int found = 1;
- if (!suser()) return -EPERM;
+ if (!capable(CAP_SYS_RAWIO)) return -EPERM;
if (!arg) return -EFAULT;
if (Nchips >= SCC_MAXCHIPS)
@@ -1887,7 +1887,7 @@
if (cmd == SIOCSCCINI)
{
- if (!suser())
+ if (!capable(CAP_SYS_RAWIO))
return -EPERM;
if (Nchips == 0)
@@ -1904,7 +1904,7 @@
{
if (cmd == SIOCSCCCHANINI)
{
- if (!suser()) return -EPERM;
+ if (!capable(CAP_NET_ADMIN)) return -EPERM;
if (!arg) return -EINVAL;
scc->stat.bufsize = SCC_BUFSIZE;
@@ -1957,7 +1957,7 @@
return -ENOIOCTLCMD;
case SIOCSCCSMEM:
- if (!suser()) return -EPERM;
+ if (!capable(CAP_SYS_RAWIO)) return -EPERM;
if (!arg || copy_from_user(&memcfg, arg, sizeof(memcfg)))
return -EINVAL;
scc->stat.bufsize = memcfg.bufsize;
@@ -1977,13 +1977,13 @@
return 0;
case SIOCSCCSKISS:
- if (!suser()) return -EPERM;
+ if (!capable(CAP_NET_ADMIN)) return -EPERM;
if (!arg || copy_from_user(&kiss_cmd, arg, sizeof(kiss_cmd)))
return -EINVAL;
return scc_set_param(scc, kiss_cmd.command, kiss_cmd.param);
case SIOCSCCCAL:
- if (!suser()) return -EPERM;
+ if (!capable(CAP_SYS_RAWIO)) return -EPERM;
if (!arg || copy_from_user(&cal, arg, sizeof(cal)) || cal.time == 0)
return -EINVAL;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)