diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/acpi.c | 4 | ||||
-rw-r--r-- | sys/dev/cons.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/an.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/com.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/cy.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/if_wi.c | 26 | ||||
-rw-r--r-- | sys/dev/ic/if_wi_hostap.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/z8530tty.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/cz.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/drmP.h | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_linux.h | 4 | ||||
-rw-r--r-- | sys/dev/pv/viocon.c | 4 | ||||
-rw-r--r-- | sys/dev/sbus/magma.c | 6 | ||||
-rw-r--r-- | sys/dev/sbus/spif.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/if_umb.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/ucom.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/usb.c | 4 | ||||
-rw-r--r-- | sys/dev/vnd.c | 4 | ||||
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 4 | ||||
-rw-r--r-- | sys/dev/wscons/wskbd.c | 6 |
20 files changed, 61 insertions, 61 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 4e5fc3f7aa8..e2428a31320 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.339 2018/02/10 05:24:23 deraadt Exp $ */ +/* $OpenBSD: acpi.c,v 1.340 2018/02/19 08:59:52 mpi Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -3182,7 +3182,7 @@ acpiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) break; #ifdef HIBERNATE case APM_IOC_HIBERNATE: - if ((error = suser(p, 0)) != 0) + if ((error = suser(p)) != 0) break; if ((flag & FWRITE) == 0) { error = EBADF; diff --git a/sys/dev/cons.c b/sys/dev/cons.c index 38faa30fe09..c2837e1b394 100644 --- a/sys/dev/cons.c +++ b/sys/dev/cons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cons.c,v 1.27 2017/12/30 20:46:59 guenther Exp $ */ +/* $OpenBSD: cons.c,v 1.28 2018/02/19 08:59:52 mpi Exp $ */ /* $NetBSD: cons.c,v 1.30 1996/04/08 19:57:30 jonathan Exp $ */ /* @@ -157,7 +157,7 @@ cnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, * output from the "virtual" console. */ if (cmd == TIOCCONS && constty != NULL) { - error = suser(p, SUSER_NOACCT); + error = suser(p); if (error) return (error); constty = NULL; diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index ee4c17d3ec6..d3b9ada242c 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $OpenBSD: an.c,v 1.72 2017/01/22 10:17:37 dlg Exp $ */ +/* $OpenBSD: an.c,v 1.73 2018/02/19 08:59:52 mpi Exp $ */ /* $NetBSD: an.c,v 1.34 2005/06/20 02:49:18 atatat Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1534,7 +1534,7 @@ an_get_nwkey(struct an_softc *sc, struct ieee80211_nwkey *nwkey) if (nwkey->i_key[i].i_keydat == NULL) continue; /* do not show any keys to non-root user */ - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) break; nwkey->i_key[i].i_keylen = sc->sc_wepkeys[i].an_wep_keylen; if (nwkey->i_key[i].i_keylen < 0) { diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index e0b1087265c..2484a65b91e 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.164 2017/12/30 23:08:29 guenther Exp $ */ +/* $OpenBSD: com.c,v 1.165 2018/02/19 08:59:52 mpi Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -375,7 +375,7 @@ comopen(dev_t dev, int flag, int mode, struct proc *p) SET(tp->t_state, TS_CARR_ON); else CLR(tp->t_state, TS_CARR_ON); - } else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p, 0) != 0) + } else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p) != 0) return EBUSY; else s = spltty(); @@ -741,7 +741,7 @@ comioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) case TIOCSFLAGS: { int userbits, driverbits = 0; - error = suser(p, 0); + error = suser(p); if (error != 0) return(EPERM); diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c index dacd33b96e5..515fc23aaed 100644 --- a/sys/dev/ic/cy.c +++ b/sys/dev/ic/cy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cy.c,v 1.37 2017/09/08 05:36:52 deraadt Exp $ */ +/* $OpenBSD: cy.c,v 1.38 2018/02/19 08:59:52 mpi Exp $ */ /* * Copyright (c) 1996 Timo Rossi. * All rights reserved. @@ -360,7 +360,7 @@ cyopen(dev, flag, mode, p) SET(tp->t_state, TS_CARR_ON); else CLR(tp->t_state, TS_CARR_ON); - } else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p, 0) != 0) { + } else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p) != 0) { return (EBUSY); } else { s = spltty(); @@ -565,7 +565,7 @@ cyioctl(dev, cmd, data, flag, p) break; case TIOCSFLAGS: - error = suser(p, 0); + error = suser(p); if (error != 0) return (EPERM); diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index df0ac264b10..5451345b767 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.167 2017/01/22 10:17:38 dlg Exp $ */ +/* $OpenBSD: if_wi.c,v 1.168 2018/02/19 08:59:52 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1599,7 +1599,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data) break; case WI_RID_DEFLT_CRYPT_KEYS: /* For non-root user, return all-zeroes keys */ - if (suser(p, 0)) + if (suser(p)) bzero(wreq, sizeof(struct wi_ltv_keys)); else bcopy(&sc->wi_keys, wreq, @@ -1637,7 +1637,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data) error = copyout(wreq, ifr->ifr_data, sizeof(*wreq)); break; case SIOCSWAVELAN: - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) break; wreq = malloc(sizeof *wreq, M_DEVBUF, M_WAITOK | M_ZERO); error = copyin(ifr->ifr_data, wreq, sizeof(*wreq)); @@ -1720,7 +1720,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data) error = copyout(wreq, ifr->ifr_data, sizeof(*wreq)); break; case SIOCSPRISM2DEBUG: - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) break; wreq = malloc(sizeof *wreq, M_DEVBUF, M_WAITOK | M_ZERO); error = copyin(ifr->ifr_data, wreq, sizeof(*wreq)); @@ -1751,7 +1751,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data) } break; case SIOCS80211NWID: - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) break; nwidp = malloc(sizeof *nwidp, M_DEVBUF, M_WAITOK); error = copyin(ifr->ifr_data, nwidp, sizeof(*nwidp)); @@ -1771,7 +1771,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data) wi_init(sc); break; case SIOCS80211NWKEY: - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) break; error = wi_set_nwkey(sc, (struct ieee80211_nwkey *)data); break; @@ -1779,7 +1779,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data) error = wi_get_nwkey(sc, (struct ieee80211_nwkey *)data); break; case SIOCS80211POWER: - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) break; error = wi_set_pm(sc, (struct ieee80211_power *)data); break; @@ -1787,7 +1787,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data) error = wi_get_pm(sc, (struct ieee80211_power *)data); break; case SIOCS80211TXPOWER: - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) break; error = wi_set_txpower(sc, (struct ieee80211_txpower *)data); break; @@ -1795,7 +1795,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data) error = wi_get_txpower(sc, (struct ieee80211_txpower *)data); break; case SIOCS80211CHANNEL: - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) break; if (((struct ieee80211chanreq *)data)->i_channel > 14) { error = EINVAL; @@ -1832,7 +1832,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data) IEEE80211_ADDR_COPY(bssid->i_bssid, wreq->wi_val); break; case SIOCS80211SCAN: - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) break; if (sc->wi_ptype == WI_PORTTYPE_HOSTAP) break; @@ -1872,7 +1872,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct ieee80211_nodereq *nr = NULL; - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) break; na = (struct ieee80211_nodereq_all *)data; if (sc->wi_ptype == WI_PORTTYPE_HOSTAP) { @@ -1968,7 +1968,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data) } break; case SIOCS80211FLAGS: - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) break; if (sc->wi_ptype != WI_PORTTYPE_HOSTAP) { error = EINVAL; @@ -2916,7 +2916,7 @@ wi_get_nwkey(struct wi_softc *sc, struct ieee80211_nwkey *nwkey) nwkey->i_defkid = sc->wi_tx_key + 1; /* do not show any keys to non-root user */ - error = suser(curproc, 0); + error = suser(curproc); for (i = 0; i < IEEE80211_WEP_NKID; i++) { if (nwkey->i_key[i].i_keydat == NULL) continue; diff --git a/sys/dev/ic/if_wi_hostap.c b/sys/dev/ic/if_wi_hostap.c index 353a78aa737..64e3c10f3f5 100644 --- a/sys/dev/ic/if_wi_hostap.c +++ b/sys/dev/ic/if_wi_hostap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_hostap.c,v 1.51 2015/11/24 17:11:39 mpi Exp $ */ +/* $OpenBSD: if_wi_hostap.c,v 1.52 2018/02/19 08:59:52 mpi Exp $ */ /* * Copyright (c) 2002 @@ -1191,7 +1191,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data) switch (command) { case SIOCHOSTAP_DEL: - if ((error = suser(p, 0))) + if ((error = suser(p))) break; if ((error = copyin(ifr->ifr_data, &reqsta, sizeof(reqsta)))) break; @@ -1235,7 +1235,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data) break; case SIOCHOSTAP_ADD: - if ((error = suser(p, 0))) + if ((error = suser(p))) break; if ((error = copyin(ifr->ifr_data, &reqsta, sizeof(reqsta)))) break; @@ -1258,7 +1258,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data) break; case SIOCHOSTAP_SFLAGS: - if ((error = suser(p, 0))) + if ((error = suser(p))) break; if ((error = copyin(ifr->ifr_data, &flag, sizeof(int)))) break; diff --git a/sys/dev/ic/z8530tty.c b/sys/dev/ic/z8530tty.c index 08d513637f3..10fa788a885 100644 --- a/sys/dev/ic/z8530tty.c +++ b/sys/dev/ic/z8530tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530tty.c,v 1.29 2017/12/30 23:08:29 guenther Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.30 2018/02/19 08:59:52 mpi Exp $ */ /* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -479,7 +479,7 @@ zsopen(dev_t dev, int flags, int mode, struct proc *p) if (ISSET(tp->t_state, TS_ISOPEN) && ISSET(tp->t_state, TS_XCLUDE) && - suser(p, 0) != 0) + suser(p) != 0) return (EBUSY); s = spltty(); @@ -775,7 +775,7 @@ zsioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) break; case TIOCSFLAGS: - error = suser(p, 0); + error = suser(p); if (error) break; zst->zst_swflags = *(int *)data; diff --git a/sys/dev/pci/cz.c b/sys/dev/pci/cz.c index 3703e6aabff..a9fb72c8c71 100644 --- a/sys/dev/pci/cz.c +++ b/sys/dev/pci/cz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cz.c,v 1.20 2014/07/13 23:10:23 deraadt Exp $ */ +/* $OpenBSD: cz.c,v 1.21 2018/02/19 08:59:52 mpi Exp $ */ /* $NetBSD: cz.c,v 1.15 2001/01/20 19:10:36 thorpej Exp $ */ /*- @@ -964,7 +964,7 @@ czttyopen(dev_t dev, int flags, int mode, struct proc *p) if (ISSET(tp->t_state, TS_ISOPEN) && ISSET(tp->t_state, TS_XCLUDE) && - suser(p, 0) != 0) + suser(p) != 0) return (EBUSY); s = spltty(); @@ -1171,7 +1171,7 @@ czttyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) break; case TIOCSFLAGS: - error = suser(p, 0); + error = suser(p); if (error) break; sc->sc_swflags = *(int *)data; diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index 78e9f97bc26..8ed45e3a470 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drmP.h,v 1.216 2018/01/13 13:03:42 robert Exp $ */ +/* $OpenBSD: drmP.h,v 1.217 2018/02/19 08:59:52 mpi Exp $ */ /* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*- * Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com */ @@ -117,7 +117,7 @@ struct fb_image; #define DRM_MAXUNITS 8 /* DRM_SUSER returns true if the user is superuser */ -#define DRM_SUSER(p) (suser(p, 0) == 0) +#define DRM_SUSER(p) (suser(p) == 0) #define DRM_MTRR_WC MDF_WRITECOMBINE #define DRM_WAKEUP(x) wakeup(x) diff --git a/sys/dev/pci/drm/drm_linux.h b/sys/dev/pci/drm/drm_linux.h index 4953842f3ac..89749ddb2c6 100644 --- a/sys/dev/pci/drm/drm_linux.h +++ b/sys/dev/pci/drm/drm_linux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.h,v 1.83 2018/01/31 10:17:22 jsg Exp $ */ +/* $OpenBSD: drm_linux.h,v 1.84 2018/02/19 08:59:52 mpi Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * Copyright (c) 2017 Martin Pieuchot @@ -1773,7 +1773,7 @@ static inline int capable(int cap) { KASSERT(cap == CAP_SYS_ADMIN); - return suser(curproc, 0); + return suser(curproc); } typedef int pgprot_t; diff --git a/sys/dev/pv/viocon.c b/sys/dev/pv/viocon.c index bc1eb93c0b7..1ff2b847d2d 100644 --- a/sys/dev/pv/viocon.c +++ b/sys/dev/pv/viocon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viocon.c,v 1.2 2017/05/30 17:47:11 krw Exp $ */ +/* $OpenBSD: viocon.c,v 1.3 2018/02/19 08:59:52 mpi Exp $ */ /* * Copyright (c) 2013-2015 Stefan Fritsch <sf@sfritsch.de> @@ -528,7 +528,7 @@ vioconopen(dev_t dev, int flag, int mode, struct proc *p) ttsetwater(tp); splx(s); } - else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p, 0) != 0) { + else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p) != 0) { return (EBUSY); } diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c index 22f9fe69683..0ecd08fef15 100644 --- a/sys/dev/sbus/magma.c +++ b/sys/dev/sbus/magma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magma.c,v 1.27 2017/12/30 23:08:29 guenther Exp $ */ +/* $OpenBSD: magma.c,v 1.28 2018/02/19 08:59:52 mpi Exp $ */ /*- * Copyright (c) 1998 Iain Hibbert @@ -892,7 +892,7 @@ mttyopen(dev_t dev, int flags, int mode, struct proc *p) SET(tp->t_state, TS_CARR_ON); else CLR(tp->t_state, TS_CARR_ON); - } else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p, 0) != 0) { + } else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p) != 0) { return (EBUSY); /* superuser can break exclusive access */ } else { s = spltty(); @@ -1054,7 +1054,7 @@ mttyioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) break; case TIOCSFLAGS: - if (suser(p, 0)) + if (suser(p)) error = EPERM; else mp->mp_openflags = *((int *)data) & diff --git a/sys/dev/sbus/spif.c b/sys/dev/sbus/spif.c index 8f6c242f09e..2c2f0115070 100644 --- a/sys/dev/sbus/spif.c +++ b/sys/dev/sbus/spif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spif.c,v 1.20 2017/12/30 23:08:29 guenther Exp $ */ +/* $OpenBSD: spif.c,v 1.21 2018/02/19 08:59:52 mpi Exp $ */ /* * Copyright (c) 1999-2002 Jason L. Wright (jason@thought.net) @@ -390,7 +390,7 @@ sttyopen(dev, flags, mode, p) else CLR(tp->t_state, TS_CARR_ON); } - else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p, 0) != 0) { + else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p) != 0) { return (EBUSY); } else { s = spltty(); @@ -505,7 +505,7 @@ sttyioctl(dev, cmd, data, flags, p) *((int *)data) = sp->sp_openflags; break; case TIOCSFLAGS: - if (suser(p, 0)) + if (suser(p)) error = EPERM; else sp->sp_openflags = *((int *)data) & diff --git a/sys/dev/usb/if_umb.c b/sys/dev/usb/if_umb.c index b2571c969df..36b15d3da6d 100644 --- a/sys/dev/usb/if_umb.c +++ b/sys/dev/usb/if_umb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_umb.c,v 1.17 2017/10/23 15:23:13 gerhard Exp $ */ +/* $OpenBSD: if_umb.c,v 1.18 2018/02/19 08:59:52 mpi Exp $ */ /* * Copyright (c) 2016 genua mbH @@ -698,7 +698,7 @@ umb_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) sizeof (sc->sc_info)); break; case SIOCSUMBPARAM: - if ((error = suser(p, 0)) != 0) + if ((error = suser(p)) != 0) break; if ((error = copyin(ifr->ifr_data, &mp, sizeof (mp))) != 0) break; diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 88aa365399c..4e6c9e87583 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ucom.c,v 1.66 2017/12/30 23:08:29 guenther Exp $ */ +/* $OpenBSD: ucom.c,v 1.67 2018/02/19 08:59:52 mpi Exp $ */ /* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */ /* @@ -469,7 +469,7 @@ ucom_do_open(dev_t dev, int flag, int mode, struct proc *p) SET(tp->t_state, TS_CARR_ON); else CLR(tp->t_state, TS_CARR_ON); - } else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p, 0) != 0) + } else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p) != 0) return (EBUSY); else s = spltty(); @@ -713,7 +713,7 @@ ucom_do_ioctl(struct ucom_softc *sc, u_long cmd, caddr_t data, break; case TIOCSFLAGS: - error = suser(p, 0); + error = suser(p); if (error) break; sc->sc_swflags = *(int *)data; diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index a9b530ee65d..0320d153835 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb.c,v 1.115 2018/02/03 13:37:37 mpi Exp $ */ +/* $OpenBSD: usb.c,v 1.116 2018/02/19 08:59:52 mpi Exp $ */ /* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */ /* @@ -598,7 +598,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p) #ifdef USB_DEBUG case USB_SETDEBUG: /* only root can access to these debug flags */ - if ((error = suser(curproc, 0)) != 0) + if ((error = suser(curproc)) != 0) return (error); if (!(flag & FWRITE)) return (EBADF); diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 7fbb5107c4e..d9559ddda91 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.166 2017/12/30 23:08:29 guenther Exp $ */ +/* $OpenBSD: vnd.c,v 1.167 2018/02/19 08:59:52 mpi Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -404,7 +404,7 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) DNPRINTF(VDB_FOLLOW, "vndioctl(%x, %lx, %p, %x, %p): unit %d\n", dev, cmd, addr, flag, p, unit); - error = suser(p, 0); + error = suser(p); if (error) return (error); if (unit >= numvnd) diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index 35cfff6454e..b713695a916 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.130 2018/01/17 16:54:19 fcambus Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.131 2018/02/19 08:59:52 mpi Exp $ */ /* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */ /* @@ -859,7 +859,7 @@ wsdisplayopen(dev_t dev, int flag, int mode, struct proc *p) wsdisplayparam(tp, &tp->t_termios); ttsetwater(tp); } else if ((tp->t_state & TS_XCLUDE) != 0 && - suser(p, 0) != 0) + suser(p) != 0) return (EBUSY); tp->t_state |= TS_CARR_ON; diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c index 304d5a92057..07d56e9b787 100644 --- a/sys/dev/wscons/wskbd.c +++ b/sys/dev/wscons/wskbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbd.c,v 1.89 2018/01/22 12:20:54 fcambus Exp $ */ +/* $OpenBSD: wskbd.c,v 1.90 2018/02/19 08:59:52 mpi Exp $ */ /* $NetBSD: wskbd.c,v 1.80 2005/05/04 01:52:16 augustss Exp $ */ /* @@ -1060,7 +1060,7 @@ getbell: return (0); case WSKBDIO_SETDEFAULTBELL: - if ((error = suser(p, 0)) != 0) + if ((error = suser(p)) != 0) return (error); kbdp = &wskbd_default_bell_data; goto setbell; @@ -1096,7 +1096,7 @@ getkeyrepeat: return (0); case WSKBDIO_SETDEFAULTKEYREPEAT: - if ((error = suser(p, 0)) != 0) + if ((error = suser(p)) != 0) return (error); kkdp = &wskbd_default_keyrepeat_data; goto setkeyrepeat; |