Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic do not allow non-priviledged user to change nwid ...
details: https://anonhg.NetBSD.org/src/rev/0b2a3663d510
branches: trunk
changeset: 494669:0b2a3663d510
user: onoe <onoe%NetBSD.org@localhost>
date: Mon Jul 10 14:36:17 2000 +0000
description:
do not allow non-priviledged user to change nwid via ifconfig.
diffstat:
sys/dev/ic/awi.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r 354b2bbbf958 -r 0b2a3663d510 sys/dev/ic/awi.c
--- a/sys/dev/ic/awi.c Mon Jul 10 13:54:54 2000 +0000
+++ b/sys/dev/ic/awi.c Mon Jul 10 14:36:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awi.c,v 1.22 2000/07/10 12:32:53 onoe Exp $ */
+/* $NetBSD: awi.c,v 1.23 2000/07/10 14:36:17 onoe Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -520,6 +520,13 @@
ifp->if_mtu = ifr->ifr_mtu;
break;
case SIOCS80211NWID:
+#ifdef __FreeBSD__
+ error = suser(curproc);
+#else
+ error = suser(curproc->p_ucred, &curproc->p_acflag);
+#endif
+ if (error)
+ break;
error = copyin(ifr->ifr_data, &nwid, sizeof(nwid));
if (error)
break;
Home |
Main Index |
Thread Index |
Old Index