From a1ee01486d4d2da0dce2fd97a58ca548a402d598 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 15 Aug 2003 20:32:22 +0000 Subject: change arguments to suser. suser now takes the process, and a flags argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@ --- sys/dev/ic/if_wi_hostap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/dev/ic/if_wi_hostap.c') diff --git a/sys/dev/ic/if_wi_hostap.c b/sys/dev/ic/if_wi_hostap.c index 0d6f069c2b1..6be36bd6e73 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.25 2003/05/16 02:30:40 millert Exp $ */ +/* $OpenBSD: if_wi_hostap.c,v 1.26 2003/08/15 20:32:17 tedu Exp $ */ /* * Copyright (c) 2002 @@ -1203,7 +1203,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data) switch (command) { case SIOCHOSTAP_DEL: - if ((error = suser(p->p_ucred, &p->p_acflag))) + if ((error = suser(p, 0))) break; if ((error = copyin(ifr->ifr_data, &reqsta, sizeof(reqsta)))) break; @@ -1247,7 +1247,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data) break; case SIOCHOSTAP_ADD: - if ((error = suser(p->p_ucred, &p->p_acflag))) + if ((error = suser(p, 0))) break; if ((error = copyin(ifr->ifr_data, &reqsta, sizeof(reqsta)))) break; @@ -1270,7 +1270,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data) break; case SIOCHOSTAP_SFLAGS: - if ((error = suser(p->p_ucred, &p->p_acflag))) + if ((error = suser(p, 0))) break; if ((error = copyin(ifr->ifr_data, &flag, sizeof(int)))) break; -- cgit v1.2.3