]> git.pld-linux.org Git - packages/cvs-nserver.git/blame - cvs-nserver-cvspass.patch
Release 36 (by relup.sh)
[packages/cvs-nserver.git] / cvs-nserver-cvspass.patch
CommitLineData
232c8587
TO
1--- cvs-nserver-1.11.1.4/src/login.c Sat May 26 16:03:39 2001
2+++ cvs-1.11.2/src/login.c Tue Dec 10 10:59:02 2002
3@@ -324,8 +329,18 @@
4 fp = CVS_FOPEN (passfile, "r");
5 if (fp == NULL)
6 {
7- error (0, errno, "failed to open %s for reading", passfile);
8- goto error_exit;
9+ /* The password file doesn't exist yet - probably because it's
10+ * the first time someone uses cvs login. Create it.
11+ */
12+ fp = CVS_FOPEN (passfile, "w");
13+ fclose (fp);
14+ fp = CVS_FOPEN (passfile, "r");
15+ if (fp == NULL)
16+ {
17+ /* Creating the password file didn't work. Bail out. */
18+ error (0, errno, "warning: failed to open %s for reading", passfile);
19+ goto process;
20+ }
21 }
22
23 cvsroot_canonical = normalize_cvsroot (root);
24@@ -380,6 +378,8 @@
25 password = xstrdup (password);
26 }
27
28+process:
29+
30 /* might as well return now */
31 if (operation == password_entry_lookup)
32 goto out;
This page took 0.092143 seconds and 4 git commands to generate.