1 --- cvs-1.11.1p1.org/src/login.c Thu Sep 6 18:18:29 2001
2 +++ cvs-1.11.1p1/src/login.c Wed Dec 11 15:19:42 2002
4 * Allow user to log in for an authenticating server.
14 #ifndef CVS_PASSWORD_FILE
15 -#define CVS_PASSWORD_FILE ".cvspass"
16 +#define CVS_PASSWORD_FILE "cvspass"
19 /* If non-NULL, get_cvs_password() will just return this. */
27 /* Environment should override file. */
28 if ((passfile = getenv ("CVS_PASSFILE")) != NULL)
33 + if ( (path=getenv("CONFIG_DIR")) && path[0] ) {
34 + path=(char*) malloc(strlen(homedir)+strlen(getenv("CONFIG_DIR"))+2);
35 + sprintf(path, "%s/%s", homedir, getenv("CONFIG_DIR"));
36 + } else path=(char *) NULL;
37 + if ( path && stat(path,&st)!=-1 && S_ISDIR(st.st_mode) ) {
38 + passfile = (char *) xmalloc (strlen (path) + strlen (CVS_PASSWORD_FILE) + 3);
39 + sprintf (passfile, "%s/%s", path, CVS_PASSWORD_FILE);
43 - (char *) xmalloc (strlen (homedir) + strlen (CVS_PASSWORD_FILE) + 3);
44 + (char *) xmalloc (strlen (homedir) + strlen (CVS_PASSWORD_FILE) + 4);
45 strcpy (passfile, homedir);
46 #ifndef NO_SLASH_AFTER_HOME
47 /* NO_SLASH_AFTER_HOME is defined for VMS, where foo:[bar]/.cvspass is not
50 strcat (passfile, "/");
52 + strcat (passfile, ".");
53 strcat (passfile, CVS_PASSWORD_FILE);
58 /* Safety first and last, Scouts. */
59 if (isfile (passfile))