Go to the first, previous, next, last section, table of contents.


Setting up server

You now have to setup the wrapper script that would handle the virtual users' access to the repository. Here is its sample contents:

#! /bin/sh
CVSPASSWD=/usr/bin/cvspasswd \
exec /usr/bin/cvs-pserver /repos1 -- \
/usr/bin/cvschkpw /usr/bin/cvs pserver

The `CVSPASSWD=/usr/bin/cvspasswd' part means that the `/usr/bin/cvspasswd' program would be used to let ordinary users change their passwords (using newer CVS clients) (see section Changing passwords in virtual repository). In a rare event when you don't want or don't need to let your users change their passwords, simply remove that line.

The `/usr/bin/cvs-pserver' is the protocol wrapper for the `:pserver:' protocol. It takes a list of repositories being served: here there is only a single repository, `/repos1', and the end-of-list marker, `--'.

Next line specifies the appropriate checkpassword-style program to use, that is, `/usr/bin/cvschkpw'. This program uses the `CVSROOT/cvspasswd' file for authentication, and switches to the system user specified there.

Finally, after the `cvschkpw' successfully authenticated user, it executes the CVS binary itself: `/usr/bin/cvs pserver'.

Suppose that wrapper script mentioned above is written to the `repos1-pserver.sh' file in the `/usr/local/bin/' directory. Make this file executable with `chmod +x', and edit the `/etc/inetd.conf' (or appropriate configuration file, if you are using the `inetd' replacement). You should add a line to this file, unless it already exists:

cvspserver  stream  tcp  nowait root /usr/local/bin/repos1-pserver cvs

After that, make your `inetd' to re-read its configuration file. Now, the `inetd' will listen on port specified by the `cvspserver' service (port 2401 by default), and run the wrapper script, when new connections arrive.


Go to the first, previous, next, last section, table of contents.