PolicyKit Library Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Synopsis
PolKitCaller; PolKitCaller * polkit_caller_new (void); PolKitCaller * polkit_caller_ref (PolKitCaller *caller); void polkit_caller_unref (PolKitCaller *caller); polkit_bool_t polkit_caller_set_dbus_name (PolKitCaller *caller, const char *dbus_name); polkit_bool_t polkit_caller_set_uid (PolKitCaller *caller, uid_t uid); polkit_bool_t polkit_caller_set_pid (PolKitCaller *caller, pid_t pid); polkit_bool_t polkit_caller_set_selinux_context (PolKitCaller *caller, const char *selinux_context); polkit_bool_t polkit_caller_set_ck_session (PolKitCaller *caller, PolKitSession *session); polkit_bool_t polkit_caller_get_dbus_name (PolKitCaller *caller, char **out_dbus_name); polkit_bool_t polkit_caller_get_uid (PolKitCaller *caller, uid_t *out_uid); polkit_bool_t polkit_caller_get_pid (PolKitCaller *caller, pid_t *out_pid); polkit_bool_t polkit_caller_get_selinux_context (PolKitCaller *caller, char **out_selinux_context); polkit_bool_t polkit_caller_get_ck_session (PolKitCaller *caller, PolKitSession **out_session); void polkit_caller_debug (PolKitCaller *caller); polkit_bool_t polkit_caller_validate (PolKitCaller *caller);
Description
This class is used to represent a caller in another process that is calling into a mechanism to make the mechanism do something.
Details
PolKitCaller
typedef struct _PolKitCaller PolKitCaller;
Objects of this class are used to record information about a caller in another process.
polkit_caller_new ()
PolKitCaller * polkit_caller_new (void);
Creates a new PolKitCaller object.
Returns : |
the new object |
polkit_caller_ref ()
PolKitCaller * polkit_caller_ref (PolKitCaller *caller);
Increase reference count.
|
The caller object |
Returns : |
the object |
polkit_caller_unref ()
void polkit_caller_unref (PolKitCaller *caller);
Decreases the reference count of the object. If it becomes zero, the object is freed. Before freeing, reference counts on embedded objects are decresed by one.
|
The caller object |
polkit_caller_set_dbus_name ()
polkit_bool_t polkit_caller_set_dbus_name (PolKitCaller *caller, const char *dbus_name);
Set the callers unique system bus connection name.
|
The caller object |
|
unique system bus connection name |
Returns : |
TRUE only if the value validated and was set |
polkit_caller_set_uid ()
polkit_bool_t polkit_caller_set_uid (PolKitCaller *caller, uid_t uid);
Set the callers UNIX user id.
|
The caller object |
|
UNIX user id |
Returns : |
TRUE only if the value validated and was set |
polkit_caller_set_pid ()
polkit_bool_t polkit_caller_set_pid (PolKitCaller *caller, pid_t pid);
Set the callers UNIX process id.
|
The caller object |
|
UNIX process id |
Returns : |
TRUE only if the value validated and was set |
polkit_caller_set_selinux_context ()
polkit_bool_t polkit_caller_set_selinux_context (PolKitCaller *caller, const char *selinux_context);
Set the callers SELinux security context.
|
The caller object |
|
SELinux security context |
Returns : |
TRUE only if the value validated and was set |
polkit_caller_set_ck_session ()
polkit_bool_t polkit_caller_set_ck_session (PolKitCaller *caller, PolKitSession *session);
Set the callers session. The reference count on the given object will be increased by one. If an existing session object was set already, the reference count on that one will be decreased by one.
|
The caller object |
|
a session object |
Returns : |
TRUE only if the value validated and was set |
polkit_caller_get_dbus_name ()
polkit_bool_t polkit_caller_get_dbus_name (PolKitCaller *caller, char **out_dbus_name);
Get the callers unique system bus connection name.
|
The caller object |
|
Returns the unique system bus connection name. The caller shall not free this string. |
Returns : |
TRUE iff the value is returned |
polkit_caller_get_uid ()
polkit_bool_t polkit_caller_get_uid (PolKitCaller *caller, uid_t *out_uid);
Get the callers UNIX user id.
|
The caller object |
|
Returns the UNIX user id |
Returns : |
TRUE iff the value is returned |
polkit_caller_get_pid ()
polkit_bool_t polkit_caller_get_pid (PolKitCaller *caller, pid_t *out_pid);
Get the callers UNIX process id.
|
The caller object |
|
Returns the UNIX process id |
Returns : |
TRUE iff the value is returned |
polkit_caller_get_selinux_context ()
polkit_bool_t polkit_caller_get_selinux_context (PolKitCaller *caller, char **out_selinux_context);
Get the callers SELinux security context. Note that this may be NULL if SELinux is not available on the system.
|
The caller object |
|
Returns the SELinux security context. The caller shall not free this string. |
Returns : |
TRUE iff the value is returned |
polkit_caller_get_ck_session ()
polkit_bool_t polkit_caller_get_ck_session (PolKitCaller *caller, PolKitSession **out_session);
Get the callers session. Note that this may be NULL if the caller is not in any session.
|
The caller object |
|
Returns the session object. Caller shall not unref it. |
Returns : |
TRUE iff the value is returned |
polkit_caller_debug ()
void polkit_caller_debug (PolKitCaller *caller);
Print debug details
|
the object |
polkit_caller_validate ()
polkit_bool_t polkit_caller_validate (PolKitCaller *caller);
Validate the object
|
the object |
Returns : |
TRUE iff the object is valid. |