summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Macht <holger@homac.de>2006-10-26 17:11:25 +0200
committerHolger Macht <holger@homac.de>2006-10-26 17:11:25 +0200
commit07b91679dd5d69db855c2d228154ad56b45d0a2d (patch)
tree1bb91b04306109b3473816a135472e7102150b26
parent925068ff643f0e3fc680ffda3b5f23d0670cccee (diff)
change polkit function "by_uid" to the current user and update documentation
-rw-r--r--liblazy/liblazy.h11
-rw-r--r--liblazy/liblazy_polkit.c3
2 files changed, 6 insertions, 8 deletions
diff --git a/liblazy/liblazy.h b/liblazy/liblazy.h
index a1a63a5..fd8a721 100644
--- a/liblazy/liblazy.h
+++ b/liblazy/liblazy.h
@@ -146,9 +146,10 @@ int liblazy_dbus_message_get_basic_arg(DBusMessage *message, int type,
/** @brief get a array argument from a DBusMessage as a string list
*
* @param message the message to get the argument from
+ * @param strlist a pointer to a string array to store the result
* @param strlist pointer to array of strings to store the result. Has to
* be freed with @ref liblazy_free_strlist
- * @param no a number specifying the n'th string array in the message
+ * @param no a number specifying the n'th string array in the reply
*
* @return 0 on success, LIBLAZY_ERROR_* on failure
*/
@@ -251,17 +252,15 @@ int liblazy_polkit_is_user_allowed_by_name(char *user, char *privilege,
/** @brief check if a user possesses a privilege
*
- * Functions asks the PolicyKit daemon if a user possesses a given
- * privilege on a optional given ressource
+ * Functions asks the PolicyKit daemon if the current user possesses a
+ * given privilege on a optional given ressource
*
- * @param uid the uid to check for
* @param privilege the privilege to check for
* @param ressource the ressource to check for or NULL
*
* @return 0 on success, LIBLAZY_ERROR_* on failure
*/
-int liblazy_polkit_is_user_allowed_by_uid(int uid, char *privilege,
- char *ressource);
+int liblazy_polkit_is_user_allowed(char *privilege, char *ressource);
#ifdef __cplusplus
}
diff --git a/liblazy/liblazy_polkit.c b/liblazy/liblazy_polkit.c
index 1742fd0..e33cf2e 100644
--- a/liblazy/liblazy_polkit.c
+++ b/liblazy/liblazy_polkit.c
@@ -82,8 +82,7 @@ int liblazy_polkit_is_user_allowed_by_name(char *user,
return is_allowed;
}
-int liblazy_polkit_is_user_allowed_by_uid(int uid, char *privilege,
- char *ressource)
+int liblazy_polkit_is_user_allowed(char *privilege, char *ressource)
{
char *user = getenv("USER");
return liblazy_polkit_is_user_allowed_by_name(user, privilege,