summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/admin.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-01-21 21:53:03 +0000
committerpeter <peter@FreeBSD.org>2003-01-21 21:53:03 +0000
commit821118cc49e4fb917b543aff27dfeeb48f9959cb (patch)
treeac24d0bf3321edf74c485789b0a58c0ac84bb5fb /contrib/cvs/src/admin.c
parent3dc96f7243ece1d1f7f87b03334f840415e0db63 (diff)
downloadFreeBSD-src-821118cc49e4fb917b543aff27dfeeb48f9959cb.zip
FreeBSD-src-821118cc49e4fb917b543aff27dfeeb48f9959cb.tar.gz
Import cvs-1.11.5 onto vendor branch
Diffstat (limited to 'contrib/cvs/src/admin.c')
-rw-r--r--contrib/cvs/src/admin.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/contrib/cvs/src/admin.c b/contrib/cvs/src/admin.c
index 8c4fce3..6a5649a 100644
--- a/contrib/cvs/src/admin.c
+++ b/contrib/cvs/src/admin.c
@@ -377,9 +377,19 @@ admin (argc, argv)
#ifdef CVS_ADMIN_GROUP
/* The use of `cvs admin -k' is unrestricted. However, any other
- option is restricted if the group CVS_ADMIN_GROUP exists. */
- if (!only_k_option &&
- (grp = getgrnam(CVS_ADMIN_GROUP)) != NULL)
+ 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)
{
#ifdef HAVE_GETGROUPS
gid_t *grps;
@@ -411,7 +421,7 @@ admin (argc, argv)
CVS_ADMIN_GROUP);
#endif
}
-#endif
+#endif /* defined CVS_ADMIN_GROUP */
for (i = 0; i < admin_data.ac; ++i)
{
@@ -510,7 +520,7 @@ admin (argc, argv)
err = start_recursion (admin_fileproc, (FILESDONEPROC) NULL, admin_dirproc,
(DIRLEAVEPROC) NULL, (void *)&admin_data,
argc, argv, 0,
- W_LOCAL, 0, LOCK_NONE, (char *) NULL, 1);
+ W_LOCAL, 0, CVS_LOCK_NONE, (char *) NULL, 1);
Lock_Cleanup ();
return_it:
OpenPOWER on IntegriCloud