PolicyKit: Branch 'master' - 5 commits
Miloslav Trmac
mitr at kemper.freedesktop.org
Mon Jun 8 08:42:23 PDT 2015
docs/polkit/Makefile.am | 2 +-
src/examples/Makefile.am | 2 +-
src/polkit/Makefile.am | 2 +-
src/polkitagent/Makefile.am | 2 +-
src/polkitagent/polkitagenthelper-pam.c | 2 +-
src/polkitbackend/Makefile.am | 2 +-
src/polkitbackend/polkitbackendinteractiveauthority.c | 9 ++++++---
src/polkitbackend/polkitbackendjsauthority.c | 4 ++--
src/programs/Makefile.am | 2 +-
test/polkit/Makefile.am | 2 +-
test/polkitbackend/Makefile.am | 2 +-
11 files changed, 17 insertions(+), 14 deletions(-)
New commits:
commit 2a6aa19c2c774f40288bf8f6dd56d9492f1e32f8
Author: Miloslav Trmač <mitr at redhat.com>
Date: Tue Jul 1 19:40:47 2014 +0200
s/INCLUDES/AM_CPPFLAGS/g
to silence
warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
https://bugs.freedesktop.org/show_bug.cgi?id=80767
diff --git a/docs/polkit/Makefile.am b/docs/polkit/Makefile.am
index cd163b4..1fce92c 100644
--- a/docs/polkit/Makefile.am
+++ b/docs/polkit/Makefile.am
@@ -30,7 +30,7 @@ IGNORE_HFILES= \
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
-INCLUDES = \
+AM_CPPFLAGS = \
$(GLIB_CFLAGS) \
-I$(top_srcdir)/src/polkit \
-I$(top_builddir)/src/polkit \
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
index c749c54..71c4991 100644
--- a/src/examples/Makefile.am
+++ b/src/examples/Makefile.am
@@ -1,7 +1,7 @@
NULL =
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
diff --git a/src/polkit/Makefile.am b/src/polkit/Makefile.am
index 0224b8c..51befaf 100644
--- a/src/polkit/Makefile.am
+++ b/src/polkit/Makefile.am
@@ -1,6 +1,6 @@
NULL =
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
diff --git a/src/polkitagent/Makefile.am b/src/polkitagent/Makefile.am
index bc930d2..58a55bd 100644
--- a/src/polkitagent/Makefile.am
+++ b/src/polkitagent/Makefile.am
@@ -1,6 +1,6 @@
NULL =
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
-I$(top_builddir)/src/polkit \
diff --git a/src/polkitbackend/Makefile.am b/src/polkitbackend/Makefile.am
index 52013f6..547ca82 100644
--- a/src/polkitbackend/Makefile.am
+++ b/src/polkitbackend/Makefile.am
@@ -2,7 +2,7 @@ NULL =
BUILT_SOURCES =
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
-I$(top_builddir)/src/polkit \
diff --git a/src/programs/Makefile.am b/src/programs/Makefile.am
index dee7cea..880b90b 100644
--- a/src/programs/Makefile.am
+++ b/src/programs/Makefile.am
@@ -1,7 +1,7 @@
NULL =
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
diff --git a/test/polkit/Makefile.am b/test/polkit/Makefile.am
index 802f2be..1e0a23f 100644
--- a/test/polkit/Makefile.am
+++ b/test/polkit/Makefile.am
@@ -1,7 +1,7 @@
NULL =
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
-I$(top_srcdir)/test \
diff --git a/test/polkitbackend/Makefile.am b/test/polkitbackend/Makefile.am
index 632571e..8859c1f 100644
--- a/test/polkitbackend/Makefile.am
+++ b/test/polkitbackend/Makefile.am
@@ -1,7 +1,7 @@
NULL =
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
-I$(top_srcdir)/test \
commit 6f242a706f8c9694b9de00757c1bdbee8d7cdfb4
Author: Miloslav Trmač <mitr at redhat.com>
Date: Fri Jan 17 16:33:00 2014 +0100
Fix a typo, s/Evaluting/Evaluating/g
https://bugs.freedesktop.org/show_bug.cgi?id=80767
diff --git a/src/polkitbackend/polkitbackendjsauthority.c b/src/polkitbackend/polkitbackendjsauthority.c
index d18b5b1..c232573 100644
--- a/src/polkitbackend/polkitbackendjsauthority.c
+++ b/src/polkitbackend/polkitbackendjsauthority.c
@@ -740,7 +740,7 @@ subject_to_jsval (PolkitBackendJsAuthority *authority,
__FILE__, __LINE__,
&ret_jsval))
{
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Evaluting '%s' failed", src);
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Evaluating '%s' failed", src);
goto out;
}
@@ -866,7 +866,7 @@ action_and_details_to_jsval (PolkitBackendJsAuthority *authority,
__FILE__, __LINE__,
&ret_jsval))
{
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Evaluting '%s' failed", src);
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Evaluating '%s' failed", src);
goto out;
}
commit 4746ed694e087efb122730779ba87a9030ad8946
Author: Miloslav Trmač <mitr at redhat.com>
Date: Wed Jun 11 22:49:35 2014 +0200
Simplify forced error domain registration
POLKIT_ERROR is a function call which we need for the side effect.
https://bugs.freedesktop.org/show_bug.cgi?id=80767
diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c
index fa9278f..dab2756 100644
--- a/src/polkitbackend/polkitbackendinteractiveauthority.c
+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c
@@ -278,10 +278,9 @@ polkit_backend_interactive_authority_init (PolkitBackendInteractiveAuthority *au
PolkitBackendInteractiveAuthorityPrivate *priv;
GFile *directory;
GError *error;
- static volatile GQuark domain = 0;
/* Force registering error domain */
- domain = POLKIT_ERROR; domain;
+ (void)POLKIT_ERROR;
priv = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_GET_PRIVATE (authority);
commit 37143eb06cb0c4dffca67079dd1c10c5b191b6a7
Author: Miloslav Trmač <mitr at redhat.com>
Date: Wed Jun 11 22:44:28 2014 +0200
Remove a redundant assignment.
Instead of a nonsensical (data = data), use the more customary
((void)data) to silence the warning about an unused parameter.
https://bugs.freedesktop.org/show_bug.cgi?id=80767
diff --git a/src/polkitagent/polkitagenthelper-pam.c b/src/polkitagent/polkitagenthelper-pam.c
index 292abbe..937386e 100644
--- a/src/polkitagent/polkitagenthelper-pam.c
+++ b/src/polkitagent/polkitagenthelper-pam.c
@@ -230,7 +230,7 @@ conversation_function (int n, const struct pam_message **msg, struct pam_respons
gchar *tmp = NULL;
size_t len;
- data = data;
+ (void)data;
if (n <= 0 || n > PAM_MAX_NUM_MSG)
return PAM_CONV_ERR;
commit 6109543303def367b84eaac97d2ff9cefe735efb
Author: Miloslav Trmač <mitr at redhat.com>
Date: Wed Jun 11 22:36:50 2014 +0200
Fix a possible NULL dereference.
polkit_backend_session_monitor_get_user_for_subject() may return NULL
(and because it is using external processes, we can’t really rule it
out). The code was already anticipating NULL in the cleanup section, so
handle it also when actually using the value.
https://bugs.freedesktop.org/show_bug.cgi?id=80767
diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c
index c9e10d8..fa9278f 100644
--- a/src/polkitbackend/polkitbackendinteractiveauthority.c
+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c
@@ -559,7 +559,11 @@ log_result (PolkitBackendInteractiveAuthority *authority,
user_of_subject = polkit_backend_session_monitor_get_user_for_subject (priv->session_monitor, subject, NULL);
subject_str = polkit_subject_to_string (subject);
- user_of_subject_str = polkit_identity_to_string (user_of_subject);
+
+ if (user_of_subject != NULL)
+ user_of_subject_str = polkit_identity_to_string (user_of_subject);
+ else
+ user_of_subject_str = g_strdup ("<unknown>");
caller_str = polkit_subject_to_string (caller);
subject_cmdline = _polkit_subject_get_cmdline (subject);
More information about the hal-commit
mailing list