]> git.pld-linux.org Git - packages/cvs.git/blob - cvs-cvspass.patch
rel 20; rediff patches
[packages/cvs.git] / cvs-cvspass.patch
1 diff -burN cvs-1.11.21.orig/src/login.c cvs-1.11.21/src/login.c
2 --- cvs-1.11.21.orig/src/login.c        2006-01-13 23:13:53.072883256 +0100
3 +++ cvs-1.11.21/src/login.c     2006-01-13 23:15:29.033295056 +0100
4 @@ -313,9 +313,25 @@
5      fp = CVS_FOPEN (passfile, "r");
6      if (fp == NULL)
7      {
8 +         /* The password file doesn't exist yet - probably because it's
9 +         * the first time someone uses cvs login. Create it.
10 +         */
11 +        fp = CVS_FOPEN (passfile, "w");
12 +       if (fp == NULL)
13 +       {
14 +            /* Creating the password file didn't work. Bail out. */
15 +           error(0, errno, "warning: failed to open %s for writing", passfile);
16 +           goto process;
17 +       }
18 +        fclose (fp);
19 +        fp = CVS_FOPEN (passfile, "r");
20 +        if (fp == NULL)
21 +        {
22 +            /* Opening the password file didn't work. Bail out. */
23         error (0, errno, "warning: failed to open %s for reading", passfile);
24         goto process;
25      }
26 +    }
27  
28      /* Check each line to see if we have this entry already. */
29      line = 0;
This page took 0.106119 seconds and 3 git commands to generate.