Attached is a patch to current release which introduces a file
$CVSROOT/lockinfo. The file has the same properties as other *info files
in that directory.
Intended usage: Directories are read-locked before any read-operation is
done. A script (along the lines of contrib/cvs_acl.pl) can check whether
this read operation is allowed. This way read ACLs can be implemented.
Kendy
--
diff -u -r cvs-1.12.12/src/cvs.h cvs_my/src/cvs.h
--- cvs-1.12.12/src/cvs.h 2005-04-14 16:14:55.000000000 +0200
+++ cvs_my/src/cvs.h 2005-05-03 16:44:52.837176991 +0200
@@ -163,6 +163,7 @@
#define CVSROOTADM_CONFIG "config"
#define CVSROOTADM_HISTORY "history"
#define CVSROOTADM_IGNORE "cvsignore"
+#define CVSROOTADM_LOCKINFO "lockinfo"
#define CVSROOTADM_LOGINFO "loginfo"
#define CVSROOTADM_MODULES "modules"
#define CVSROOTADM_NOTIFY "notify"
diff -u -r cvs-1.12.12/src/lock.c cvs_my/src/lock.c
--- cvs-1.12.12/src/lock.c 2005-04-14 16:13:26.000000000 +0200
+++ cvs_my/src/lock.c 2005-05-03 17:54:40.813153559 +0200
@@ -476,7 +476,23 @@
}
}
+int
+check_lock_info_proc(const char * rep, const char * filter, void * ud)
+{
+ const char * srepos = Short_Repository(rep);
+ char * cmdline = Xasprintf("%s %s", filter, rep);
+ run_setup (cmdline);
+ free(cmdline);
+ return(abs(run_exec(RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL |
RUN_SIGIGNORE)));
+}
+int
+check_lock_info(const char * xrep)
+{
+ int n;
+ n = Parse_Info (CVSROOTADM_LOCKINFO, xrep, check_lock_info_proc,
PIOPT_ALL, NULL);
+ return n;
+}
/*
* Create a lock file for readers
@@ -489,6 +505,11 @@
TRACE (TRACE_FUNCTION, "Reader_Lock(%s)", xrepository);
+ if (check_lock_info(xrepository)){
+ error(0, 0, "Lock Info failed");
+ return 1;
+ }
+
if (noexec || readonlyfs)
return 0;
_______________________________________________
Bug-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-cvs