From owner-freebsd-questions Tue Feb 25 13:12:59 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A75637B401 for ; Tue, 25 Feb 2003 13:12:58 -0800 (PST) Received: from kanga.honeypot.net (kanga.honeypot.net [208.162.254.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id F268F43FBF for ; Tue, 25 Feb 2003 13:12:56 -0800 (PST) (envelope-from kirk@strauser.com) Received: from pooh.strauser.com (kirk@pooh.honeypot.net [10.0.5.128]) by kanga.honeypot.net (8.12.7/8.12.7) with ESMTP id h1PLCtxc044975 for ; Tue, 25 Feb 2003 15:12:55 -0600 (CST) (envelope-from kirk@strauser.com) To: freebsd-questions@freebsd.org Subject: Re: Is Apache+Perl behaving correctly? Am I insane? From: Kirk Strauser Date: Tue, 25 Feb 2003 15:12:51 -0600 In-Reply-To: <20030225173634.GB61003@happy-idiot-talk.infracaninophi> (Matthew Seaman's message of "Tue, 25 Feb 2003 17:36:34 +0000") Message-ID: <87u1eshxnw.fsf@strauser.com> Lines: 19 X-Mailer: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 References: <871y1wjn6u.fsf@strauser.com> <20030225173634.GB61003@happy-idiot-talk.infracaninophi> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=-=-= Content-Transfer-Encoding: quoted-printable At 2003-02-25T17:36:34Z, Matthew Seaman w= rites: > The problem is the getlogin(2) call. getlogin(2) tells you who the > current user logged in as, which, given intervening calls to functions > like setruid(3), setuid(2) or seteuid(2) is not necessarily the same thing > as the uid running the process. Actually, the problem I was encountering turned out to be even more annoying, involving some subtle interaction between mod_perl, Apache, and rcs. Apparently rcs looks at $LOGNAME to determine what user to lock files as. Since that variable wasn't explicitly set anywhere in Apache's environment, rcs decided to go with getlogin() or similar. The solution was to export $ENV{'LOGNAME'} =3D 'www', as per: http://twiki.org/cgi-bin/view/Codev/RcsNonStrictLocking =2D-=20 Kirk Strauser In Googlis non est, ergo non est. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA+W9xX5sRg+Y0CpvERAoE5AKCgDLp2v15XH2UO3DJJqtdnbLo8oQCghaZK gIEezi1FDZyuKnKCb7uwB2Y= =UCqY -----END PGP SIGNATURE----- --=-=-=-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message