bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accept old ~/.cvspass


From: 鯉江英隆
Subject: Accept old ~/.cvspass
Date: Thu, 19 Oct 2000 16:22:56 +0900

Because the current cvs normalizes CVSROOT,
~/.cvspass which is created by old cvs is never selected.
The following patch is for trying to match non-normalized CVSROOT.

Index: login.c
===================================================================
RCS file: /home2/cvsroot/ccvs/src/login.c,v
retrieving revision 1.59
diff -p -u -b -B -r1.59 login.c
--- login.c     2000/10/17 18:42:28     1.59
+++ login.c     2000/10/19 07:14:51
@@ -374,6 +374,21 @@ get_cvs_password ()
            break;
         }
     }
+    if (!found_it)
+    {
+        /* Fallback */
+        rewind(fp);
+        root_len = strlen (CVSroot_original);
+        while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
+        {
+            if (strncmp (CVSroot_original, linebuf, root_len) == 0)
+            {
+                /* This is it!  So break out and deal with linebuf. */
+                found_it = 1;
+                break;
+            }
+        }
+    }
     if (line_length < 0 && !feof (fp))
        error (0, errno, "cannot read %s", passfile);
     if (fclose (fp) < 0)

--
KOIE Hidetaka <hide@koie.org>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]