[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions on pserver authentication

From: Todd Foster
Subject: Re: Questions on pserver authentication
Date: Sat, 14 May 2005 02:43:44 +0000

Thanks Larry, that sounds like what we need to do for our environment. I just want to make sure I understand what the CVSROOT would look like without the user name.



Do you need to have extra colon's to delineate the boundaries with a blank user name or is CVS smart enough to realize there are only two parameters and use the pserver and the directory? We don't need to keep the in there for any reason, do we?


From: address@hidden (Larry Jones)
To: address@hidden (Todd Foster)
CC: address@hidden, address@hidden
Subject: Re: Questions on pserver authentication
Date: Fri, 13 May 2005 17:20:44 -0400 (EDT)

Todd Foster writes:
> I am trying to determine how pserver authentication works.  I understand
> when you do a cvs login that it creates ~/.cvspass file.  Therefore, I'm
> guessing that whenever you are running cvs commands cvs blindly combines the > USER from whichever method wins (either using the pserver info found in the > local working copy or in the $CVSROOT or in the -d) and uses the password > from the ~/.cvspass of whoever is running the commands. Is this correct?

Almost.  The .cvspass file records the entire CVSROOT specification (not
just the user name) and the corresponding password.  So, when you run a
cvs command, it looks up the actual CVSROOT (whether from the working
directory, the environment, or the command line) in .cvspass and uses
the corresponding password (or an empty string if no corresponding
password exists).

> So, if user1 goes into a cvs directory created by user2 and tries to do cvs
> commands in there, it uses the username found in the local working copy
> (user2) and combines that with ~user1/.cvspass and authentication fails.

Not necessarily, user1 could have logged in using user2's CVSROOT
setting (or copied the entry from user2's .cvspass file).  But it's a
very bad idea to share working directories -- the whole point of CVS is
to allow concurrent changes in a controlled fashion and you can very
well be making concurrent changes if you're sharing the working

> What I'm really wondering, is what does the pserver authentication do if the > username is omitted from the pserver CVSROOT, then what happens? Since it
> can't determine username from the CVSROOT, does it use the USER who is
> running the command?


> In that scenario, if user1 goes into user2's directory and does a cvs
> command, since it can't find the username in the pserver information, would
> it combine user1 with ~user1/.cvspass and work just fine?

It depends on whether the CVSROOT that's recorded in that working
directory (in CVS/Root) has a user name in it or not.

-Larry Jones

Any game without push-ups, hits, burns or noogies is a sissy game. -- Calvin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]