summaryrefslogtreecommitdiffstats
path: root/bus
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-04-08 04:46:05 +0000
committerHavoc Pennington <hp@redhat.com>2003-04-08 04:46:05 +0000
commita162febe6746269f51b3a16db5f6fb240001f828 (patch)
tree1ea8de21fbf7f91636499f6d08207d7a02db60fb /bus
parentfe22b2194d53061fefe64d48ff6a53e6a762279d (diff)
2003-04-07 Havoc Pennington <hp@pobox.com>
* bus/driver.c (bus_driver_handle_acquire_service): return an error if you try to acquire a service that starts with ':'
Diffstat (limited to 'bus')
-rw-r--r--bus/driver.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bus/driver.c b/bus/driver.c
index e01949fc..814e32a6 100644
--- a/bus/driver.c
+++ b/bus/driver.c
@@ -459,6 +459,16 @@ bus_driver_handle_acquire_service (DBusConnection *connection,
_dbus_verbose ("Trying to own service %s with flags 0x%x\n", name, flags);
+ if (*name == ':')
+ {
+ /* Not allowed; only base services can start with ':' */
+ dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED,
+ "Cannot acquire a service starting with ':' such as \"%s\"",
+ name);
+
+ goto out;
+ }
+
retval = FALSE;
reply = NULL;