diff options
author | obrien <obrien@FreeBSD.org> | 2008-01-13 05:49:32 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2008-01-13 05:49:32 +0000 |
commit | def79099e7c2ca2b773aa94d5b80c571dec9460f (patch) | |
tree | 9a6cba0f4384569a2eee18bf74577d8fd41aa2c7 /contrib/cvs/src/admin.c | |
parent | 0526761d4d99d34d2de093998c7ccd3f82695651 (diff) | |
parent | 55b663837dd12bbe5836969ac2a3f052a9028ea5 (diff) | |
download | FreeBSD-src-def79099e7c2ca2b773aa94d5b80c571dec9460f.zip FreeBSD-src-def79099e7c2ca2b773aa94d5b80c571dec9460f.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r175261,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/cvs/src/admin.c')
-rw-r--r-- | contrib/cvs/src/admin.c | 34 |
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 { |