From owner-freebsd-ports@FreeBSD.ORG Mon Dec 22 22:18:27 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3246B106564A for ; Mon, 22 Dec 2008 22:18:27 +0000 (UTC) (envelope-from miwi@bsdcrew.de) Received: from bsdcrew.de (duro.unixfreunde.de [85.214.90.4]) by mx1.freebsd.org (Postfix) with ESMTP id E83DC8FC16 for ; Mon, 22 Dec 2008 22:18:26 +0000 (UTC) (envelope-from miwi@bsdcrew.de) Received: by bsdcrew.de (Postfix, from userid 1001) id 60A844ACE4; Mon, 22 Dec 2008 23:02:48 +0100 (CET) Date: Mon, 22 Dec 2008 23:02:48 +0100 From: Martin Wilke To: Ashish Shukla ???????????? ??????????????? Message-ID: <20081222220247.GB26247@bsdcrew.de> References: <86k59sou58.fsf@chateau.d.lf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline In-Reply-To: <86k59sou58.fsf@chateau.d.lf> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Ports Mailing List Subject: Re: Unable to start tor service from recent tor-devel port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 22:18:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 should be fixed now. On Tue, Dec 23, 2008 at 01:32:43AM +0530, Ashish Shukla ???????????? ??????????????? wrote: > Hi all, > > I'm having this issue with the recently upgraded security/tor-devel > (upgraded to tor-devel-0.2.1.7.a) port. I'm unable to start the tor > service using its rc.d script. > > ,---- > | % sudo /usr/local/etc/rc.d/tor start > | Password: > | Starting tor. > | Dec 23 01:18:42.779 [notice] Tor v0.2.1.7-alpha (r17216). This is experimental software. Do not rely on it for strong anonymity. (Running on FreeBSD amd64) > | Dec 23 01:18:42.784 [notice] Initialized libevent version 1.4.8-stable using method kqueue. Good. > | Dec 23 01:18:42.784 [notice] Opening OR listener on 0.0.0.0:9001 > | Dec 23 01:18:42.784 [notice] Opening Directory listener on 0.0.0.0:9030 > | Dec 23 01:18:42.785 [notice] Opening Socks listener on 127.0.0.1:9050 > | Dec 23 01:18:42.785 [notice] Opening Socks listener on 172.16.0.2:9050 > | Dec 23 01:18:42.787 [warn] Error setting configured groups: Operation not permitted > | Dec 23 01:18:42.788 [warn] Failed to parse/validate config: Problem with User value. See logs for details. > | Dec 23 01:18:42.788 [err] Reading config failed--see warnings above. > | % uname -a > | FreeBSD chateau.d.lf 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #7: Sat Nov 1 06:58:27 IST 2008 root@chateau.d.lf:/usr/obj/usr/src/sys/ULE amd64 > `---- > > It seems in above rc script, there is a transition to "_tor" uid happens > before the execution and hence this error. Following is the fix to this > issue: > > ,---- > | abbe [~] chateau% diff -u /usr/local/etc/rc.d/tor{,2} > | --- /usr/local/etc/rc.d/tor 2008-12-23 00:27:35.000000000 +0530 > | +++ /usr/local/etc/rc.d/tor2 2008-12-23 01:27:48.000000000 +0530 > | @@ -40,10 +40,15 @@ > | command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --User ${tor_user} --Log notice\ file\ ${tor_logfile}" > | extra_commands="log" > | log_cmd="${name}_log" > | +start_cmd="${name}_start" > | > | tor_log() { > | cat ${tor_logfile} > | } > | > | +tor_start() { > | + _run_rc_doit $command $command_args > | +} > | + > | run_rc_command "$1" > `---- > > So, can some tell me if this is the good fix. I will submit a PR. > > Thanks > -- > Ashish Shukla - -- +-----------------------+-------------------------------+ | PGP : 0x05682353 | Jabber : miwi(at)BSDCrew.de | | ICQ : 169139903 | Mail : miwi(at)FreeBSD.org | +-----------------------+-------------------------------+ | Mess with the Best, Die like the Rest! | +-----------------------+-------------------------------+ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAklQDocACgkQFwpycAVoI1Ov5QCfTADDClZu5TyUWTRyjzboNH9a JQ4An09fpMHWXeQturvX7yV5HZXu3THi =jdJc -----END PGP SIGNATURE-----