diff options
| author | beatrice <beatrice@dangofactory.net> | 2026-11-22 19:25:05 +0900 |
|---|---|---|
| committer | beatrice <beatrice@dangofactory.net> | 2026-11-22 19:25:05 +0900 |
| commit | c7a201b58080c7a0f57b38c59e7865aa42c1d029 (patch) | |
| tree | cde6146e3aada31e68594fd4f034abe90621ce34 /parseconf.h | |
| download | vsftpd-master.tar.gz vsftpd-master.zip | |
Import vsftpd-3.0.5.tar.gzHEADlocal/vsftpdmaster
Diffstat (limited to 'parseconf.h')
| -rw-r--r-- | parseconf.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/parseconf.h b/parseconf.h new file mode 100644 index 0000000..5a7a63b --- /dev/null +++ b/parseconf.h @@ -0,0 +1,31 @@ +#ifndef VSF_PARSECONF_H +#define VSF_PARSECONF_H + +/* vsf_parseconf_load_file() + * PURPOSE + * Parse the given file as a vsftpd config file. If the file cannot be + * opened for whatever reason, a fatal error is raised. If the file contains + * any syntax errors, a fatal error is raised. + * If the call returns (no fatal error raised), then the config file was + * parsed and the global config settings will have been updated. + * PARAMETERS + * p_filename - the name of the config file to parse + * errs_fatal - errors will cause the calling process to exit if not 0 + * NOTES + * If p_filename is NULL, then the last filename passed to this function is + * used to reload the configuration details. + */ +void vsf_parseconf_load_file(const char* p_filename, int errs_fatal); + +/* vsf_parseconf_parse_setting() + * PURPOSE + * Handle a given name=value setting and apply it. Any whitespace at the + * beginning is skipped. + * PARAMETERS + * p_settings - the name=value pair to apply + * errs_fatal - errors will cause the calling process to exit if not 0 + */ +void vsf_parseconf_load_setting(const char* p_setting, int errs_fatal); + +#endif /* VSF_PARSECONF_H */ + |
