PolicyKit: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Wed Nov 28 19:34:09 PST 2007


 src/polkit/polkit-config.c       |    2 --
 src/polkit/polkit-context.c      |    6 ++----
 src/polkit/polkit-policy-cache.c |    6 ++----
 src/polkit/polkit-policy-file.c  |    6 ++----
 4 files changed, 6 insertions(+), 14 deletions(-)

New commits:
commit 84fb85774fe58c132ee98eed1a6dc6c5a0226d02
Author: David Zeuthen <davidz at redhat.com>
Date:   Wed Nov 28 22:32:52 2007 -0500

    avoid logging to syslog even for invalid files

diff --git a/src/polkit/polkit-config.c b/src/polkit/polkit-config.c
index 483d365..fd2ae30 100644
--- a/src/polkit/polkit-config.c
+++ b/src/polkit/polkit-config.c
@@ -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;
         }
 
diff --git a/src/polkit/polkit-context.c b/src/polkit/polkit-context.c
index 13a9072..e194eb5 100644
--- a/src/polkit/polkit-context.c
+++ b/src/polkit/polkit-context.c
@@ -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);
                 }
diff --git a/src/polkit/polkit-policy-cache.c b/src/polkit/polkit-policy-cache.c
index 52604c5..3e3d7ba 100644
--- a/src/polkit/polkit-policy-cache.c
+++ b/src/polkit/polkit-policy-cache.c
@@ -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;
                 }
diff --git a/src/polkit/polkit-policy-file.c b/src/polkit/polkit-policy-file.c
index 28bbcf8..5b04a2a 100644
--- a/src/polkit/polkit-policy-file.c
+++ b/src/polkit/polkit-policy-file.c
@@ -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;
         }
 


More information about the hal-commit mailing list