Thu Mar 8 20:50:26 2012 UTC ()
add cvs acl support


(christos)
diff -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/cvs.h

cvs diff -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/cvs.h (expand / switch to unified diff)

--- src/external/gpl2/xcvs/dist/src/cvs.h 2009/04/10 11:20:30 1.3
+++ src/external/gpl2/xcvs/dist/src/cvs.h 2012/03/08 20:50:26 1.4
@@ -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 */
460extern int error_use_protocol; 465extern int error_use_protocol;
461 466
 467/* cvsacl patch */
 468/* ACL Patch settings from CVSROOT/config */
 469extern int use_cvs_acl;
 470extern char *cvs_acl_default_permissions;
 471extern int use_cvs_groups;
 472extern int use_system_groups;
 473extern int use_separate_acl_file_for_each_dir;
 474extern char *cvs_acl_file_location;
 475extern char *cvs_groups_file_location;
 476extern char *cvs_server_run_as;
 477extern int stop_at_first_permission_denied;
 478
 479int given_perms_valid (const char *cperms);
 480int
 481access_allowed (const char *file, const char *repos, const char *tag,
 482 int perm, char **mline, int *mpos, int usecache);
462 483
463DBM *open_module (void); 484DBM *open_module (void);
464List *Find_Directories (char *repository, int which, List *entries); 485List *Find_Directories (char *repository, int which, List *entries);
465void Entries_Close (List *entries); 486void Entries_Close (List *entries);
466List *Entries_Open (int aflag, char *update_dir); 487List *Entries_Open (int aflag, char *update_dir);
467void Subdirs_Known (List *entries); 488void Subdirs_Known (List *entries);
468void Subdir_Register (List *, const char *, const char *); 489void Subdir_Register (List *, const char *, const char *);
469void Subdir_Deregister (List *, const char *, const char *); 490void Subdir_Deregister (List *, const char *, const char *);
470const char *getCVSDir (const char *); 491const char *getCVSDir (const char *);
471 492
472void parse_tagdate (char **tag, char **date, const char *input); 493void parse_tagdate (char **tag, char **date, const char *input);
473char *Make_Date (const char *rawdate); 494char *Make_Date (const char *rawdate);
474char *date_from_time_t (time_t); 495char *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
848void wrap_add (char *line,int temp); 869void wrap_add (char *line,int temp);
849void wrap_send (void); 870void wrap_send (void);
850#if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT) 871#if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT)
851void wrap_unparse_rcs_options (char **, int); 872void 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 */
855char *expand_path (const char *name, const char *cvsroot, bool formatsafe, 876char *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. */
859extern List *variable_list; 880extern List *variable_list;
860 881
 882/* cvsacl patch */
 883extern int cvsacl (int argc, char **argv);
 884
861void variable_set (char *nameval); 885void variable_set (char *nameval);
862 886
863int watch (int argc, char **argv); 887int watch (int argc, char **argv);
864int edit (int argc, char **argv); 888int edit (int argc, char **argv);
865int unedit (int argc, char **argv); 889int unedit (int argc, char **argv);
866int editors (int argc, char **argv); 890int editors (int argc, char **argv);
867int watchers (int argc, char **argv); 891int watchers (int argc, char **argv);
868int annotate (int argc, char **argv); 892int annotate (int argc, char **argv);
869int add (int argc, char **argv); 893int add (int argc, char **argv);
870int admin (int argc, char **argv); 894int admin (int argc, char **argv);
871int checkout (int argc, char **argv); 895int checkout (int argc, char **argv);
872int commit (int argc, char **argv); 896int commit (int argc, char **argv);
873int diff (int argc, char **argv); 897int diff (int argc, char **argv);