From 40bce2b2a12ebee6226ed90cae7eb4085453508f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Thu, 5 Aug 2004 17:47:35 +0000 Subject: [PATCH] Do not check val-tags if the repository is read-only. Approved by: maintainer's silence MFC after: 2 weeks --- contrib/cvs/src/tag.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/cvs/src/tag.c b/contrib/cvs/src/tag.c index ab4992f8696..903f3579078 100644 --- a/contrib/cvs/src/tag.c +++ b/contrib/cvs/src/tag.c @@ -10,6 +10,8 @@ * Add or delete a symbolic name to an RCS file, or a collection of RCS files. * Tag uses the checked out revision in the current directory, rtag uses * the modules database, if necessary. + * + * $FreeBSD$ */ #include "cvs.h" @@ -1199,6 +1201,9 @@ Numeric tag %s contains characters other than digits and '.'", name); || strcmp (name, TAG_HEAD) == 0) return; + if (readonlyfs) + return; + /* FIXME: This routine doesn't seem to do any locking whatsoever (and it is called from places which don't have locks in place). If two processes try to write val-tags at the same time, it would