PolicyKit: Branch 'master' - 2 commits
David Zeuthen
david at kemper.freedesktop.org
Mon Jun 8 11:24:18 PDT 2009
data/org.freedesktop.PolicyKit1.Authority.xml | 21 ++++++++++++++-------
docs/extensiondir.xml.in | 2 +-
src/nullbackend/Makefile.am | 12 ++++++------
src/polkitbackend/Makefile.am | 2 +-
src/polkitbackend/polkitbackendauthority.c | 4 ++--
src/programs/Makefile.am | 12 ++++++------
6 files changed, 30 insertions(+), 23 deletions(-)
New commits:
commit e74ca1a5828b155df4fd88212eff904e88659d8a
Author: David Zeuthen <davidz at redhat.com>
Date: Mon Jun 8 14:21:27 2009 -0400
Use .../extensions instead of ../backends for loading extensions
diff --git a/docs/extensiondir.xml.in b/docs/extensiondir.xml.in
index c12c3d6..44e242c 100644
--- a/docs/extensiondir.xml.in
+++ b/docs/extensiondir.xml.in
@@ -1 +1 @@
- at libdir@/polkit-1/backends
+ at libdir@/polkit-1/extensions
diff --git a/src/nullbackend/Makefile.am b/src/nullbackend/Makefile.am
index c943da1..82de8ce 100644
--- a/src/nullbackend/Makefile.am
+++ b/src/nullbackend/Makefile.am
@@ -17,27 +17,27 @@ INCLUDES = \
-D_REENTRANT \
$(NULL)
-polkitmodulesdir = $(libdir)/polkit-1/backends
-polkitmodules_LTLIBRARIES = libpolkit-nullbackend.la
+polkitmodulesdir = $(libdir)/polkit-1/extensions
+polkitmodules_LTLIBRARIES = nullbackend.la
-libpolkit_nullbackend_la_SOURCES = \
+nullbackend_la_SOURCES = \
nullbackend.c \
polkitbackendnullauthority.c polkitbackendnullauthority.h \
$(NULL)
-libpolkit_nullbackend_la_CFLAGS = \
+nullbackend_la_CFLAGS = \
-DPOLKIT_BACKEND_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
-DG_LOG_DOMAIN=\"PolkitNullBackend\" \
$(GLIB_CFLAGS) \
$(NULL)
-libpolkit_nullbackend_la_LDFLAGS = \
+nullbackend_la_LDFLAGS = \
$(module_flags) \
$(GLIB_LDADD) \
$(top_builddir)/src/polkitbackend/libpolkit-backend-1.la \
$(NULL)
-libpolkit_nullbackend_la_LIBADD = \
+nullbackend_la_LIBADD = \
$(NULL)
nullconfigdir = $(sysconfdir)/polkit-1/nullbackend.conf.d
diff --git a/src/polkitbackend/Makefile.am b/src/polkitbackend/Makefile.am
index a49e131..b33e33d 100644
--- a/src/polkitbackend/Makefile.am
+++ b/src/polkitbackend/Makefile.am
@@ -93,4 +93,4 @@ clean-local :
install-exec-hook:
mkdir -p $(DESTDIR)$(localstatedir)/lib/polkit-1
-chmod 600 $(DESTDIR)$(localstatedir)/lib/polkit-1
- mkdir -p $(DESTDIR)$(libdir)/polkit-1/backends
+ mkdir -p $(DESTDIR)$(libdir)/polkit-1/extensions
diff --git a/src/polkitbackend/polkitbackendauthority.c b/src/polkitbackend/polkitbackendauthority.c
index 63f252d..8051ecf 100644
--- a/src/polkitbackend/polkitbackendauthority.c
+++ b/src/polkitbackend/polkitbackendauthority.c
@@ -1287,7 +1287,7 @@ polkit_backend_register_authority (PolkitBackendAuthority *authority,
/**
* polkit_backend_authority_get:
*
- * Loads all #GIOModule<!-- -->s from <literal>$(libdir)/polkit-1/backends</literal> to determine
+ * Loads all #GIOModule<!-- -->s from <filename>$(libdir)/polkit-1/extensions</filename> to determine
* what implementation of #PolkitBackendAuthority to use. Then instantiates an object of the
* implementation with the highest priority and unloads all other modules.
*
@@ -1323,7 +1323,7 @@ polkit_backend_authority_get (void)
}
/* load all modules */
- modules = g_io_modules_load_all_in_directory (PACKAGE_LIB_DIR "/polkit-1/backends");
+ modules = g_io_modules_load_all_in_directory (PACKAGE_LIB_DIR "/polkit-1/extensions");
/* find all extensions; we have at least one here since we've registered the local backend */
authority_implementations = g_io_extension_point_get_extensions (ep);
diff --git a/src/programs/Makefile.am b/src/programs/Makefile.am
index 1765768..c504889 100644
--- a/src/programs/Makefile.am
+++ b/src/programs/Makefile.am
@@ -32,25 +32,25 @@ pkexec_LDADD = \
$(top_builddir)/src/polkit/libpolkit-gobject-1.la \
$(NULL)
-polkitmodulesdir = $(libdir)/polkit-1/backends
-polkitmodules_LTLIBRARIES = libpolkit-pkexec-action-lookup.la
+polkitmodulesdir = $(libdir)/polkit-1/extensions
+polkitmodules_LTLIBRARIES = pkexec-action-lookup.la
-libpolkit_pkexec_action_lookup_la_SOURCES = \
+pkexec_action_lookup_la_SOURCES = \
pkexec-action-lookup.c \
$(NULL)
-libpolkit_pkexec_action_lookup_la_CFLAGS = \
+pkexec_action_lookup_la_CFLAGS = \
-DPOLKIT_BACKEND_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
-DG_LOG_DOMAIN=\"pkexec-action-lookup\" \
$(GLIB_CFLAGS) \
$(NULL)
-libpolkit_pkexec_action_lookup_la_LDFLAGS = \
+pkexec_action_lookup_la_LDFLAGS = \
-export_dynamic -avoid-version -module -no-undefined \
-export-symbols-regex '^g_io_module_(load|unload)' \
$(NULL)
-libpolkit_pkexec_action_lookup_la_LIBADD = \
+pkexec_action_lookup_la_LIBADD = \
$(top_builddir)/src/polkitbackend/libpolkit-backend-1.la \
$(NULL)
commit 86e8003484056ce734e45e899ea5f17e144e6d2f
Author: David Zeuthen <davidz at redhat.com>
Date: Mon Jun 8 14:20:55 2009 -0400
Expand on the D-Bus docs
diff --git a/data/org.freedesktop.PolicyKit1.Authority.xml b/data/org.freedesktop.PolicyKit1.Authority.xml
index 84b22f5..ed4e57a 100644
--- a/data/org.freedesktop.PolicyKit1.Authority.xml
+++ b/data/org.freedesktop.PolicyKit1.Authority.xml
@@ -11,7 +11,10 @@
<!-- Subject struct -->
<annotation name="org.gtk.EggDBus.DeclareStruct" value="Subject">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Subjects"/>
- <annotation name="org.gtk.EggDBus.DocString" value="<para>This struct describes subjects such as UNIX processes. It is typically used to check if a given process is authorized for an action.</para><para>TODO: document required/optional key/value pairs in @subject_details.</para>"/>
+ <annotation name="org.gtk.EggDBus.DocString" value="<para>This struct describes subjects such as UNIX processes. It is typically used to check if a given process is authorized for an action.</para><para>The following kinds of subjects are known:</para>
+ <formalpara><title>Unix Process</title><para><literal>subject_kind</literal> should be set to <literal>unix-process</literal> with keys <literal>pid</literal> (of type <literal>uint32</literal>) and <literal>start-time</literal> (of type <literal>uint64</literal>).</para></formalpara>
+ <formalpara><title>Unix Session</title><para><literal>subject_kind</literal> should be set to <literal>unix-session</literal> with the key <literal>session-id</literal> (of type <literal>string</literal>).</para></formalpara>
+ <formalpara><title>System Bus Name</title><para><literal>subject_kind</literal> should be set to <literal>system-bus-name</literal> with the key <literal>name</literal> (of type <literal>string</literal>).</para></formalpara>"/>
<annotation name="org.gtk.EggDBus.Struct.Member" value="String:subject_kind">
<annotation name="org.gtk.EggDBus.DocString" value="The type of the subject."/>
@@ -28,7 +31,11 @@
<!-- Identity struct -->
<annotation name="org.gtk.EggDBus.DeclareStruct" value="Identity">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Subjects"/>
- <annotation name="org.gtk.EggDBus.DocString" value="<para>This struct describes identities such as UNIX users and UNIX groups. It is typically used to check if a given process is authorized for an action.</para><para>TODO: document required/optional key/value pairs in @identity_details.</para>"/>
+ <annotation name="org.gtk.EggDBus.DocString" value="<para>This struct describes identities such as UNIX users and UNIX groups. It is typically used to check if a given process is authorized for an action.</para><para>The following kinds of identities are known:</para>
+ <formalpara><title>Unix User</title><para><literal>identity_kind</literal> should be set to <literal>unix-user</literal> with key <literal>uid</literal> (of type <literal>uint32</literal>).</para></formalpara>
+ <formalpara><title>Unix Group</title><para><literal>identity_kind</literal> should be set to <literal>unix-group</literal> with key <literal>gid</literal> (of type <literal>uint32</literal>).</para></formalpara>
+
+"/>
<annotation name="org.gtk.EggDBus.Struct.Member" value="String:identity_kind">
<annotation name="org.gtk.EggDBus.DocString" value="Type of identity."/>
@@ -114,11 +121,11 @@
<annotation name="org.gtk.EggDBus.DocString" value="Describes the result of calling org.freedesktop.PolicyKit1.Authority.CheckAuthorization()."/>
<annotation name="org.gtk.EggDBus.Struct.Member" value="Boolean:is_authorized">
- <annotation name="org.gtk.EggDBus.DocString" value="#TRUE if the given #Subject is authorized for the given action."/>
+ <annotation name="org.gtk.EggDBus.DocString" value="TRUE if the given #Subject is authorized for the given action."/>
</annotation>
<annotation name="org.gtk.EggDBus.Struct.Member" value="Boolean:is_challenge">
- <annotation name="org.gtk.EggDBus.DocString" value="#TRUE if the given #Subject could be authorized if more information was provided, and %CheckAuthorizationFlags.AllowUserInteraction wasn't passed or no suitable authentication agent was available."/>
+ <annotation name="org.gtk.EggDBus.DocString" value="TRUE if the given #Subject could be authorized if more information was provided, and %CheckAuthorizationFlags.AllowUserInteraction wasn't passed or no suitable authentication agent was available."/>
</annotation>
<annotation name="org.gtk.EggDBus.Struct.Member" value="Dict<String,String>:details">
@@ -164,7 +171,7 @@
<!-- The error domain used for reporting errors -->
<annotation name="org.gtk.EggDBus.DeclareErrorDomain" value="Error">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Errors"/>
- <annotation name="org.gtk.EggDBus.DocString" value="Errors that can be returned."/>
+ <annotation name="org.gtk.EggDBus.DocString" value="Errors that can be returned by various method calls."/>
<annotation name="org.gtk.EggDBus.ErrorDomain.Member" value="org.freedesktop.PolicyKit1.Error.Failed">
<annotation name="org.gtk.EggDBus.DocString" value="The operation failed."/>
@@ -173,10 +180,10 @@
<annotation name="org.gtk.EggDBus.DocString" value="The operation was cancelled."/>
</annotation>
<annotation name="org.gtk.EggDBus.ErrorDomain.Member" value="org.freedesktop.PolicyKit1.Error.NotSupported">
- <annotation name="org.gtk.EggDBus.DocString" value="Operation is not supported."/>
+ <annotation name="org.gtk.EggDBus.DocString" value="The operation is not supported."/>
</annotation>
<annotation name="org.gtk.EggDBus.ErrorDomain.Member" value="org.freedesktop.PolicyKit1.Error.NotAuthorized">
- <annotation name="org.gtk.EggDBus.DocString" value="Not authorized to perform operation."/>
+ <annotation name="org.gtk.EggDBus.DocString" value="You are not authorized to perform the requested operation."/>
</annotation>
<!-- errors not exposed in GObject library follows here -->
More information about the hal-commit
mailing list