Hi,

Our CVS installation at cvs.perl.org is slightly broken.

I am using the CVS that comes with the latest FreeBSD (--version
says 1.11) plus the attached patch.

Some users (3 out of 7) gets (once in a while) the first two
characters of their username shopped out.

The CVS_USER_NAME variable the patch sets is okay, but the username
used in $Id:'s and such are borken. (See example below).

We use pserver for authentication. It happens both for users running
as their own user and for users mapped to another real user.

I am kinda at a loss where to even start looking, so any pointers
would be appreciated.

I looked at the change log for 1.11(.1) and I don't see anything
related, that is why I didn't try the latest version.


  Index: bar
  ===================================================================
  RCS file: /home/perlcvs/cvs-test/bar,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- bar       2001/09/18 00:24:45     1.2
  +++ bar       2001/09/18 00:25:56     1.3
  @@ -1 +1,3 @@
  -Mon Sep 17 17:25:07 PDT 2001
  +$Id: bar,v 1.3 2001/09/18 00:25:56 k Exp $
  +foo!
  +


 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/         !try; do();



*** cvs.h~      Tue Oct 31 01:37:52 2000
--- cvs.h       Fri Sep 14 07:30:25 2001
***************
*** 277,282 ****
--- 277,285 ----
  #define       CVSUMASK_ENV    "CVSUMASK"      /* Effective umask for repository */
  /* #define    CVSUMASK_DFLT              Set by options.h */
  
+ /* Client user name for the server end of client/server mode */
+ #define CVS_USER_NAME_ENV "CVS_USER_NAME"
+ 
  /*
   * If the beginning of the Repository matches the following string, strip it
   * so that the output to the logfile does not contain a full pathname.
*** main.c~     Tue Oct 31 01:37:53 2000
--- main.c      Fri Sep 14 07:32:51 2001
***************
*** 776,781 ****
--- 776,796 ----
        server_active = strcmp (command_name, "server") == 0;
  #endif
  
+       /* Set up this environment variable so that the CVSROOT/*info
+          scripts on the server can know the client's identity.
+          This is done by setting the CVS_USER_NAME environment
+          for the environment of the client to match whatever name
+          was used by the client to get at CVS (as opposed to the 
+          user ID that CVS happens to be running under).  */
+ 
+       if (!getenv(CVS_USER_NAME_ENV)) {
+         char *user = getcaller();
+         char *env = xmalloc(strlen(user) + strlen(CVS_USER_NAME_ENV +
+                                                   1 + 1));
+         (void) sprintf(env, "%s=%s", CVS_USER_NAME_ENV, user);
+         (void) putenv(env);
+       }
+ 
        /* This is only used for writing into the history file.  For
           remote connections, it might be nice to have hostname
           and/or remote path, on the other hand I'm not sure whether

Reply via email to