PolicyKit: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Fri Aug 24 15:49:14 PDT 2007


 doc/Makefile.am                   |    2 +-
 polkit-grant/polkit-grant.c       |    3 +--
 polkit-grant/polkit-grant.h       |    4 ++--
 polkit/polkit-action.c            |    2 +-
 polkit/polkit-action.h            |    4 ++--
 polkit/polkit-caller.c            |    2 +-
 polkit/polkit-caller.h            |    4 ++--
 polkit/polkit-config.c            |    4 ++--
 polkit/polkit-config.h            |    4 ++--
 polkit/polkit-context.c           |    2 +-
 polkit/polkit-context.h           |    4 ++--
 polkit/polkit-error.c             |    2 +-
 polkit/polkit-error.h             |    4 ++--
 polkit/polkit-grant-database.c    |   10 +++++-----
 polkit/polkit-grant-database.h    |   11 +++++++----
 polkit/polkit-policy-cache.c      |    4 ++--
 polkit/polkit-policy-cache.h      |    4 ++--
 polkit/polkit-policy-default.c    |    2 +-
 polkit/polkit-policy-default.h    |    4 ++--
 polkit/polkit-policy-file-entry.c |    2 +-
 polkit/polkit-policy-file-entry.h |    4 ++--
 polkit/polkit-policy-file.c       |    2 +-
 polkit/polkit-policy-file.h       |    4 ++--
 polkit/polkit-seat.c              |    2 +-
 polkit/polkit-seat.h              |    4 ++--
 polkit/polkit-session.c           |    2 +-
 polkit/polkit-session.h           |    4 ++--
 polkit/polkit-types.h             |    7 +++++++
 tools/polkit-grant.c              |    2 +-
 29 files changed, 59 insertions(+), 50 deletions(-)

New commits:
diff-tree 4f807a94b5116dabf15a10876d7a22f5a0587e31 (from 69959d3ae71fec1f107cb8d7df2849dd16bb0422)
Author: David Zeuthen <davidz at redhat.com>
Date:   Fri Aug 24 18:44:14 2007 -0400

    some more doc fixes

diff --git a/doc/Makefile.am b/doc/Makefile.am
index d35f79d..99c58af 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -13,7 +13,7 @@ DOC_MODULE=polkit
 DOC_MAIN_SGML_FILE=polkit-docs.xml
 
 # Extra options to supply to gtkdoc-scan
-#SCAN_OPTIONS=--deprecated-guards="CAIRO_DISABLE_DEPRECATED"
+SCAN_OPTIONS=--ignore-headers=config.h
 
 # The directory containing the source code. Relative to $(srcdir)
 DOC_SOURCE_DIR=..
diff --git a/polkit-grant/polkit-grant.c b/polkit-grant/polkit-grant.c
index 6308bc2..41df157 100644
--- a/polkit-grant/polkit-grant.c
+++ b/polkit-grant/polkit-grant.c
@@ -56,7 +56,7 @@
  * is able to successfully authenticate. It is only useful for people
  * writing user interfaces that interfaces with the end user.
  **/
-struct PolKitGrant
+struct _PolKitGrant
 {
         int refcount;
 
@@ -87,7 +87,6 @@ struct PolKitGrant
 
 /**
  * polkit_grant_new:
- * @void: 
  * 
  * Creates a #PolKitGrant object.
  * 
diff --git a/polkit-grant/polkit-grant.h b/polkit-grant/polkit-grant.h
index e619625..630d0ae 100644
--- a/polkit-grant/polkit-grant.h
+++ b/polkit-grant/polkit-grant.h
@@ -28,8 +28,8 @@
 
 #include <polkit/polkit.h>
 
-struct PolKitGrant;
-typedef struct PolKitGrant PolKitGrant;
+struct _PolKitGrant;
+typedef struct _PolKitGrant PolKitGrant;
 
 /**
  * PolKitGrantType:
diff --git a/polkit/polkit-action.c b/polkit/polkit-action.c
index 3bc2c86..e30b913 100644
--- a/polkit/polkit-action.c
+++ b/polkit/polkit-action.c
@@ -54,7 +54,7 @@
  *
  * Objects of this class are used to record information about an action.
  **/
-struct PolKitAction
+struct _PolKitAction
 {
         int refcount;
         char *id;
diff --git a/polkit/polkit-action.h b/polkit/polkit-action.h
index b3ed94c..19e911d 100644
--- a/polkit/polkit-action.h
+++ b/polkit/polkit-action.h
@@ -32,8 +32,8 @@
 
 #include <polkit/polkit-types.h>
 
-struct PolKitAction;
-typedef struct PolKitAction PolKitAction;
+struct _PolKitAction;
+typedef struct _PolKitAction PolKitAction;
 
 PolKitAction *polkit_action_new           (void);
 PolKitAction *polkit_action_ref           (PolKitAction *action);
diff --git a/polkit/polkit-caller.c b/polkit/polkit-caller.c
index 14fe24e..5169260 100644
--- a/polkit/polkit-caller.c
+++ b/polkit/polkit-caller.c
@@ -56,7 +56,7 @@
  * Objects of this class are used to record information about a caller
  * in another process.
  **/
-struct PolKitCaller
+struct _PolKitCaller
 {
         int refcount;
         char *dbus_name;
diff --git a/polkit/polkit-caller.h b/polkit/polkit-caller.h
index 86643d9..b6b63eb 100644
--- a/polkit/polkit-caller.h
+++ b/polkit/polkit-caller.h
@@ -34,8 +34,8 @@
 #include <polkit/polkit-session.h>
 #include <sys/types.h>
 
-struct PolKitCaller;
-typedef struct PolKitCaller PolKitCaller;
+struct _PolKitCaller;
+typedef struct _PolKitCaller PolKitCaller;
 
 PolKitCaller     *polkit_caller_new                 (void);
 PolKitCaller     *polkit_caller_ref                 (PolKitCaller   *caller);
diff --git a/polkit/polkit-config.c b/polkit/polkit-config.c
index 7173670..2a61e1b 100644
--- a/polkit/polkit-config.c
+++ b/polkit/polkit-config.c
@@ -75,7 +75,7 @@ typedef struct ConfigNode ConfigNode;
  * class; it's only here for integration with other PolicyKit
  * components.
  **/
-struct PolKitConfig
+struct _PolKitConfig
 {
         int refcount;
         ConfigNode *top_config_node;
@@ -717,7 +717,7 @@ config_node_determine_admin_auth (Config
 }
 
 /**
- * polkit_config_determine_auth_type:
+ * polkit_config_determine_admin_auth_type:
  * @pk_config: the PolicyKit context
  * @action: the type of access to check for
  * @caller: the caller in question
diff --git a/polkit/polkit-config.h b/polkit/polkit-config.h
index 7ecc1cc..40f1590 100644
--- a/polkit/polkit-config.h
+++ b/polkit/polkit-config.h
@@ -39,8 +39,8 @@
 #include <polkit/polkit-session.h>
 #include <polkit/polkit-caller.h>
 
-struct PolKitConfig;
-typedef struct PolKitConfig PolKitConfig;
+struct _PolKitConfig;
+typedef struct _PolKitConfig PolKitConfig;
 
 PolKitConfig  *polkit_config_new                    (const char *path, PolKitError **error);
 PolKitConfig  *polkit_config_ref                    (PolKitConfig *pk_config);
diff --git a/polkit/polkit-context.c b/polkit/polkit-context.c
index a28ea49..922e3ec 100644
--- a/polkit/polkit-context.c
+++ b/polkit/polkit-context.c
@@ -82,7 +82,7 @@
  *
  * Context object for users of PolicyKit.
  **/
-struct PolKitContext
+struct _PolKitContext
 {
         int refcount;
 
diff --git a/polkit/polkit-context.h b/polkit/polkit-context.h
index a2f0c6c..867265a 100644
--- a/polkit/polkit-context.h
+++ b/polkit/polkit-context.h
@@ -41,8 +41,8 @@
 #include <polkit/polkit-policy-cache.h>
 #include <polkit/polkit-config.h>
 
-struct PolKitContext;
-typedef struct PolKitContext PolKitContext;
+struct _PolKitContext;
+typedef struct _PolKitContext PolKitContext;
 
 /**
  * PolKitContextConfigChangedCB:
diff --git a/polkit/polkit-error.c b/polkit/polkit-error.c
index ab08fd0..0b166cc 100644
--- a/polkit/polkit-error.c
+++ b/polkit/polkit-error.c
@@ -55,7 +55,7 @@
  *
  * Objects of this class are used for error reporting.
  **/
-struct PolKitError
+struct _PolKitError
 {
         polkit_bool_t is_static;
         PolKitErrorCode error_code;
diff --git a/polkit/polkit-error.h b/polkit/polkit-error.h
index ec0f19a..cd5fc71 100644
--- a/polkit/polkit-error.h
+++ b/polkit/polkit-error.h
@@ -43,8 +43,8 @@ typedef enum
         POLKIT_ERROR_POLICY_FILE_INVALID
 } PolKitErrorCode;
 
-struct PolKitError;
-typedef struct PolKitError PolKitError;
+struct _PolKitError;
+typedef struct _PolKitError PolKitError;
 
 PolKitErrorCode  polkit_error_get_error_code (PolKitError *error);
 const char      *polkit_error_get_error_message (PolKitError *error);
diff --git a/polkit/polkit-grant-database.c b/polkit/polkit-grant-database.c
index ec8a172..8f7c751 100644
--- a/polkit/polkit-grant-database.c
+++ b/polkit/polkit-grant-database.c
@@ -49,13 +49,13 @@
  **/
 
 /* TODO FIXME: this is Linux specific */
-static unsigned long long 
+static polkit_uint64_t 
 get_start_time_for_pid (pid_t pid)
 {
         char *filename;
         char *contents;
         gsize length;
-        unsigned long long start_time;
+        polkit_uint64_t start_time;
         GError *error = NULL;
         char **tokens;
         char *p;
@@ -168,7 +168,7 @@ _polkit_grantdb_write_pid (const char *a
 {
         char *grant_file;
         polkit_bool_t ret = FALSE;
-        unsigned long long pid_start_time;
+        polkit_uint64_t pid_start_time;
 
         pid_start_time = get_start_time_for_pid (pid);
         if (pid_start_time == 0)
@@ -234,7 +234,7 @@ _polkit_grantdb_check_can_caller_do_acti
         pid_t invoking_process_id;
         PolKitSession *session;
         char *session_objpath;
-        unsigned long long pid_start_time;
+        polkit_uint64_t pid_start_time;
 
         grant_file = NULL;
         result = POLKIT_RESULT_UNKNOWN;
@@ -352,7 +352,7 @@ _polkit_grantdb_foreach (PolKitGrantDbFo
 
                         if (strncmp (endptr + 1, "pid-", 4) == 0) {
                                 int pid;
-                                unsigned long long pid_time;
+                                polkit_uint64_t pid_time;
 
                                 pid = strtol (endptr + 1 + 4 /*pid-*/, &endptr, 10);
                                 if (endptr == NULL || *endptr != '@')
diff --git a/polkit/polkit-grant-database.h b/polkit/polkit-grant-database.h
index f867df7..33a6654 100644
--- a/polkit/polkit-grant-database.h
+++ b/polkit/polkit-grant-database.h
@@ -40,7 +40,11 @@ polkit_bool_t _polkit_grantdb_write_pid 
 
 /**
  * PolKitGrantDbGrantType:
- * 
+ * @POLKIT_GRANTDB_GRANT_TYPE_PROCESS: The privilege was granted to a process
+ * @POLKIT_GRANTDB_GRANT_TYPE_SESSION: The privilege was granted to session
+ * @POLKIT_GRANTDB_GRANT_TYPE_ALWAYS: The privilege was granted permanently
+ *
+ * Defines the type and scope of a privilege grant.
  */
 typedef enum {
         POLKIT_GRANTDB_GRANT_TYPE_PROCESS,
@@ -51,13 +55,12 @@ typedef enum {
 /**
  * PolKitGrantDbForeachFunc:
  * @action_id: Identifer for the action granted
+ * @uid: the UNIX process id, or -1 if the passed grant_type is not POLKIT_GRANTDB_GRANT_TYPE_ALWAYS
  * @when: when the privilege was granted
  * @grant_type: the type of grant; one of #PolKitGrantDbGrantType
  * @pid: the process id, or -1 if the passed grant_type is not POLKIT_GRANTDB_GRANT_TYPE_PROCESS
  * @pid_time: the start time of the process (only if pid is set)
  * @session_id: the session id, or NULL if the passed grant_type is not POLKIT_GRANTDB_GRANT_TYPE_SESSION
- * @uid: the UNIX process id, or -1 if the passed grant_type is not POLKIT_GRANTDB_GRANT_TYPE_ALWAYS
- * 
  * @user_data: user data passed to polkit_grantdb_foreach()
  *
  * Callback function for polkit_policy_cache_foreach().
@@ -67,7 +70,7 @@ typedef void (*PolKitGrantDbForeachFunc)
                                           time_t when, 
                                           PolKitGrantDbGrantType grant_type,
                                           pid_t pid, 
-                                          unsigned long long pid_time,
+                                          polkit_uint64_t pid_time,
                                           const char *session_id,
                                           void *user_data);
 
diff --git a/polkit/polkit-policy-cache.c b/polkit/polkit-policy-cache.c
index 2e8c9c5..d4e4a06 100644
--- a/polkit/polkit-policy-cache.c
+++ b/polkit/polkit-policy-cache.c
@@ -57,7 +57,7 @@
  * Instances of this class are used to hold all policy objects
  * (stemming from policy files) and provide look-up functions.
  **/
-struct PolKitPolicyCache
+struct _PolKitPolicyCache
 {
         int refcount;
 
@@ -208,7 +208,7 @@ polkit_policy_cache_debug (PolKitPolicyC
 /**
  * polkit_policy_cache_get_entry_by_id:
  * @policy_cache: the cache
- * @action: the action identifier
+ * @action_id: the action identifier
  * 
  * Given a action identifier, find the object describing the
  * definition of the policy; e.g. data stemming from files in
diff --git a/polkit/polkit-policy-cache.h b/polkit/polkit-policy-cache.h
index dd86869..535f7e0 100644
--- a/polkit/polkit-policy-cache.h
+++ b/polkit/polkit-policy-cache.h
@@ -34,8 +34,8 @@
 #include <polkit/polkit-action.h>
 #include <polkit/polkit-policy-file-entry.h>
 
-struct PolKitPolicyCache;
-typedef struct PolKitPolicyCache PolKitPolicyCache;
+struct _PolKitPolicyCache;
+typedef struct _PolKitPolicyCache PolKitPolicyCache;
 
 /**
  * PolKitPolicyCacheForeachFunc:
diff --git a/polkit/polkit-policy-default.c b/polkit/polkit-policy-default.c
index 05e181f..b99c84d 100644
--- a/polkit/polkit-policy-default.c
+++ b/polkit/polkit-policy-default.c
@@ -55,7 +55,7 @@
  * Objects of this class are used to record information about a
  * default policy for an action.
  **/
-struct PolKitPolicyDefault
+struct _PolKitPolicyDefault
 {
         int refcount;
         PolKitResult default_inactive;
diff --git a/polkit/polkit-policy-default.h b/polkit/polkit-policy-default.h
index 2a6b48a..a34122b 100644
--- a/polkit/polkit-policy-default.h
+++ b/polkit/polkit-policy-default.h
@@ -36,8 +36,8 @@
 #include <polkit/polkit-caller.h>
 #include <polkit/polkit-error.h>
 
-struct PolKitPolicyDefault;
-typedef struct PolKitPolicyDefault PolKitPolicyDefault;
+struct _PolKitPolicyDefault;
+typedef struct _PolKitPolicyDefault PolKitPolicyDefault;
 
 PolKitPolicyDefault    *polkit_policy_default_ref   (PolKitPolicyDefault *policy_default);
 void                    polkit_policy_default_unref (PolKitPolicyDefault *policy_default);
diff --git a/polkit/polkit-policy-file-entry.c b/polkit/polkit-policy-file-entry.c
index 141de05..50d5dad 100644
--- a/polkit/polkit-policy-file-entry.c
+++ b/polkit/polkit-policy-file-entry.c
@@ -56,7 +56,7 @@
  * Objects of this class are used to record information about a
  * policy.
  **/
-struct PolKitPolicyFileEntry
+struct _PolKitPolicyFileEntry
 {
         int refcount;
         char *action;
diff --git a/polkit/polkit-policy-file-entry.h b/polkit/polkit-policy-file-entry.h
index cd4d295..2046330 100644
--- a/polkit/polkit-policy-file-entry.h
+++ b/polkit/polkit-policy-file-entry.h
@@ -33,8 +33,8 @@
 #include <polkit/polkit-result.h>
 #include <polkit/polkit-policy-default.h>
 
-struct PolKitPolicyFileEntry;
-typedef struct PolKitPolicyFileEntry PolKitPolicyFileEntry;
+struct _PolKitPolicyFileEntry;
+typedef struct _PolKitPolicyFileEntry PolKitPolicyFileEntry;
 
 /**
  * PolKitPolicyFileEntryAnnotationsForeachFunc:
diff --git a/polkit/polkit-policy-file.c b/polkit/polkit-policy-file.c
index 3b8f794..9c496c6 100644
--- a/polkit/polkit-policy-file.c
+++ b/polkit/polkit-policy-file.c
@@ -59,7 +59,7 @@
  * Objects of this class are used to record information about a
  * policy file.
  **/
-struct PolKitPolicyFile
+struct _PolKitPolicyFile
 {
         int refcount;
         GSList *entries;
diff --git a/polkit/polkit-policy-file.h b/polkit/polkit-policy-file.h
index bcb28f9..85e89b0 100644
--- a/polkit/polkit-policy-file.h
+++ b/polkit/polkit-policy-file.h
@@ -33,8 +33,8 @@
 #include <polkit/polkit-error.h>
 #include <polkit/polkit-policy-file-entry.h>
 
-struct PolKitPolicyFile;
-typedef struct PolKitPolicyFile PolKitPolicyFile;
+struct _PolKitPolicyFile;
+typedef struct _PolKitPolicyFile PolKitPolicyFile;
 
 /**
  * PolKitPolicyFileEntryForeachFunc:
diff --git a/polkit/polkit-seat.c b/polkit/polkit-seat.c
index 094fca3..b6e3269 100644
--- a/polkit/polkit-seat.c
+++ b/polkit/polkit-seat.c
@@ -55,7 +55,7 @@
  * Objects of this class are used to record information about a
  * seat.
  **/
-struct PolKitSeat
+struct _PolKitSeat
 {
         int refcount;
         char *ck_objref;
diff --git a/polkit/polkit-seat.h b/polkit/polkit-seat.h
index 5a01714..5f322a8 100644
--- a/polkit/polkit-seat.h
+++ b/polkit/polkit-seat.h
@@ -32,8 +32,8 @@
 
 #include <polkit/polkit-types.h>
 
-struct PolKitSeat;
-typedef struct PolKitSeat PolKitSeat;
+struct _PolKitSeat;
+typedef struct _PolKitSeat PolKitSeat;
 
 PolKitSeat   *polkit_seat_new           (void);
 PolKitSeat   *polkit_seat_ref           (PolKitSeat *seat);
diff --git a/polkit/polkit-session.c b/polkit/polkit-session.c
index a05bb8d..7e2098a 100644
--- a/polkit/polkit-session.c
+++ b/polkit/polkit-session.c
@@ -55,7 +55,7 @@
  * Objects of this class are used to record information about a
  * session.
  **/
-struct PolKitSession
+struct _PolKitSession
 {
         int refcount;
         uid_t uid;
diff --git a/polkit/polkit-session.h b/polkit/polkit-session.h
index 3fb4ca0..390666d 100644
--- a/polkit/polkit-session.h
+++ b/polkit/polkit-session.h
@@ -35,8 +35,8 @@
 
 #include <sys/types.h>
 
-struct PolKitSession;
-typedef struct PolKitSession PolKitSession;
+struct _PolKitSession;
+typedef struct _PolKitSession PolKitSession;
 
 PolKitSession *polkit_session_new                (void);
 PolKitSession *polkit_session_ref                (PolKitSession *session);
diff --git a/polkit/polkit-types.h b/polkit/polkit-types.h
index dd1499f..97a7ab2 100644
--- a/polkit/polkit-types.h
+++ b/polkit/polkit-types.h
@@ -45,6 +45,13 @@
  */
 typedef int polkit_bool_t;
 
+/**
+ * polkit_uint64_t:
+ *
+ * Type for unsigned 64 bit integer.
+ */
+typedef unsigned long long polkit_uint64_t;
+
 #ifndef TRUE
 #  define TRUE 1
 #endif
diff --git a/tools/polkit-grant.c b/tools/polkit-grant.c
index 85f17aa..ff9d73c 100644
--- a/tools/polkit-grant.c
+++ b/tools/polkit-grant.c
@@ -306,7 +306,7 @@ _print_grants (const char *action_id, 
                time_t when, 
                PolKitGrantDbGrantType grant_type,
                pid_t pid,
-               unsigned long long pid_time,
+               polkit_uint64_t pid_time,
                const char *session_id,
                void *user_data)
 {


More information about the hal-commit mailing list