diff options
Diffstat (limited to 'contrib/cvs/src/admin.c')
-rw-r--r-- | contrib/cvs/src/admin.c | 20 |
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: |