summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2009-07-23 09:27:47 -0400
committerDavid Zeuthen <davidz@redhat.com>2009-07-23 09:27:47 -0400
commit52ab38452b2535bec1276bc82bb73b02d138c091 (patch)
tree1dfbb7aad580040720234b645b705479e1a3e72e
parentbc5c117cbd769488f425f0de6fed30c221812c5c (diff)
downloadpolkit-52ab38452b2535bec1276bc82bb73b02d138c091.tar.gz
Ignore .pkla files starting with dot and don't segfault on error path
-rw-r--r--src/polkitbackend/polkitbackendlocalauthorizationstore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/polkitbackend/polkitbackendlocalauthorizationstore.c b/src/polkitbackend/polkitbackendlocalauthorizationstore.c
index 413ed4b..1c898f7 100644
--- a/src/polkitbackend/polkitbackendlocalauthorizationstore.c
+++ b/src/polkitbackend/polkitbackendlocalauthorizationstore.c
@@ -520,7 +520,7 @@ polkit_backend_local_authorization_store_ensure (PolkitBackendLocalAuthorization
name = g_file_info_get_name (file_info);
/* only consider files with the appropriate extension */
- if (g_str_has_suffix (name, store->priv->extension))
+ if (g_str_has_suffix (name, store->priv->extension) && name[0] != '.')
files = g_list_prepend (files, g_file_get_child (store->priv->directory, name));
g_object_unref (file_info);
@@ -548,7 +548,7 @@ polkit_backend_local_authorization_store_ensure (PolkitBackendLocalAuthorization
if (!g_key_file_load_from_file (key_file,
filename,
G_KEY_FILE_NONE,
- NULL))
+ &error))
{
g_warning ("Error loading key-file %s: %s", filename, error->message);
g_error_free (error);