2 * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
4 * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
7 * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
8 * Portions Copyright (C) 1989-1992, Brian Berliner
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.
14 /* CVSroot data structures */
16 /* Access method specified in CVSroot. */
27 extern const char method_names
[][16]; /* change this in root.c if you change
30 typedef struct cvsroot_s
{
31 char *original
; /* The complete source CVSroot string. */
32 CVSmethod method
; /* One of the enum values above. */
33 char *directory
; /* The directory name. */
34 bool isremote
; /* True if we are doing remote access. */
35 /* The following is required for servers now to allow Redirects to be sent
36 * for remote roots when client support is disabled.
38 #if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
39 char *username
; /* The username or NULL if method == local. */
40 char *password
; /* The password or NULL if method == local. */
41 char *hostname
; /* The hostname or NULL if method == local. */
42 char *cvs_rsh
; /* The $CVS_RSH or NULL if method != ext. */
43 char *cvs_server
; /* The $CVS_SERVER or NULL if
44 * method != ext and method != fork. */
45 int port
; /* The port or zero if method == local. */
46 char *proxy_hostname
; /* The hostname of the proxy server, or NULL
47 * when method == local or no proxy will be
50 int proxy_port
; /* The port of the proxy or zero, as above. */
51 bool redirect
; /* False if we are to disable redirects. */
52 #endif /* defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
55 extern cvsroot_t
*current_parsed_root
;
56 extern const cvsroot_t
*original_parsed_root
;
58 cvsroot_t
*Name_Root (const char *dir
, const char *update_dir
);
59 cvsroot_t
*parse_cvsroot (const char *root
)
60 __attribute__ ((__malloc__
));
61 cvsroot_t
*local_cvsroot (const char *dir
)
62 __attribute__ ((__malloc__
));
63 void Create_Root (const char *dir
, const char *rootdir
);
64 void root_allow_add (const char *, const char *configPath
);
65 void root_allow_free (void);
66 bool root_allow_ok (const char *);
67 struct config
*get_root_allow_config (const char *arg
, const char *configPath
);
68 const char *primary_root_translate (const char *root_in
);
69 const char *primary_root_inverse_translate (const char *root_in
);