From owner-svn-src-head@FreeBSD.ORG Tue Dec 4 10:24:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 888FE176; Tue, 4 Dec 2012 10:24:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6D1FA8FC14; Tue, 4 Dec 2012 10:24:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qB4AOpGb048258; Tue, 4 Dec 2012 10:24:51 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qB4AOpOg048257; Tue, 4 Dec 2012 10:24:51 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201212041024.qB4AOpOg048257@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 4 Dec 2012 10:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243859 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2012 10:24:51 -0000 Author: glebius Date: Tue Dec 4 10:24:50 2012 New Revision: 243859 URL: http://svnweb.freebsd.org/changeset/base/243859 Log: No need to be root when running with -t or -d. Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Tue Dec 4 09:53:09 2012 (r243858) +++ head/sbin/route/route.c Tue Dec 4 10:24:50 2012 (r243859) @@ -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"); }