Hi,
about a week ago, I sent a patch to comp.software.config-mgmt.
As I did not receive any comments on it, I repost to
this list. (Note that this patch is much simpler than the
original one as, of course, the already existing global
CVS_Username can be used.)
It appears that when using pserver together with a
CVSROOT/passwd file which maps cvs users to different
UNIX user ids (i.e. with three entries per line), it
is not possible by programs called e.g. on commit
automatically to find out which _cvs_ user did the
commit. It is only possible to investigate the USER
or LOGNAME environment variables which contain the
effective (UNIX) user, the server has switched to.
With the patch, the server also defines the CVSUSER
environment variable which contains the _first_ entry
of the passwd line in the situation described above.
In other situations (two entries per line in passwd,
gserver, ...) the CVSUSER contents is the same as the
USER and LOGNAME environment variables.
Ingolf
--
Ingolf Koch ICQ#60829470 Beste Kneipe in Jena-Ost
PGP: 0x7B3B5661 213C 828E 0C92 16B5 05D0 4D5B A324 EC04
Index: server.c
===================================================================
RCS file: /home2/cvsroot/ccvs/src/server.c,v
retrieving revision 1.226
diff -c -r1.226 server.c
*** server.c 2000/04/19 16:59:01 1.226
--- server.c 2000/04/26 22:01:12
***************
*** 5178,5183 ****
--- 5178,5187 ----
env = xmalloc (sizeof "USER=" + strlen (username));
(void) sprintf (env, "USER=%s", username);
(void) putenv (env);
+
+ env = xmalloc (sizeof "CVSUSER=" + strlen (CVS_Username));
+ (void) sprintf (env, "CVSUSER=%s", CVS_Username);
+ (void) putenv (env);
}
#endif /* HAVE_PUTENV */
}