Commit 84fb8577 authored by David Zeuthen's avatar David Zeuthen
Browse files

avoid logging to syslog even for invalid files

parent 03ec92f6
......@@ -352,8 +352,6 @@ _start (void *data, const char *el, const char **attr)
if (state == STATE_NONE || node == NULL) {
kit_warning ("skipping unknown tag <%s> at line %d of %s",
el, (int) XML_GetCurrentLineNumber (pd->parser), pd->path);
syslog (LOG_ALERT, "libpolkit: skipping unknown tag <%s> at line %d of %s",
el, (int) XML_GetCurrentLineNumber (pd->parser), pd->path);
state = STATE_UNKNOWN_TAG;
}
......
......@@ -809,10 +809,8 @@ polkit_context_get_config (PolKitContext *pk_context, PolKitError **error)
pk_context->config = polkit_config_new (PACKAGE_SYSCONF_DIR "/PolicyKit/PolicyKit.conf", pk_error);
/* if configuration file was bad, log it */
if (pk_context->config == NULL) {
_pk_debug ("failed to load configuration file: %s",
polkit_error_get_error_message (*pk_error));
syslog (LOG_ALERT, "libpolkit: failed to load configuration file: %s",
polkit_error_get_error_message (*pk_error));
kit_warning ("failed to load configuration file: %s",
polkit_error_get_error_message (*pk_error));
if (pk_error == &pk_error2)
polkit_error_free (*pk_error);
}
......
......@@ -152,10 +152,8 @@ _polkit_policy_cache_new (const char *dirname, polkit_bool_t load_descriptions,
goto out;
}
_pk_debug ("libpolkit: ignoring malformed policy file: %s",
polkit_error_get_error_message (pk_error));
syslog (LOG_ALERT, "libpolkit: ignoring malformed policy file: %s",
polkit_error_get_error_message (pk_error));
//kit_warning ("libpolkit: ignoring malformed policy file: %s",
// polkit_error_get_error_message (pk_error));
polkit_error_free (pk_error);
continue;
}
......
......@@ -286,10 +286,8 @@ _start (void *data, const char *el, const char **attr)
}
if (state == STATE_NONE) {
//g_warning ("skipping unknown tag <%s> at line %d of %s",
// el, (int) XML_GetCurrentLineNumber (pd->parser), pd->path);
//syslog (LOG_ALERT, "libpolkit: skipping unknown tag <%s> at line %d of %s",
// el, (int) XML_GetCurrentLineNumber (pd->parser), pd->path);
//kit_warning ("skipping unknown tag <%s> at line %d of %s",
// el, (int) XML_GetCurrentLineNumber (pd->parser), pd->path);
state = STATE_UNKNOWN_TAG;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment