Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Feb 2003 15:12:51 -0600
From:      Kirk Strauser <kirk@strauser.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Is Apache+Perl behaving correctly?  Am I insane?
Message-ID:  <87u1eshxnw.fsf@strauser.com>
In-Reply-To: <20030225173634.GB61003@happy-idiot-talk.infracaninophi> (Matthew Seaman's message of "Tue, 25 Feb 2003 17:36:34 %2B0000")
References:  <871y1wjn6u.fsf@strauser.com> <20030225173634.GB61003@happy-idiot-talk.infracaninophi>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Transfer-Encoding: quoted-printable

At 2003-02-25T17:36:34Z, Matthew Seaman <m.seaman@infracaninophile.co.uk> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87u1eshxnw.fsf>