Roland Jesse <[EMAIL PROTECTED]> wrote:
>
>Well, in case I don't get you wrong, that's not my point. The name of the
>user checking in a file changes. And the log email should always list the
>user (out of CVSROOT/passwd) who checked something in.
OK, let my clarify en detail what's going on.
You have a pserver running as "cvsiti". "cvsiti" will be the owner
of the Unix process doing the checkin. "cvsiti" will do the checkin.
"cvsiti" can not change its identity to some other Unix account.
A root pserver could and would do so, after doing the appropriate
password checks.
While the "cvsiti" pserver cannot change its identity, it can (and does)
check incoming name/pwd cvs logins for correctness and then continue
to do cvs actions still under its "cvsiti" identity. Meaning:
file access rights will be checked against "cvsiti" capabilities,
CPU and disk usage will be billed to the "cvsiti" account, and
it would be foolish to have the environment variable USER to be
anything else than "cvsiti".
All this notwithstanding the fact that you logged in with a "roland"
name and a matching password. That makes it legitimate to say
that "cvsiti" is acting "on behalf of roland" -- but it still is
"cvsiti". (Again, a root pserver would have switched the identity;
and would, after successful password verification, really continue
as another user (some mortal unix account).)
The cvs pserver does quite a good job of tracking "on whose behalf"
it is acting. For example, a the "cvs log" command will reflect
the "roland" name, not "cvsiti". However, while internally all
is swell, the difference between "external cvs user name" and
"process owner" is not reflected externally. Which makes it
really difficult in the external scripts such as loginfo scripts
to make that distinction.
Hence my little patch setting $CVS_USERNAME (roland) in addition
to $USER (cvsiti). I know I wasn't the first one code that extension.
I think it was on the cvs-devlopers list where I read just a few
ago somebody else having done it.
>As the followup messages in the thread show, a switch to the current
>version of log_accum.pl is supposed to do the trick.
Nope. I take it you are referring to Larry Jones' followup and
that he in turn refers to the change committed to log[_accum].pl
2000-02-25 by scjones.
That change merely makes log[_accum].pl a tad it more flexible.
It allows the caller of the log.pl script to pass the alleged user
name, as opposed to before where log.pl would insist on determing
that by its own devices. The problem remains for you to figure
out "the user (out of CVSROOT/passwd) who checked something in,"
as you said above. Accessing $USER won't do because that will be
-tada!- "cvsiti".
Martin