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))
60 --- cvs-1.11.1p1.org/src/cvsrc.c Sun Dec 22 14:18:41 2002
61 +++ cvs-1.11.1p1/src/cvsrc.c Sun Dec 22 14:30:43 2002
66 +#include <sys/stat.h>
70 /* this file is to be found in the user's home directory */
72 #ifndef CVSRC_FILENAME
73 -#define CVSRC_FILENAME ".cvsrc"
74 +#define CVSRC_FILENAME "cvsrc"
76 char cvsrc[] = CVSRC_FILENAME;
87 size_t line_chars_allocated;
92 + if ( (path=getenv("CONFIG_DIR")) && path[0] ) {
93 + path=(char*) malloc(strlen(homedir)+strlen(getenv("CONFIG_DIR"))+2);
94 + sprintf(path, "%s/%s", homedir, getenv("CONFIG_DIR"));
95 + } else path=(char *) NULL;
96 + if ( path && stat(path,&st)!=-1 && S_ISDIR(st.st_mode) ) {
97 + homeinit = (char *) xmalloc (strlen (path) + strlen (cvsrc) + 3);
98 + sprintf (homeinit, "%s/%s", path, cvsrc);
101 homeinit = (char *) xmalloc (strlen (homedir) + strlen (cvsrc) + 10);
102 strcpy (homeinit, homedir);
103 strcat (homeinit, "/");
104 strcat (homeinit, cvsrc);
109 /* if it can't be read, there's no point to continuing */