summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/admin.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cvs/src/admin.c')
-rw-r--r--contrib/cvs/src/admin.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/contrib/cvs/src/admin.c b/contrib/cvs/src/admin.c
index 05067b8..186e27c 100644
--- a/contrib/cvs/src/admin.c
+++ b/contrib/cvs/src/admin.c
@@ -1,6 +1,11 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (c) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (c) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
@@ -379,17 +384,13 @@ admin (argc, argv)
/* The use of `cvs admin -k' is unrestricted. However, any other
option is restricted if the group CVS_ADMIN_GROUP exists on the
server. */
- if (
-# ifdef CLIENT_SUPPORT
- /* This is only "secure" on the server, since the user could edit the
- * RCS file on a local host, but some people like this kind of
- * check anyhow. The alternative would be to check only when
- * (server_active) rather than when not on the client.
- */
- !current_parsed_root->isremote &&
-# endif /* CLIENT_SUPPORT */
- !only_k_option
- && (grp = getgrnam(CVS_ADMIN_GROUP)) != NULL)
+ /* This is only "secure" on the server, since the user could edit the
+ * RCS file on a local host, but some people like this kind of
+ * check anyhow. The alternative would be to check only when
+ * (server_active) rather than when not on the client.
+ */
+ if (!current_parsed_root->isremote && !only_k_option &&
+ (grp = getgrnam(CVS_ADMIN_GROUP)) != NULL)
{
#ifdef HAVE_GETGROUPS
gid_t *grps;
@@ -816,6 +817,13 @@ admin_fileproc (callerdat, finfo)
{
tag = xstrdup (arg + 2);
rev = RCS_head (rcs);
+ if (!rev)
+ {
+ error (0, 0, "No head revision in archive file `%s'.",
+ rcs->path);
+ status = 1;
+ continue;
+ }
}
else
{
OpenPOWER on IntegriCloud