00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef DBUS_CREDENTIALS_H
00024 #define DBUS_CREDENTIALS_H
00025
00026 #include <dbus/dbus-macros.h>
00027 #include <dbus/dbus-errors.h>
00028 #include <dbus/dbus-string.h>
00029 #include <dbus/dbus-sysdeps.h>
00030
00031 DBUS_BEGIN_DECLS
00032
00033 typedef enum {
00034 DBUS_CREDENTIAL_UNIX_PROCESS_ID,
00035 DBUS_CREDENTIAL_UNIX_USER_ID,
00036 DBUS_CREDENTIAL_ADT_AUDIT_DATA_ID,
00037 DBUS_CREDENTIAL_WINDOWS_SID
00038 } DBusCredentialType;
00039
00040 DBusCredentials* _dbus_credentials_new_from_current_process (void);
00041 DBusCredentials* _dbus_credentials_new (void);
00042 void _dbus_credentials_ref (DBusCredentials *credentials);
00043 void _dbus_credentials_unref (DBusCredentials *credentials);
00044 dbus_bool_t _dbus_credentials_add_unix_pid (DBusCredentials *credentials,
00045 dbus_pid_t pid);
00046 dbus_bool_t _dbus_credentials_add_unix_uid (DBusCredentials *credentials,
00047 dbus_uid_t uid);
00048 dbus_bool_t _dbus_credentials_add_windows_sid (DBusCredentials *credentials,
00049 const char *windows_sid);
00050 dbus_bool_t _dbus_credentials_add_adt_audit_data (DBusCredentials *credentials,
00051 void *audit_data,
00052 dbus_int32_t size);
00053 dbus_bool_t _dbus_credentials_include (DBusCredentials *credentials,
00054 DBusCredentialType type);
00055 dbus_pid_t _dbus_credentials_get_unix_pid (DBusCredentials *credentials);
00056 dbus_uid_t _dbus_credentials_get_unix_uid (DBusCredentials *credentials);
00057 const char* _dbus_credentials_get_windows_sid (DBusCredentials *credentials);
00058 void * _dbus_credentials_get_adt_audit_data (DBusCredentials *credentials);
00059 dbus_int32_t _dbus_credentials_get_adt_audit_data_size (DBusCredentials *credentials);
00060 dbus_bool_t _dbus_credentials_are_superset (DBusCredentials *credentials,
00061 DBusCredentials *possible_subset);
00062 dbus_bool_t _dbus_credentials_are_empty (DBusCredentials *credentials);
00063 dbus_bool_t _dbus_credentials_are_anonymous (DBusCredentials *credentials);
00064 dbus_bool_t _dbus_credentials_add_credentials (DBusCredentials *credentials,
00065 DBusCredentials *other_credentials);
00066
00067 dbus_bool_t _dbus_credentials_add_credential (DBusCredentials *credentials,
00068 DBusCredentialType which,
00069 DBusCredentials *other_credentials);
00070 void _dbus_credentials_clear (DBusCredentials *credentials);
00071 DBusCredentials* _dbus_credentials_copy (DBusCredentials *credentials);
00072 dbus_bool_t _dbus_credentials_same_user (DBusCredentials *credentials,
00073 DBusCredentials *other_credentials);
00074
00075
00076 DBUS_END_DECLS
00077
00078 #endif