On Sun, 9 Feb 2003, Darren Honeyball wrote:
>Yes...
>Still fails...

Could you try this patch as an experiment?

diff -u -r1.13 authenticate.cc
--- src/authenticate.cc 8 Feb 2003 13:11:32 -0000       1.13
+++ src/authenticate.cc 9 Feb 2003 11:04:55 -0000
@@ -69,14 +69,21 @@
   globalconfig.setSection("depot");
   authpenalty = globalconfig["authpenalty"];

+  char *a = strdup(("BINC_USERID=" + username).c_str());
+  char *b = strdup(("BINC_PASSWD=" + password).c_str());
+
   // prepare userid and password for authentication module
-  if ((setenv("BINC_USERID", username.c_str(), 1) == -1)
-      || (setenv("BINC_PASSWD", password.c_str(), 1) == -1)) {
+  if ((putenv(a) == -1) || (putenv(b) == -1)) {
     logger << "LOGIN/AUTHENTICATE broke for <"
           << username << ">, setenv failed."
         << endl;
+    delete a;
+    delete b;
     return 1;
   }
+
+  delete a;
+  delete b;

   // set up intercom between us and the authentication module
   int intercom[2];

Reply via email to