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 show wep keys to non-root users.
details: https://anonhg.NetBSD.org/src/rev/5fe2a34887a1
branches: trunk
changeset: 494461:5fe2a34887a1
user: onoe <onoe%NetBSD.org@localhost>
date: Thu Jul 06 17:22:25 2000 +0000
description:
do not show wep keys to non-root users.
diffstat:
sys/dev/ic/awi_wicfg.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r 85a321e43b26 -r 5fe2a34887a1 sys/dev/ic/awi_wicfg.c
--- a/sys/dev/ic/awi_wicfg.c Thu Jul 06 17:17:54 2000 +0000
+++ b/sys/dev/ic/awi_wicfg.c Thu Jul 06 17:22:25 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awi_wicfg.c,v 1.2 2000/07/04 14:27:57 onoe Exp $ */
+/* $NetBSD: awi_wicfg.c,v 1.3 2000/07/06 17:22:25 onoe Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -270,6 +270,17 @@
break;
case WI_RID_DEFLT_CRYPT_KEYS:
keys = (struct wi_ltv_keys *)&wreq;
+ /* do not show keys to non-root user */
+#ifdef __FreeBSD__
+ error = suser(curproc);
+#else
+ error = suser(curproc->p_ucred, &curproc->p_acflag);
+#endif
+ if (error) {
+ memset(keys, 0, sizeof(*keys));
+ error = 0;
+ break;
+ }
for (i = 0; i < IEEE80211_WEP_NKID; i++) {
k = &keys->wi_keys[i];
keylen = sizeof(k->wi_keydat);
Home |
Main Index |
Thread Index |
Old Index