summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/conf.y
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-11-26 16:23:51 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-11-26 16:23:51 +0000
commitdb3cb2196dc4401149258da8e6829cd3dad178e7 (patch)
treeb9a9aaf07fb5d5f42c77215bccac5baa122704a8 /usr.bin/cvs/conf.y
parent03ab04eece2d53fa3853fa9383b5278032ffa1ce (diff)
Rewrite the internals of the file management code so that we do not keep
a full path to each file we load, and cache file names so we can have multiple references to a single name. This saves a lot of memory on large trees such as /usr/src, especially on 'Makefile', 'README' and such.
Diffstat (limited to 'usr.bin/cvs/conf.y')
-rw-r--r--usr.bin/cvs/conf.y9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/cvs/conf.y b/usr.bin/cvs/conf.y
index 1b350e9fdb3..57cb242cf2f 100644
--- a/usr.bin/cvs/conf.y
+++ b/usr.bin/cvs/conf.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.y,v 1.3 2004/09/27 12:39:29 jfb Exp $ */
+/* $OpenBSD: conf.y,v 1.4 2004/11/26 16:23:50 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -640,6 +640,7 @@ u_int
cvs_acl_eval(struct cvs_op *op)
{
u_int res;
+ char fpath[MAXPATHLEN];
CVSFILE *cf;
struct acl_rule *rule;
@@ -653,9 +654,11 @@ cvs_acl_eval(struct cvs_op *op)
continue;
/* see if one of the files has a matching path */
- TAILQ_FOREACH(cf, &(op->co_files), cf_list)
- if (!cvs_acl_matchpath(cf->cf_path, rule->ar_path))
+ TAILQ_FOREACH(cf, &(op->co_files), cf_list) {
+ /* XXX borked */
+ if (!cvs_acl_matchpath(fpath, rule->ar_path))
continue;
+ }
res = rule->ar_act;