--- cvs-1.11.1p1/src/login.c.bero Tue Jul 31 18:12:58 2001 +++ cvs-1.11.1p1/src/login.c Tue Jul 31 18:17:32 2001 @@ -322,8 +322,18 @@ fp = CVS_FOPEN (passfile, "r"); if (fp == NULL) { - error (0, errno, "warning: failed to open %s for reading", passfile); - goto process; + /* The password file doesn't exist yet - probably because it's + * the first time someone uses cvs login. Create it. + */ + fp = CVS_FOPEN (passfile, "w"); + fclose (fp); + fp = CVS_FOPEN (passfile, "r"); + if (fp == NULL) + { + /* Creating the password file didn't work. Bail out. */ + error (0, errno, "warning: failed to open %s for reading", passfile); + goto process; + } } cvsroot_canonical = normalize_cvsroot (root);