Could someone tell me exactly what the "pserver" mode is, in regards to CVS? The term "pserver" is used frequently, but I've yet to find an explanation of what it actually is. If "pserver" is a special mode, then I assume there is a default mode as well. If so, what is the difference between the two?
pserver
is a method for giving remote access to CVS repository. Basically you run cvs
as a server listening on port 2401.
The "default" mode would be local access, where a developer has an account on the system hosting the CVS repository and accesses its directory and files directly. So for a local repository CVSROOT
would just be directory:
CVSROOT=/opt/path/to/my/repo
Although, if you like you can explicitly state this this is a local
respository:
CVSROOT=:local:/opt/path/to/my/repo
For a pserver
connection we have to specify some more, the host the repository is running on, our username, and the path to the repo on that host:
CVSROOT=:pserver:username@hostname:/opt/path/to/my/repo
A better mode for remote access for a CVS repository would be ext
which can used to access a repository via SSH.
CVSROOT=:ext:username@hostname:/opt/path/to/my/repo
CVS_RSH=ssh
It's an insecure way to remotely access a CVS repository that's great for anonymous access.
cvs runs as a server. Nowadays on a typical linux (probably on unices too) that means it is present in the file inetd.conf.
Now there is the all important CVSROOT, that is a directory used to store cvs archives e.g.
export CVSROOT=/usr/local/cvsroot
Because of the client-server architecture this CVSROOT can be situated at a different machine and you need to have an account on that machine to access it:
export CVSROOT=:sparc:/usr/local/cvsroot
You're prompted for a user name and a password, for :albert@sparc: only for a password. This you probably already know.
In practical situation (like with a dedicated cvs-server) you don't want user accounts for the server with access to cvs-files. You want the cvs files owned by a user cvs (maybe with tight privileges) and no users running shells on your servers. The person who administrates cvs-users is probably less knowledgeable and less trusted than the system-administrator of the server.
A pserver is also a service, present in the inetd.conf of the cvs-server. It intercepts the communication to cvs and always runs as the cvs user (or what you've told in the inetd.conf). Then it does an authenciation using a separate passwd file. If you manage to log in with a username and password from this file, pserver takes care that your cvs commands are executed using the privileges of the cvs user.
© 2022 - 2024 — McMap. All rights reserved.