| @@ -9,27 +9,27 @@ | | | @@ -9,27 +9,27 @@ |
9 | * | | 9 | * |
10 | * You may distribute under the terms of the GNU General Public License as | | 10 | * You may distribute under the terms of the GNU General Public License as |
11 | * specified in the README file that comes with the CVS kit. | | 11 | * specified in the README file that comes with the CVS kit. |
12 | */ | | 12 | */ |
13 | | | 13 | |
14 | /* | | 14 | /* |
15 | * basic information used in all source files | | 15 | * basic information used in all source files |
16 | * | | 16 | * |
17 | */ | | 17 | */ |
18 | | | 18 | |
19 | | | 19 | |
20 | #ifdef HAVE_CONFIG_H | | 20 | #ifdef HAVE_CONFIG_H |
21 | # include <config.h> /* this is stuff found via autoconf */ | | 21 | # include <config.h> /* this is stuff found via autoconf */ |
22 | #endif /* CONFIG_H */ | | 22 | #endif /* HAVE_CONFIG_H */ |
23 | | | 23 | |
24 | /* Add GNU attribute suppport. */ | | 24 | /* Add GNU attribute suppport. */ |
25 | #ifndef __attribute__ | | 25 | #ifndef __attribute__ |
26 | /* This feature is available in gcc versions 2.5 and later. */ | | 26 | /* This feature is available in gcc versions 2.5 and later. */ |
27 | # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ | | 27 | # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ |
28 | # define __attribute__(Spec) /* empty */ | | 28 | # define __attribute__(Spec) /* empty */ |
29 | # else | | 29 | # else |
30 | # if __GNUC__ == 2 && __GNUC_MINOR__ < 96 | | 30 | # if __GNUC__ == 2 && __GNUC_MINOR__ < 96 |
31 | # define __pure__ /* empty */ | | 31 | # define __pure__ /* empty */ |
32 | # endif | | 32 | # endif |
33 | # if __GNUC__ < 3 | | 33 | # if __GNUC__ < 3 |
34 | # define __malloc__ /* empty */ | | 34 | # define __malloc__ /* empty */ |
35 | # endif | | 35 | # endif |
| @@ -179,26 +179,31 @@ char *strerror (int); | | | @@ -179,26 +179,31 @@ char *strerror (int); |
179 | #define CVSROOTADM_POSTPROXY "postproxy" | | 179 | #define CVSROOTADM_POSTPROXY "postproxy" |
180 | #define CVSROOTADM_POSTTAG "posttag" | | 180 | #define CVSROOTADM_POSTTAG "posttag" |
181 | #define CVSROOTADM_POSTWATCH "postwatch" | | 181 | #define CVSROOTADM_POSTWATCH "postwatch" |
182 | #define CVSROOTADM_PREPROXY "preproxy" | | 182 | #define CVSROOTADM_PREPROXY "preproxy" |
183 | #define CVSROOTADM_RCSINFO "rcsinfo" | | 183 | #define CVSROOTADM_RCSINFO "rcsinfo" |
184 | #define CVSROOTADM_READERS "readers" | | 184 | #define CVSROOTADM_READERS "readers" |
185 | #define CVSROOTADM_TAGINFO "taginfo" | | 185 | #define CVSROOTADM_TAGINFO "taginfo" |
186 | #define CVSROOTADM_USERS "users" | | 186 | #define CVSROOTADM_USERS "users" |
187 | #define CVSROOTADM_VALTAGS "val-tags" | | 187 | #define CVSROOTADM_VALTAGS "val-tags" |
188 | #define CVSROOTADM_VERIFYMSG "verifymsg" | | 188 | #define CVSROOTADM_VERIFYMSG "verifymsg" |
189 | #define CVSROOTADM_WRAPPER "cvswrappers" | | 189 | #define CVSROOTADM_WRAPPER "cvswrappers" |
190 | #define CVSROOTADM_WRITERS "writers" | | 190 | #define CVSROOTADM_WRITERS "writers" |
191 | | | 191 | |
| | | 192 | /* cvsacl patch */ |
| | | 193 | #define CVSROOTADM_ACLCONFIG "aclconfig" |
| | | 194 | #define CVSROOTADM_ACCESS "access" |
| | | 195 | #define CVSROOTADM_GROUP "group" |
| | | 196 | |
192 | #define CVSNULLREPOS "Emptydir" /* an empty directory */ | | 197 | #define CVSNULLREPOS "Emptydir" /* an empty directory */ |
193 | | | 198 | |
194 | /* Other CVS file names */ | | 199 | /* Other CVS file names */ |
195 | | | 200 | |
196 | /* Files go in the attic if the head main branch revision is dead, | | 201 | /* Files go in the attic if the head main branch revision is dead, |
197 | otherwise they go in the regular repository directories. The whole | | 202 | otherwise they go in the regular repository directories. The whole |
198 | concept of having an attic is sort of a relic from before death | | 203 | concept of having an attic is sort of a relic from before death |
199 | support but on the other hand, it probably does help the speed of | | 204 | support but on the other hand, it probably does help the speed of |
200 | some operations (such as main branch checkouts and updates). */ | | 205 | some operations (such as main branch checkouts and updates). */ |
201 | #define CVSATTIC "Attic" | | 206 | #define CVSATTIC "Attic" |
202 | | | 207 | |
203 | #define CVSLCK "#cvs.lock" | | 208 | #define CVSLCK "#cvs.lock" |
204 | #define CVSHISTORYLCK "#cvs.history.lock" | | 209 | #define CVSHISTORYLCK "#cvs.history.lock" |
| @@ -449,26 +454,42 @@ int diff_exec (const char *file1, const | | | @@ -449,26 +454,42 @@ int diff_exec (const char *file1, const |
449 | | | 454 | |
450 | #include "error.h" | | 455 | #include "error.h" |
451 | | | 456 | |
452 | /* If non-zero, error will use the CVS protocol to report error | | 457 | /* If non-zero, error will use the CVS protocol to report error |
453 | * messages. This will only be set in the CVS server parent process; | | 458 | * messages. This will only be set in the CVS server parent process; |
454 | * most other code is run via do_cvs_command, which forks off a child | | 459 | * most other code is run via do_cvs_command, which forks off a child |
455 | * process and packages up its stderr in the protocol. | | 460 | * process and packages up its stderr in the protocol. |
456 | * | | 461 | * |
457 | * This needs to be here rather than in error.h in order to use an unforked | | 462 | * This needs to be here rather than in error.h in order to use an unforked |
458 | * error.h from GNULIB. | | 463 | * error.h from GNULIB. |
459 | */ | | 464 | */ |
460 | extern int error_use_protocol; | | 465 | extern int error_use_protocol; |
461 | | | 466 | |
| | | 467 | /* cvsacl patch */ |
| | | 468 | /* ACL Patch settings from CVSROOT/config */ |
| | | 469 | extern int use_cvs_acl; |
| | | 470 | extern char *cvs_acl_default_permissions; |
| | | 471 | extern int use_cvs_groups; |
| | | 472 | extern int use_system_groups; |
| | | 473 | extern int use_separate_acl_file_for_each_dir; |
| | | 474 | extern char *cvs_acl_file_location; |
| | | 475 | extern char *cvs_groups_file_location; |
| | | 476 | extern char *cvs_server_run_as; |
| | | 477 | extern int stop_at_first_permission_denied; |
| | | 478 | |
| | | 479 | int given_perms_valid (const char *cperms); |
| | | 480 | int |
| | | 481 | access_allowed (const char *file, const char *repos, const char *tag, |
| | | 482 | int perm, char **mline, int *mpos, int usecache); |
462 | | | 483 | |
463 | DBM *open_module (void); | | 484 | DBM *open_module (void); |
464 | List *Find_Directories (char *repository, int which, List *entries); | | 485 | List *Find_Directories (char *repository, int which, List *entries); |
465 | void Entries_Close (List *entries); | | 486 | void Entries_Close (List *entries); |
466 | List *Entries_Open (int aflag, char *update_dir); | | 487 | List *Entries_Open (int aflag, char *update_dir); |
467 | void Subdirs_Known (List *entries); | | 488 | void Subdirs_Known (List *entries); |
468 | void Subdir_Register (List *, const char *, const char *); | | 489 | void Subdir_Register (List *, const char *, const char *); |
469 | void Subdir_Deregister (List *, const char *, const char *); | | 490 | void Subdir_Deregister (List *, const char *, const char *); |
470 | const char *getCVSDir (const char *); | | 491 | const char *getCVSDir (const char *); |
471 | | | 492 | |
472 | void parse_tagdate (char **tag, char **date, const char *input); | | 493 | void parse_tagdate (char **tag, char **date, const char *input); |
473 | char *Make_Date (const char *rawdate); | | 494 | char *Make_Date (const char *rawdate); |
474 | char *date_from_time_t (time_t); | | 495 | char *date_from_time_t (time_t); |
| @@ -848,26 +869,29 @@ void wrap_add_file (const char *file,int | | | @@ -848,26 +869,29 @@ void wrap_add_file (const char *file,int |
848 | void wrap_add (char *line,int temp); | | 869 | void wrap_add (char *line,int temp); |
849 | void wrap_send (void); | | 870 | void wrap_send (void); |
850 | #if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT) | | 871 | #if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT) |
851 | void wrap_unparse_rcs_options (char **, int); | | 872 | void wrap_unparse_rcs_options (char **, int); |
852 | #endif /* SERVER_SUPPORT || CLIENT_SUPPORT */ | | 873 | #endif /* SERVER_SUPPORT || CLIENT_SUPPORT */ |
853 | | | 874 | |
854 | /* Pathname expansion */ | | 875 | /* Pathname expansion */ |
855 | char *expand_path (const char *name, const char *cvsroot, bool formatsafe, | | 876 | char *expand_path (const char *name, const char *cvsroot, bool formatsafe, |
856 | const char *file, int line); | | 877 | const char *file, int line); |
857 | | | 878 | |
858 | /* User variables. */ | | 879 | /* User variables. */ |
859 | extern List *variable_list; | | 880 | extern List *variable_list; |
860 | | | 881 | |
| | | 882 | /* cvsacl patch */ |
| | | 883 | extern int cvsacl (int argc, char **argv); |
| | | 884 | |
861 | void variable_set (char *nameval); | | 885 | void variable_set (char *nameval); |
862 | | | 886 | |
863 | int watch (int argc, char **argv); | | 887 | int watch (int argc, char **argv); |
864 | int edit (int argc, char **argv); | | 888 | int edit (int argc, char **argv); |
865 | int unedit (int argc, char **argv); | | 889 | int unedit (int argc, char **argv); |
866 | int editors (int argc, char **argv); | | 890 | int editors (int argc, char **argv); |
867 | int watchers (int argc, char **argv); | | 891 | int watchers (int argc, char **argv); |
868 | int annotate (int argc, char **argv); | | 892 | int annotate (int argc, char **argv); |
869 | int add (int argc, char **argv); | | 893 | int add (int argc, char **argv); |
870 | int admin (int argc, char **argv); | | 894 | int admin (int argc, char **argv); |
871 | int checkout (int argc, char **argv); | | 895 | int checkout (int argc, char **argv); |
872 | int commit (int argc, char **argv); | | 896 | int commit (int argc, char **argv); |
873 | int diff (int argc, char **argv); | | 897 | int diff (int argc, char **argv); |