summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-01-31 01:39:40 +0000
committerpeter <peter@FreeBSD.org>1998-01-31 01:39:40 +0000
commit1dfdccebc8de0518c131c4f16bfcad8878543a81 (patch)
tree0b0ccaf38fccad7a946261197d82a50510abfdde /contrib/cvs/src
parent72e132a1295c212b09cdcc6e187869f623ab69fb (diff)
downloadFreeBSD-src-1dfdccebc8de0518c131c4f16bfcad8878543a81.zip
FreeBSD-src-1dfdccebc8de0518c131c4f16bfcad8878543a81.tar.gz
Cosmetic cleanups for the local tag support. Since rcs isn't called
anymore, don't do all the putenv's for it's benefit.
Diffstat (limited to 'contrib/cvs/src')
-rw-r--r--contrib/cvs/src/main.c20
-rw-r--r--contrib/cvs/src/server.c4
2 files changed, 7 insertions, 17 deletions
diff --git a/contrib/cvs/src/main.c b/contrib/cvs/src/main.c
index b2d1677..89a10cd 100644
--- a/contrib/cvs/src/main.c
+++ b/contrib/cvs/src/main.c
@@ -828,7 +828,6 @@ Copyright (c) 1989-1997 Brian Berliner, david d `zoo' zuhn, \n\
error (1, save_errno, "%s", path);
}
free (path);
- parseopts(CVSroot_directory);
}
#ifdef HAVE_PUTENV
@@ -940,6 +939,9 @@ Copyright (c) 1989-1997 Brian Berliner, david d `zoo' zuhn, \n\
if we didn't, then there would be no way to check in a new
CVSROOT/config file to fix the broken one! */
parse_config (CVSroot_directory);
+
+ /* Now is a convenient time to read CVSROOT/options */
+ parseopts(CVSroot_directory);
}
} /* end of stuff that gets done if the user DOESN'T ask for help */
@@ -1057,13 +1059,6 @@ parseopts(root)
rcs_localid = buf + 4;
RCS_setlocalid(rcs_localid);
- what = malloc(sizeof("RCSLOCALID") + 2 + strlen(rcs_localid));
- if (what == NULL) {
- printf("no memory for local tag\n");
- return;
- }
- sprintf(what, "RCSLOCALID=%s", rcs_localid);
- putenv(what);
}
if (!strncmp(buf, "tagexpand=", 10)) {
char *what;
@@ -1071,19 +1066,12 @@ parseopts(root)
rcs_incexc = buf + 10;
RCS_setincexc(rcs_incexc);
- what = malloc(sizeof("RCSINCEXC") + 2 + strlen(rcs_incexc));
- if (what == NULL) {
- printf("no memory for tag expand mode\n");
- return;
- }
- sprintf(what, "RCSINCEXC=%s", rcs_incexc);
- putenv(what);
}
/*
* OpenBSD has a "umask=" and "dlimit=" command, we silently
* ignore them here since they are not much use to us. cvsumask
* defaults to 002 already, and the dlimit (data size limit)
- * should really be handled elsewhere.
+ * should really be handled elsewhere (eg: login.conf).
*/
}
fclose(fp);
diff --git a/contrib/cvs/src/server.c b/contrib/cvs/src/server.c
index a9dcfec..e820388 100644
--- a/contrib/cvs/src/server.c
+++ b/contrib/cvs/src/server.c
@@ -584,6 +584,9 @@ serve_root (arg)
nothing. But for rsh, we need to do it now. */
parse_config (CVSroot_directory);
+ /* Now is a good time to read CVSROOT/options too. */
+ parseopts(CVSroot_directory);
+
path = xmalloc (strlen (CVSroot_directory)
+ sizeof (CVSROOTADM)
+ sizeof (CVSROOTADM_HISTORY)
@@ -621,7 +624,6 @@ Sorry, you don't have read/write access to the history file %s", path);
(void) putenv (env);
/* do not free env, as putenv has control of it */
#endif
- parseopts(CVSroot_directory);
}
static int max_dotdot_limit = 0;
OpenPOWER on IntegriCloud