diff options
author | glebius <glebius@FreeBSD.org> | 2012-12-04 10:24:50 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-12-04 10:24:50 +0000 |
commit | b5d427feeaa43560621a4bd651ee2a30caeb4c74 (patch) | |
tree | e5b1e3492f34f70b4b8fec090d9686dde5107070 | |
parent | a8471d78beb78d784d4237ece85c2df6dfaaf138 (diff) | |
download | FreeBSD-src-b5d427feeaa43560621a4bd651ee2a30caeb4c74.zip FreeBSD-src-b5d427feeaa43560621a4bd651ee2a30caeb4c74.tar.gz |
No need to be root when running with -t or -d.
-rw-r--r-- | sbin/route/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index 58a92e1..2d470e1 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -365,7 +365,7 @@ flushroutes(int argc, char *argv[]) struct fibl *fl; int error; - if (uid != 0 && !debugonly) { + if (uid != 0 && !debugonly && !tflag) { errx(EX_NOPERM, "must be root to alter routing table"); } shutdown(s, SHUT_RD); /* Don't want to read back our messages */ @@ -727,7 +727,7 @@ newroute(int argc, char **argv) const char *dest, *gateway, *errmsg; int key, error, flags, nrflags, fibnum; - if (uid != 0) { + if (uid != 0 && !debugonly && !tflag) { errx(EX_NOPERM, "must be root to alter routing table"); } |