33 #include <apr_pools.h>
69 #define SVN_CONFIG_CATEGORY_SERVERS "servers"
70 #define SVN_CONFIG_SECTION_GROUPS "groups"
71 #define SVN_CONFIG_SECTION_GLOBAL "global"
72 #define SVN_CONFIG_OPTION_HTTP_PROXY_HOST "http-proxy-host"
73 #define SVN_CONFIG_OPTION_HTTP_PROXY_PORT "http-proxy-port"
74 #define SVN_CONFIG_OPTION_HTTP_PROXY_USERNAME "http-proxy-username"
75 #define SVN_CONFIG_OPTION_HTTP_PROXY_PASSWORD "http-proxy-password"
76 #define SVN_CONFIG_OPTION_HTTP_PROXY_EXCEPTIONS "http-proxy-exceptions"
77 #define SVN_CONFIG_OPTION_HTTP_TIMEOUT "http-timeout"
78 #define SVN_CONFIG_OPTION_HTTP_COMPRESSION "http-compression"
79 #define SVN_CONFIG_OPTION_NEON_DEBUG_MASK "neon-debug-mask"
80 #define SVN_CONFIG_OPTION_HTTP_AUTH_TYPES "http-auth-types"
81 #define SVN_CONFIG_OPTION_SSL_AUTHORITY_FILES "ssl-authority-files"
82 #define SVN_CONFIG_OPTION_SSL_TRUST_DEFAULT_CA "ssl-trust-default-ca"
83 #define SVN_CONFIG_OPTION_SSL_CLIENT_CERT_FILE "ssl-client-cert-file"
84 #define SVN_CONFIG_OPTION_SSL_CLIENT_CERT_PASSWORD "ssl-client-cert-password"
85 #define SVN_CONFIG_OPTION_SSL_PKCS11_PROVIDER "ssl-pkcs11-provider"
86 #define SVN_CONFIG_OPTION_HTTP_LIBRARY "http-library"
87 #define SVN_CONFIG_OPTION_STORE_PASSWORDS "store-passwords"
88 #define SVN_CONFIG_OPTION_STORE_PLAINTEXT_PASSWORDS "store-plaintext-passwords"
89 #define SVN_CONFIG_OPTION_STORE_AUTH_CREDS "store-auth-creds"
90 #define SVN_CONFIG_OPTION_STORE_SSL_CLIENT_CERT_PP "store-ssl-client-cert-pp"
91 #define SVN_CONFIG_OPTION_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT \
92 "store-ssl-client-cert-pp-plaintext"
93 #define SVN_CONFIG_OPTION_USERNAME "username"
95 #define SVN_CONFIG_OPTION_HTTP_BULK_UPDATES "http-bulk-updates"
97 #define SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS "http-max-connections"
99 #define SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS "http-chunked-requests"
102 #define SVN_CONFIG_OPTION_SERF_LOG_COMPONENTS "serf-log-components"
104 #define SVN_CONFIG_OPTION_SERF_LOG_LEVEL "serf-log-level"
107 #define SVN_CONFIG_CATEGORY_CONFIG "config"
108 #define SVN_CONFIG_SECTION_AUTH "auth"
110 #define SVN_CONFIG_OPTION_PASSWORD_STORES "password-stores"
112 #define SVN_CONFIG_OPTION_KWALLET_WALLET "kwallet-wallet"
114 #define SVN_CONFIG_OPTION_KWALLET_SVN_APPLICATION_NAME_WITH_PID "kwallet-svn-application-name-with-pid"
116 #define SVN_CONFIG_OPTION_SSL_CLIENT_CERT_FILE_PROMPT "ssl-client-cert-file-prompt"
119 #define SVN_CONFIG_SECTION_HELPERS "helpers"
120 #define SVN_CONFIG_OPTION_EDITOR_CMD "editor-cmd"
121 #define SVN_CONFIG_OPTION_DIFF_CMD "diff-cmd"
123 #define SVN_CONFIG_OPTION_DIFF_EXTENSIONS "diff-extensions"
124 #define SVN_CONFIG_OPTION_DIFF3_CMD "diff3-cmd"
125 #define SVN_CONFIG_OPTION_DIFF3_HAS_PROGRAM_ARG "diff3-has-program-arg"
126 #define SVN_CONFIG_OPTION_MERGE_TOOL_CMD "merge-tool-cmd"
127 #define SVN_CONFIG_SECTION_MISCELLANY "miscellany"
128 #define SVN_CONFIG_OPTION_GLOBAL_IGNORES "global-ignores"
129 #define SVN_CONFIG_OPTION_LOG_ENCODING "log-encoding"
130 #define SVN_CONFIG_OPTION_USE_COMMIT_TIMES "use-commit-times"
132 #define SVN_CONFIG_OPTION_TEMPLATE_ROOT "template-root"
133 #define SVN_CONFIG_OPTION_ENABLE_AUTO_PROPS "enable-auto-props"
135 #define SVN_CONFIG_OPTION_ENABLE_MAGIC_FILE "enable-magic-file"
136 #define SVN_CONFIG_OPTION_NO_UNLOCK "no-unlock"
137 #define SVN_CONFIG_OPTION_MIMETYPES_FILE "mime-types-file"
138 #define SVN_CONFIG_OPTION_PRESERVED_CF_EXTS "preserved-conflict-file-exts"
140 #define SVN_CONFIG_OPTION_INTERACTIVE_CONFLICTS "interactive-conflicts"
142 #define SVN_CONFIG_OPTION_MEMORY_CACHE_SIZE "memory-cache-size"
144 #define SVN_CONFIG_OPTION_DIFF_IGNORE_CONTENT_TYPE "diff-ignore-content-type"
145 #define SVN_CONFIG_SECTION_TUNNELS "tunnels"
146 #define SVN_CONFIG_SECTION_AUTO_PROPS "auto-props"
148 #define SVN_CONFIG_SECTION_WORKING_COPY "working-copy"
150 #define SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE "exclusive-locking"
152 #define SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE_CLIENTS "exclusive-locking-clients"
154 #define SVN_CONFIG_OPTION_SQLITE_BUSY_TIMEOUT "busy-timeout"
163 #define SVN_CONFIG_SECTION_GENERAL "general"
164 #define SVN_CONFIG_OPTION_ANON_ACCESS "anon-access"
165 #define SVN_CONFIG_OPTION_AUTH_ACCESS "auth-access"
166 #define SVN_CONFIG_OPTION_PASSWORD_DB "password-db"
167 #define SVN_CONFIG_OPTION_REALM "realm"
168 #define SVN_CONFIG_OPTION_AUTHZ_DB "authz-db"
170 #define SVN_CONFIG_OPTION_GROUPS_DB "groups-db"
172 #define SVN_CONFIG_OPTION_FORCE_USERNAME_CASE "force-username-case"
174 #define SVN_CONFIG_OPTION_HOOKS_ENV "hooks-env"
175 #define SVN_CONFIG_SECTION_SASL "sasl"
176 #define SVN_CONFIG_OPTION_USE_SASL "use-sasl"
177 #define SVN_CONFIG_OPTION_MIN_SSF "min-encryption"
178 #define SVN_CONFIG_OPTION_MAX_SSF "max-encryption"
181 #define SVN_CONFIG_SECTION_USERS "users"
190 #ifndef DOXYGEN_SHOULD_SKIP_THIS
191 #define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 \
192 "*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__"
193 #define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_2 \
194 "*.rej *~ #*# .#* .*.swp .DS_Store [Tt]humbs.db"
197 #define SVN_CONFIG_DEFAULT_GLOBAL_IGNORES \
198 SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 " " \
199 SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_2
201 #define SVN_CONFIG_TRUE "TRUE"
202 #define SVN_CONFIG_FALSE "FALSE"
203 #define SVN_CONFIG_ASK "ASK"
208 #define SVN_CONFIG_DEFAULT_OPTION_STORE_PASSWORDS TRUE
209 #define SVN_CONFIG_DEFAULT_OPTION_STORE_PLAINTEXT_PASSWORDS SVN_CONFIG_ASK
210 #define SVN_CONFIG_DEFAULT_OPTION_STORE_AUTH_CREDS TRUE
211 #define SVN_CONFIG_DEFAULT_OPTION_STORE_SSL_CLIENT_CERT_PP TRUE
212 #define SVN_CONFIG_DEFAULT_OPTION_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT \
214 #define SVN_CONFIG_DEFAULT_OPTION_HTTP_MAX_CONNECTIONS 4
232 const char *config_dir,
250 apr_pool_t *result_pool);
262 apr_pool_t *result_pool);
284 apr_pool_t *result_pool);
298 apr_pool_t *result_pool);
310 apr_pool_t *result_pool);
329 apr_pool_t *result_pool);
361 const char *default_value);
413 apr_int64_t default_value);
449 const char* default_value);
469 const char *unknown_value,
517 void *baton, apr_pool_t *pool);
585 const char *section);
595 const char *master_section,
608 const char* server_group,
609 const char* option_name,
610 const char* default_value);
622 const char *server_group,
623 const char *option_name,
624 apr_int64_t default_value,
625 apr_int64_t *result_value,
642 const char *server_group,
643 const char *option_name,
693 #define SVN_CONFIG_REALMSTRING_KEY "svn:realmstring"
698 #define SVN_CONFIG_AUTHN_USERNAME_KEY "username"
705 #define SVN_CONFIG_AUTHN_PASSWORD_KEY "password"
712 #define SVN_CONFIG_AUTHN_PASSPHRASE_KEY "passphrase"
718 #define SVN_CONFIG_AUTHN_PASSTYPE_KEY "passtype"
725 #define SVN_CONFIG_AUTHN_ASCII_CERT_KEY "ascii_cert"
732 #define SVN_CONFIG_AUTHN_FAILURES_KEY "failures"
754 const char *cred_kind,
755 const char *realmstring,
756 const char *config_dir,
773 const char *cred_kind,
774 const char *realmstring,
775 const char *config_dir,
803 const char *cred_kind,
804 const char *realmstring,
806 apr_pool_t *scratch_pool);
840 apr_pool_t *scratch_pool);
862 const char *config_dir,
883 apr_hash_t *src_hash,
svn_error_t * svn_config_merge(svn_config_t *cfg, const char *file, svn_boolean_t must_exist)
Like svn_config_read(), but merges the configuration data from file (a file or registry path) into *c...
svn_boolean_t(* svn_config_enumerator2_t)(const char *name, const char *value, void *baton, apr_pool_t *pool)
A callback function used in enumerating config options.
svn_error_t * svn_config_read(svn_config_t **cfgp, const char *file, svn_boolean_t must_exist, apr_pool_t *result_pool)
Similar to svn_config_read2, but always passes FALSE to section_names_case_sensitive.
svn_error_t * svn_config_walk_auth_data(const char *config_dir, svn_config_auth_walk_func_t walk_func, void *walk_baton, apr_pool_t *scratch_pool)
Call walk_func with walk_baton and information describing each credential cached within the Subversio...
svn_tristate_t
Generic three-state property to represent an unknown value for values that are just like booleans...
svn_boolean_t svn_config_has_section(svn_config_t *cfg, const char *section)
Return TRUE if section exists in cfg, FALSE otherwise.
svn_error_t * svn_config_get_bool(svn_config_t *cfg, svn_boolean_t *valuep, const char *section, const char *option, svn_boolean_t default_value)
Like svn_config_get(), but for boolean values.
General file I/O for Subversion.
int svn_config_enumerate2(svn_config_t *cfg, const char *section, svn_config_enumerator2_t callback, void *baton, apr_pool_t *pool)
Enumerate the options in section, passing baton and the current option's name and value to callback...
svn_error_t * svn_config_get_int64(svn_config_t *cfg, apr_int64_t *valuep, const char *section, const char *option, apr_int64_t default_value)
Like svn_config_get(), but for 64-bit signed integers.
svn_error_t * svn_config_create(svn_config_t **cfgp, svn_boolean_t section_names_case_sensitive, apr_pool_t *result_pool)
Similar to svn_config_create2, but always passes FALSE to option_names_case_sensitive.
svn_error_t * svn_config_get_tristate(svn_config_t *cfg, svn_tristate_t *valuep, const char *section, const char *option, const char *unknown_value, svn_tristate_t default_value)
Like svn_config_get_bool(), but for tristate values.
svn_boolean_t(* svn_config_enumerator_t)(const char *name, const char *value, void *baton)
Similar to svn_config_enumerator2_t, but is not provided with a memory pool argument.
void svn_config_get(svn_config_t *cfg, const char **valuep, const char *section, const char *option, const char *default_value)
Find the value of a (section, option) pair in cfg, set *valuep to the value.
int svn_config_enumerate_sections(svn_config_t *cfg, svn_config_section_enumerator_t callback, void *baton)
Similar to svn_config_enumerate_sections2(), but uses a memory pool of cfg instead of one that is exp...
svn_error_t * svn_config_write_auth_data(apr_hash_t *hash, const char *cred_kind, const char *realmstring, const char *config_dir, apr_pool_t *pool)
Use cred_kind and realmstring to create or overwrite a file within the ~/.subversion/auth/ area...
void svn_config_set_bool(svn_config_t *cfg, const char *section, const char *option, svn_boolean_t value)
Like svn_config_set(), but for boolean values.
int svn_config_enumerate_sections2(svn_config_t *cfg, svn_config_section_enumerator2_t callback, void *baton, apr_pool_t *pool)
Enumerate the sections, passing baton and the current section's name to callback. ...
void svn_config_set(svn_config_t *cfg, const char *section, const char *option, const char *value)
Add or replace the value of a (section, option) pair in cfg with value.
svn_error_t * svn_config_get_config(apr_hash_t **cfg_hash, const char *config_dir, apr_pool_t *pool)
Read configuration information from the standard sources and merge it into the hash *cfg_hash...
svn_error_t * svn_config_read_auth_data(apr_hash_t **hash, const char *cred_kind, const char *realmstring, const char *config_dir, apr_pool_t *pool)
Use cred_kind and realmstring to locate a file within the ~/.subversion/auth/ area.
struct svn_config_t svn_config_t
Opaque structure describing a set of configuration options.
void svn_config_set_int64(svn_config_t *cfg, const char *section, const char *option, apr_int64_t value)
Like svn_config_set(), but for 64-bit signed integers.
svn_boolean_t(* svn_config_section_enumerator_t)(const char *name, void *baton)
Similar to svn_config_section_enumerator2_t, but is not provided with a memory pool argument...
svn_error_t * svn_config_get_server_setting_bool(svn_config_t *cfg, svn_boolean_t *valuep, const char *server_group, const char *option_name, svn_boolean_t default_value)
Set *valuep according to option_name for a given server_group in cfg, or set to default_value if no v...
svn_error_t * svn_config_create2(svn_config_t **cfgp, svn_boolean_t section_names_case_sensitive, svn_boolean_t option_names_case_sensitive, apr_pool_t *result_pool)
Set *cfgp to an empty svn_config_t structure, allocated in result_pool.
svn_error_t *(* svn_config_auth_walk_func_t)(svn_boolean_t *delete_cred, void *walk_baton, const char *cred_kind, const char *realmstring, apr_hash_t *hash, apr_pool_t *scratch_pool)
Callback for svn_config_walk_auth_data().
svn_error_t * svn_config_dup(svn_config_t **cfgp, const svn_config_t *src, apr_pool_t *pool)
Create a deep copy of the config object src and return it in cfgp, allocating the memory in pool...
svn_error_t * svn_config_read2(svn_config_t **cfgp, const char *file, svn_boolean_t must_exist, svn_boolean_t section_names_case_sensitive, apr_pool_t *result_pool)
Similar to svn_config_read3, but always passes FALSE to option_names_case_sensitive.
svn_error_t * svn_config_get_server_setting_int(svn_config_t *cfg, const char *server_group, const char *option_name, apr_int64_t default_value, apr_int64_t *result_value, apr_pool_t *pool)
Retrieve value into result_value corresponding to option_name for a given server_group in cfg...
const char * svn_config_find_group(svn_config_t *cfg, const char *key, const char *master_section, apr_pool_t *pool)
Enumerate the group master_section in cfg.
struct svn_stream_t svn_stream_t
An abstract stream of bytes–either incoming or outgoing or both.
int svn_config_enumerate(svn_config_t *cfg, const char *section, svn_config_enumerator_t callback, void *baton)
Similar to svn_config_enumerate2(), but uses a memory pool of cfg instead of one that is explicitly p...
Subversion's data types.
svn_error_t * svn_config_ensure(const char *config_dir, apr_pool_t *pool)
Try to ensure that the user's ~/.subversion/ area exists, and create no-op template files for any abs...
svn_error_t * svn_config_get_user_config_path(const char **path, const char *config_dir, const char *fname, apr_pool_t *pool)
Put the absolute path to the user's configuration directory, or to a file within that directory...
#define SVN_DEPRECATED
Macro used to mark deprecated functions.
svn_error_t * svn_config_get_yes_no_ask(svn_config_t *cfg, const char **valuep, const char *section, const char *option, const char *default_value)
Like svn_config_get(), but only for yes/no/ask values.
svn_error_t * svn_config_copy_config(apr_hash_t **cfg_hash, apr_hash_t *src_hash, apr_pool_t *pool)
Create a deep copy of the config hash src_hash and return it in cfg_hash, allocating the memory in po...
svn_error_t * svn_config_read3(svn_config_t **cfgp, const char *file, svn_boolean_t must_exist, svn_boolean_t section_names_case_sensitive, svn_boolean_t option_names_case_sensitive, apr_pool_t *result_pool)
Read configuration data from file (a file or registry path) into *cfgp, allocated in pool...
int svn_boolean_t
YABT: Yet Another Boolean Type.
const char * svn_config_get_server_setting(svn_config_t *cfg, const char *server_group, const char *option_name, const char *default_value)
Retrieve value corresponding to option_name in cfg, or return default_value if none is found...
svn_boolean_t(* svn_config_section_enumerator2_t)(const char *name, void *baton, apr_pool_t *pool)
A callback function used in enumerating config sections.
svn_error_t * svn_config_parse(svn_config_t **cfgp, svn_stream_t *stream, svn_boolean_t section_names_case_sensitive, svn_boolean_t option_names_case_sensitive, apr_pool_t *result_pool)
Read configuration data from stream into *cfgp, allocated in result_pool.