summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-connection.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2007-06-09 23:41:33 +0000
committerHavoc Pennington <hp@redhat.com>2007-06-09 23:41:33 +0000
commit7be5fd95cdccdca28937804f32ca8b1308887d09 (patch)
tree2425bc50d77fbbbe6b6077d9e6dd053b936dcde1 /dbus/dbus-connection.h
parent23832672266bb4ff23b66247c0cfa1a2ed0cc97b (diff)
2007-06-09 Havoc Pennington <hp@redhat.com>
* bus/policy.c (bus_policy_create_client_policy): gracefully continue if the connection has no unix user - just don't apply any unix user dependent rules. * bus/config-parser.c: remove dbus-userdb.h usage * bus/bus.c: remove dbus-userdb.h usage * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated): support Windows user function; also, fix the logic for checking auth as root in the default auth code (broken in the previous commit) * dbus/dbus-connection.c (dbus_connection_set_windows_user_function): new function (dbus_connection_get_windows_user): new function
Diffstat (limited to 'dbus/dbus-connection.h')
-rw-r--r--dbus/dbus-connection.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/dbus/dbus-connection.h b/dbus/dbus-connection.h
index 819e96c8..2b673fda 100644
--- a/dbus/dbus-connection.h
+++ b/dbus/dbus-connection.h
@@ -132,14 +132,28 @@ typedef void (* DBusDispatchStatusFunction) (DBusConnection *connection,
* to do. Set with dbus_connection_set_wakeup_main_function().
*/
typedef void (* DBusWakeupMainFunction) (void *data);
+
/**
- * Called during authentication on UNIX systems to check whether the given
- * user ID is allowed to connect. Never called on Windows. Set with
+ * Called during authentication to check whether the given UNIX user
+ * ID is allowed to connect, if the client tried to auth as a UNIX
+ * user ID. Normally on Windows this would never happen. Set with
* dbus_connection_set_unix_user_function().
*/
typedef dbus_bool_t (* DBusAllowUnixUserFunction) (DBusConnection *connection,
unsigned long uid,
void *data);
+
+/**
+ * Called during authentication to check whether the given Windows user
+ * ID is allowed to connect, if the client tried to auth as a Windows
+ * user ID. Normally on UNIX this would never happen. Set with
+ * dbus_connection_set_windows_user_function().
+ */
+typedef dbus_bool_t (* DBusAllowWindowsUserFunction) (DBusConnection *connection,
+ const char *user_sid,
+ void *data);
+
+
/**
* Called when a pending call now has a reply available. Set with
* dbus_pending_call_set_notify().
@@ -219,6 +233,12 @@ void dbus_connection_set_unix_user_function (DBusConnection
DBusAllowUnixUserFunction function,
void *data,
DBusFreeFunction free_data_function);
+dbus_bool_t dbus_connection_get_windows_user (DBusConnection *connection,
+ char **windows_sid_p);
+void dbus_connection_set_windows_user_function (DBusConnection *connection,
+ DBusAllowWindowsUserFunction function,
+ void *data,
+ DBusFreeFunction free_data_function);
void dbus_connection_set_route_peer_messages (DBusConnection *connection,
dbus_bool_t value);