From 1dfdccebc8de0518c131c4f16bfcad8878543a81 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 31 Jan 1998 01:39:40 +0000 Subject: Cosmetic cleanups for the local tag support. Since rcs isn't called anymore, don't do all the putenv's for it's benefit. --- contrib/cvs/src/main.c | 20 ++++---------------- contrib/cvs/src/server.c | 4 +++- 2 files changed, 7 insertions(+), 17 deletions(-) (limited to 'contrib/cvs/src') 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; -- cgit v1.1