summaryrefslogtreecommitdiff
path: root/system/polkit/fix-consolekit-db-stat.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-20 22:02:02 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-20 22:02:02 -0600
commitee33a1a838ae6aa5bdb1de6688c79883d9e35fe3 (patch)
treeb5b4825c22251afb02abf8cf5bcf6a9e90b9291b /system/polkit/fix-consolekit-db-stat.patch
parent0007a6ccd7d5975b19c9033eb7bc2ce3aa98f35b (diff)
downloadpackages-ee33a1a838ae6aa5bdb1de6688c79883d9e35fe3.tar.gz
packages-ee33a1a838ae6aa5bdb1de6688c79883d9e35fe3.tar.bz2
packages-ee33a1a838ae6aa5bdb1de6688c79883d9e35fe3.tar.xz
packages-ee33a1a838ae6aa5bdb1de6688c79883d9e35fe3.zip
system/polkit: add PAM-enabled PolicyKit
Diffstat (limited to 'system/polkit/fix-consolekit-db-stat.patch')
-rw-r--r--system/polkit/fix-consolekit-db-stat.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/system/polkit/fix-consolekit-db-stat.patch b/system/polkit/fix-consolekit-db-stat.patch
new file mode 100644
index 000000000..3deceb639
--- /dev/null
+++ b/system/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;