]>
Commit | Line | Data |
---|---|---|
1 | --- cvs-1.11.1p1/src/login.c.bero Tue Jul 31 18:12:58 2001 | |
2 | +++ cvs-1.11.1p1/src/login.c Tue Jul 31 18:17:32 2001 | |
3 | @@ -322,8 +322,18 @@ | |
4 | fp = CVS_FOPEN (passfile, "r"); | |
5 | if (fp == NULL) | |
6 | { | |
7 | - error (0, errno, "warning: failed to open %s for reading", passfile); | |
8 | - goto process; | |
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); |