aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/login.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2002-12-19 21:18:02 +0000
committerPeter Wemm <peter@FreeBSD.org>2002-12-19 21:18:02 +0000
commitb6fb62eafcdf2e9f4d8163560ecb228e39c96f93 (patch)
treec1c9f8f7fb5f7141861c1b54fecd2bc143a4bbc3 /contrib/cvs/src/login.c
parent48e5709e52387aaa732117d55626f12096b23f39 (diff)
downloadsrc-b6fb62eafcdf2e9f4d8163560ecb228e39c96f93.tar.gz
src-b6fb62eafcdf2e9f4d8163560ecb228e39c96f93.zip
MFC: 1.11.2.1-20021201 (this has been running on key cluster machines
for a while, including the repository server)
Notes
Notes: svn path=/stable/4/; revision=108104
Diffstat (limited to 'contrib/cvs/src/login.c')
-rw-r--r--contrib/cvs/src/login.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/contrib/cvs/src/login.c b/contrib/cvs/src/login.c
index a90212f0db2a..58b2c7a2d836 100644
--- a/contrib/cvs/src/login.c
+++ b/contrib/cvs/src/login.c
@@ -67,17 +67,7 @@ construct_cvspass_filename ()
return (char *) NULL;
}
- passfile =
- (char *) xmalloc (strlen (homedir) + strlen (CVS_PASSWORD_FILE) + 3);
- strcpy (passfile, homedir);
-#ifndef NO_SLASH_AFTER_HOME
- /* NO_SLASH_AFTER_HOME is defined for VMS, where foo:[bar]/.cvspass is not
- a legal filename but foo:[bar].cvspass is. A more clean solution would
- be something more along the lines of a "join a directory to a filename"
- kind of thing.... */
- strcat (passfile, "/");
-#endif
- strcat (passfile, CVS_PASSWORD_FILE);
+ passfile = strcat_filename_onto_homedir (homedir, CVS_PASSWORD_FILE);
/* Safety first and last, Scouts. */
if (isfile (passfile))
@@ -315,6 +305,8 @@ password_entry_operation (operation, root, newpassword)
error (1, 0, "CVSROOT: %s", root->original);
}
+ cvsroot_canonical = normalize_cvsroot (root);
+
/* Yes, the method below reads the user's password file twice when we have
* to delete an entry. It's inefficient, but we're not talking about a gig of
* data here.
@@ -328,8 +320,6 @@ password_entry_operation (operation, root, newpassword)
goto process;
}
- cvsroot_canonical = normalize_cvsroot (root);
-
/* Check each line to see if we have this entry already. */
line = 0;
while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)