aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-07-16 09:29:48 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-07-16 09:29:48 +0300
commit4549c2d6d9f7533541eb9ee4f4cf3190b94565f7 (patch)
tree098fea3310f5a442d03b3ae04380f88a5275edfd
parent48298a6a531c0b5c292cdd565dd7e02484998b3c (diff)
downloadwydawca-4549c2d6d9f7533541eb9ee4f4cf3190b94565f7.tar.gz
wydawca-4549c2d6d9f7533541eb9ee4f4cf3190b94565f7.tar.bz2
Bugfix
* src/config.c: Use GRECS_CONST with string types.
-rw-r--r--src/config.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/config.c b/src/config.c
index 8e94b8e..6342f2f 100644
--- a/src/config.c
+++ b/src/config.c
@@ -526,34 +526,34 @@ cb_sql(enum grecs_callback_command cmd, grecs_node_t *node,
return 0;
}
static struct grecs_keyword sql_kw[] = {
{ "config-file", N_("file"),
N_("Read MySQL configuration from <file>"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct sqlconn, config_file) },
{ "config-group", N_("name"),
N_("Read the named group from the SQL configuration file"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct sqlconn, config_group) },
{ "host", N_("host"),
N_("Set SQL server hostname or IP address"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, 0, cb_sql_host },
{ "database", N_("dbname"), N_("Set database name"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct sqlconn, database), },
{ "user", N_("name"), N_("Set SQL user name"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct sqlconn, user) },
{ "password", N_("arg"), N_("Set SQL user password"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct sqlconn, password) },
{ "ssl-ca", N_("file"),
N_("File name of the Certificate Authority (CA) certificate"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct sqlconn, cacert) },
{ NULL }
};
static int
cb_syslog_facility(enum grecs_callback_command cmd, grecs_node_t *node,
@@ -579,20 +579,20 @@ cb_syslog_facility(enum grecs_callback_command cmd, grecs_node_t *node,
static struct grecs_keyword syslog_kw[] = {
{ "facility",
N_("name"),
N_("Set syslog facility. Arg is one of the following: user, daemon, "
"auth, authpriv, mail, cron, local0 through local7 "
"(case-insensitive), or a facility number."),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
&wy_log_facility, 0, cb_syslog_facility },
{ "tag", N_("string"), N_("Tag syslog messages with this string"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
&wy_syslog_tag },
{ "print-priority", N_("arg"),
N_("Prefix each message with its priority"),
- grecs_type_bool, GRECS_DFLT,
+ grecs_type_bool, GRECS_CONST,
&syslog_include_prio },
{ NULL },
};
static struct keyword backup_tab[] = {
{ "none", no_backups },
@@ -640,17 +640,17 @@ cb_backup(enum grecs_callback_command cmd, grecs_node_t *node,
return 0;
}
static struct grecs_keyword archive_kw[] = {
{ "name", N_("file-or-dir"),
N_("Name of archive file or directory"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct archive_descr, name) },
{ "backup", N_("type"),
N_("Define backup type"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct archive_descr, backup_type),
cb_backup },
{ NULL }
};
static int
@@ -735,24 +735,24 @@ cb_statistics(enum grecs_callback_command cmd, grecs_node_t *node,
return parse_statmask(&node->locus, node->v.value, varptr);
}
static struct grecs_keyword notify_event_kw[] = {
{ "event", N_("ev-id"),
N_("Event on which to notify"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct notification, ev), cb_event },
{ "module", N_("name"),
N_("Name of the module to invoke on event"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct notification, modname) },
{ "module-config", NULL,
N_("Module-specific configuration data"),
grecs_type_section, GRECS_INAC, NULL, 0, NULL, NULL, NULL },
{ "statistics", N_("items"),
N_("Send mail if one or more of these items are set"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct notification, statmask), cb_statistics },
{ NULL }
};
static int
@@ -864,17 +864,17 @@ cb_dictionary_params(enum grecs_callback_command cmd, grecs_node_t *node,
return 0;
}
static struct grecs_keyword dictionary_kw[] = {
{ "type", N_("type"),
N_("Dictionary type"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct dictionary, type),
cb_dictionary_type },
{ "query", N_("string"), N_("Query template"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct dictionary, query) },
{ "params", N_("arg"), N_("Set dictionary parameters"),
grecs_type_string, GRECS_LIST,
NULL, 0, cb_dictionary_params },
{ NULL }
};
@@ -973,26 +973,26 @@ cb_url(enum grecs_callback_command cmd, grecs_node_t *node,
*purl = url;
return 0;
}
static struct grecs_keyword spool_kw[] = {
{ "url", N_("arg"), N_("URL corresponding to this spool"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct spool, url) },
{ "alias", N_("arg"), N_("Aliases"),
grecs_type_string, GRECS_LIST,
NULL, offsetof(struct spool, aliases) },
{ "source", N_("dir"), N_("Source directory"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct spool, source_dir) },
{ "destination", N_("dir"), N_("Destination directory"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct spool, dest_url),
cb_url },
{ "file-sweep-time", N_("interval"), N_("Define file sweep time"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct spool, file_sweep_time),
cb_interval },
{ "inotify", NULL, N_("Enable or disable inotify for this spool"),
grecs_type_bool, GRECS_DFLT,
NULL, offsetof(struct spool, inotify_enable), },
@@ -1006,13 +1006,13 @@ static struct grecs_keyword spool_kw[] = {
cb_archive, NULL, archive_kw },
{ "notify-event", NULL, N_("Configure notification"),
grecs_type_section, GRECS_MULT,
NULL, offsetof(struct spool, notification),
cb_notify_event, NULL, notify_event_kw },
{ "check-script", NULL, N_("A /bin/sh script to verify the tarball"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
NULL, offsetof(struct spool, check_script) },
{ NULL }
};
static int
cb_spool(enum grecs_callback_command cmd, grecs_node_t *node,
@@ -1167,17 +1167,17 @@ cb_supp_groups(enum grecs_callback_command cmd, grecs_node_t *node,
}
static struct grecs_keyword locking_kw[] = {
{ "enable", NULL, N_("Enable or disable locking"),
grecs_type_bool, GRECS_DFLT, &enable_locking },
{ "directory", N_("dir"), N_("Set directory for lock files"),
- grecs_type_string, GRECS_DFLT, &lockdir },
+ grecs_type_string, GRECS_CONST, &lockdir },
{ "expire-time", N_("interval"), N_("Define lock expiration interval"),
- grecs_type_string, GRECS_DFLT, &lock_expire_time, 0, cb_interval },
+ grecs_type_string, GRECS_CONST, &lock_expire_time, 0, cb_interval },
{ "timeout", N_("interval"), N_("Locking timeout"),
- grecs_type_string, GRECS_DFLT, &lock_timeout, 0, cb_interval },
+ grecs_type_string, GRECS_CONST, &lock_timeout, 0, cb_interval },
{ NULL }
};
static int
cb_locking(enum grecs_callback_command cmd, grecs_node_t *node,
void *varptr, void *cb_data)
@@ -1273,15 +1273,15 @@ static struct grecs_keyword wydawca_kw[] = {
grecs_type_bool, GRECS_DFLT, &daemon_mode },
{ "foreground", NULL, N_("Start in foreground even in daemon mode"),
grecs_type_bool, GRECS_DFLT, &foreground },
{ "single-process", NULL, N_("Do not spawn subprocesses"),
grecs_type_bool, GRECS_DFLT, &single_process },
{ "wakeup-interval", N_("time"), N_("Set wake-up interval"),
- grecs_type_string, GRECS_DFLT, &wakeup_interval, 0, cb_interval },
+ grecs_type_string, GRECS_CONST, &wakeup_interval, 0, cb_interval },
{ "pidfile", N_("file"), N_("Set pid file name"),
- grecs_type_string, GRECS_DFLT, &pidfile },
+ grecs_type_string, GRECS_CONST, &pidfile },
{ "module-prepend-load-path", N_("path"),
N_("List of directories searched for modules prior to "
"the default module directory"),
grecs_type_string, GRECS_LIST|GRECS_AGGR,
&module_prepend_load_path, 0, cb_load_path },
@@ -1298,23 +1298,23 @@ static struct grecs_keyword wydawca_kw[] = {
grecs_type_section, GRECS_INAC, NULL, 0, NULL, NULL, NULL },
{ "inotify", NULL, N_("Enable or disable inotify support"),
grecs_type_bool, GRECS_DFLT, &inotify_enable },
{ "user", N_("name"), N_("Run with UID and GID of this user"),
- grecs_type_string, GRECS_DFLT, NULL, 0, cb_user },
+ grecs_type_string, GRECS_CONST, NULL, 0, cb_user },
{ "group", NULL, N_("Retain these supplementary groups"),
grecs_type_string, GRECS_LIST, NULL, 0, cb_supp_groups },
{ "min-version", N_("major.minor"),
N_("Set minimal allowed directive file version"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
&min_directive_version, 0, cb_upload_version },
{ "max-version", N_("major.minor"),
N_("Set maximal allowed directive file version"),
- grecs_type_string, GRECS_DFLT,
+ grecs_type_string, GRECS_CONST,
&max_directive_version, 0, cb_upload_version },
{ "locking", NULL, N_("Configure locking"),
grecs_type_section, GRECS_DFLT, NULL, 0,
cb_locking, NULL, locking_kw },
@@ -1326,26 +1326,26 @@ static struct grecs_keyword wydawca_kw[] = {
grecs_type_section, GRECS_DFLT, NULL, 0,
NULL, NULL, tcpwrapper_kw },
#endif
/* FIXME: Must be a built-in type? */
{ "file-sweep-time", N_("interval"), N_("Define file sweep time"),
- grecs_type_string, GRECS_DFLT, &file_sweep_time, 0, cb_interval },
+ grecs_type_string, GRECS_CONST, &file_sweep_time, 0, cb_interval },
{ "tar-program", N_("prog"), N_("Set tar invocation command line"),
- grecs_type_string, GRECS_DFLT, &tar_command_name, 0,
+ grecs_type_string, GRECS_CONST, &tar_command_name, 0,
cb_absolute_name },
{ "umask", N_("mask: octal"), N_("Set umask"),
- grecs_type_string, GRECS_DFLT, NULL, 0, cb_set_umask },
+ grecs_type_string, GRECS_CONST, NULL, 0, cb_set_umask },
{ "archive-signatures", NULL,
N_("Control implicit signature archivation"),
grecs_type_bool, GRECS_DFLT, &archive_signatures },
{ "statistics", N_("items"), N_("Print these stats at the end of run"),
- grecs_type_string, GRECS_DFLT, &print_stats, 0, wy_cb_statistics },
+ grecs_type_string, GRECS_CONST, &print_stats, 0, wy_cb_statistics },
{ "sql", N_("id: string"), N_("Define SQL database"),
grecs_type_section, GRECS_DFLT, NULL, 0, cb_sql, NULL, sql_kw },
{ "syslog", NULL, N_("Configure syslog logging"),
grecs_type_section, GRECS_DFLT, NULL, 0, NULL, NULL, syslog_kw },
@@ -1360,24 +1360,24 @@ static struct grecs_keyword wydawca_kw[] = {
{ "dictionary", N_("ident"), N_("Define data dictionary"),
grecs_type_section, GRECS_DFLT, default_dictionary, 0,
cb_dictionary, NULL, dictionary_kw },
{ "check-script", NULL, N_("A /bin/sh script to verify tarballs"),
- grecs_type_string, GRECS_DFLT, &default_check_script },
+ grecs_type_string, GRECS_CONST, &default_check_script },
{ "spool", N_("tag: string"), N_("Define distribution spool"),
grecs_type_section, GRECS_DFLT, NULL, 0,
cb_spool, NULL, spool_kw },
{ "all-spools", NULL,
N_("Service names that request scanning all spools"),
grecs_type_string, GRECS_LIST, &all_spool_aliases },
{ "gpg-homedir", NULL, N_("GPG home directory"),
- grecs_type_string, GRECS_DFLT, &wy_gpg_homedir },
+ grecs_type_string, GRECS_CONST, &wy_gpg_homedir },
{NULL}
};
void
config_help()

Return to:

Send suggestions and report system problems to the System administrator.