]>
Commit | Line | Data |
---|---|---|
ecade4f5 TO |
1 | diff -ruN cvs-1.11.2.org/src/login.c cvs-1.11.2/src/login.c |
2 | --- cvs-1.11.2.org/src/login.c Sat Jun 1 23:47:43 2002 | |
3 | +++ cvs-1.11.2/src/login.c Sat Jun 1 23:49:12 2002 | |
4 | @@ -30,7 +30,7 @@ | |
5 | #endif | |
6 | ||
7 | #ifndef CVS_PASSWORD_FILE | |
8 | -#define CVS_PASSWORD_FILE ".cvspass" | |
9 | +#define CVS_PASSWORD_FILE "cvspass" | |
10 | #endif | |
11 | ||
12 | /* If non-NULL, get_cvs_password() will just return this. */ | |
13 | @@ -65,8 +65,13 @@ | |
14 | return (char *) NULL; | |
15 | } | |
16 | ||
17 | + if (getenv("CONFIG_DIR")) { | |
18 | + passfile = (char *) xmalloc (strlen (homedir) + strlen (getenv("CONFIG_DIR")) + strlen (CVS_PASSWORD_FILE) + 4); | |
19 | + sprintf (passfile, "%s/%s/%s", homedir, getenv("CONFIG_DIR"), CVS_PASSWORD_FILE); | |
20 | + } | |
21 | + else { | |
22 | passfile = | |
23 | - (char *) xmalloc (strlen (homedir) + strlen (CVS_PASSWORD_FILE) + 3); | |
24 | + (char *) xmalloc (strlen (homedir) + strlen (CVS_PASSWORD_FILE) + 4); | |
25 | strcpy (passfile, homedir); | |
26 | #ifndef NO_SLASH_AFTER_HOME | |
27 | /* NO_SLASH_AFTER_HOME is defined for VMS, where foo:[bar]/.cvspass is not | |
28 | @@ -75,7 +80,9 @@ | |
29 | kind of thing.... */ | |
30 | strcat (passfile, "/"); | |
31 | #endif | |
32 | + strcat (passfile, "."); | |
33 | strcat (passfile, CVS_PASSWORD_FILE); | |
34 | + } | |
35 | ||
36 | /* Safety first and last, Scouts. */ | |
37 | if (isfile (passfile)) |