confile: config_syslog()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2017-05-30 03:49:54 +02:00
parent 151d2da2dd
commit ee10a69cfc
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -3300,9 +3300,17 @@ static int config_syslog(const char *key, const char *value,
{
int facility;
/* Clear any previously set value. */
if (lxc_conf->syslog) {
free(lxc_conf->syslog);
lxc_conf->syslog = NULL;
}
/* Check if value is empty. */
if (config_value_empty(value))
return 0;
/* Parse value. */
facility = lxc_syslog_priority_to_int(value);
if (facility == -EINVAL) {
ERROR("Wrong value for lxc.syslog.");