aboutsummaryrefslogtreecommitdiffstats
path: root/main/polkit/fix-consolekit-db-stat.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-08-17 14:55:35 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-08-17 14:59:45 +0300
commit6a5e2fc312f1763ce4a2ab832031662110be5929 (patch)
treeb04d22d3fd8d2061f70f7a1b3c89c62d024d60f4 /main/polkit/fix-consolekit-db-stat.patch
parent73b49d5c6083c9c71cf0ec9195cf2793e556c22c (diff)
downloadaports-6a5e2fc312f1763ce4a2ab832031662110be5929.tar.bz2
aports-6a5e2fc312f1763ce4a2ab832031662110be5929.tar.xz
main/polkit: fix consolekit db stat
fixes #3594
Diffstat (limited to 'main/polkit/fix-consolekit-db-stat.patch')
-rw-r--r--main/polkit/fix-consolekit-db-stat.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/main/polkit/fix-consolekit-db-stat.patch b/main/polkit/fix-consolekit-db-stat.patch
new file mode 100644
index 0000000000..3deceb6396
--- /dev/null
+++ b/main/polkit/fix-consolekit-db-stat.patch
@@ -0,0 +1,30 @@
+--- polkit-0.105.orig/src/polkitbackend/polkitbackendsessionmonitor.c 2012-04-24 19:05:34.000000000 +0300
++++ polkit-0.105/src/polkitbackend/polkitbackendsessionmonitor.c 2015-08-17 14:50:51.428580856 +0300
+@@ -47,7 +47,7 @@ struct _PolkitBackendSessionMonitor
+
+ GKeyFile *database;
+ GFileMonitor *database_monitor;
+- time_t database_mtime;
++ struct timespec database_mtim;
+ };
+
+ struct _PolkitBackendSessionMonitorClass
+@@ -95,7 +95,7 @@ reload_database (PolkitBackendSessionMon
+ goto out;
+ }
+
+- monitor->database_mtime = statbuf.st_mtime;
++ monitor->database_mtim = statbuf.st_mtim;
+
+ monitor->database = g_key_file_new ();
+ if (!g_key_file_load_from_file (monitor->database,
+@@ -131,7 +131,8 @@ ensure_database (PolkitBackendSessionMon
+ strerror (errno));
+ goto out;
+ }
+- if (statbuf.st_mtime == monitor->database_mtime)
++ if (statbuf.st_mtim.tv_sec == monitor->database_mtim.tv_sec &&
++ statbuf.st_mtim.tv_nsec == monitor->database_mtim.tv_nsec)
+ {
+ ret = TRUE;
+ goto out;