aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/awi/awi_wicfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/awi/awi_wicfg.c')
-rw-r--r--sys/dev/awi/awi_wicfg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/awi/awi_wicfg.c b/sys/dev/awi/awi_wicfg.c
index 80b81600fedd..639ea9bfe318 100644
--- a/sys/dev/awi/awi_wicfg.c
+++ b/sys/dev/awi/awi_wicfg.c
@@ -108,7 +108,11 @@ awi_wicfg(ifp, cmd, data)
break;
case SIOCSWAVELAN:
#ifdef __FreeBSD__
+#if __FreeBSD__ >= 5
+ error = suser(curthread);
+#else
error = suser(curproc);
+#endif
#else
error = suser(curproc->p_ucred, &curproc->p_acflag);
#endif
@@ -272,7 +276,11 @@ awi_cfgget(ifp, cmd, data)
keys = (struct wi_ltv_keys *)&wreq;
/* do not show keys to non-root user */
#ifdef __FreeBSD__
+#if __FreeBSD__ >= 5
+ error = suser(curthread);
+#else
error = suser(curproc);
+#endif
#else
error = suser(curproc->p_ucred, &curproc->p_acflag);
#endif