summaryrefslogtreecommitdiff
path: root/sys/net/rtsock.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2001-09-20 08:25:25 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2001-09-20 08:25:25 +0000
commitdadb6c3bb0007be70fa6be26be3c59ea52f53b45 (patch)
tree23d598a48ef130877069efaca6b7d01738c74b39 /sys/net/rtsock.c
parent68176c8544c33641cd4133179a40f1db398c47c2 (diff)
Notes
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r--sys/net/rtsock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index e7f3a2c4dd95..46adc0a242fe 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -331,8 +331,8 @@ route_output(m, so)
* Verify that the caller has the appropriate privilege; RTM_GET
* is the only operation the non-superuser is allowed.
*/
- if (rtm->rtm_type != RTM_GET && suser_xxx(so->so_cred, NULL, 0) != 0)
- senderr(EPERM);
+ if (rtm->rtm_type != RTM_GET && (error = suser(curproc)) != 0)
+ senderr(error);
switch (rtm->rtm_type) {