Bug 38289

Summary: potential optimization: set message sender in sender, validate in bus daemon
Product: dbus Reporter: Simon McVittie <smcv>
Component: coreAssignee: D-Bus Maintainers <dbus>
Status: RESOLVED MOVED QA Contact: D-Bus Maintainers <dbus>
Severity: enhancement    
Priority: low CC: bart.cerneels, msniko14, smcv
Version: 1.5   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Simon McVittie 2011-06-14 03:54:47 UTC
Message senders on a connection to a bus daemon[1] should write their own unique name (if set) into their messages, so that the bus daemon just needs to validate that they have done so. This would avoid byteswapping (Bug #38287), potentially a realloc() per message, and potentially realignment (Bug #38288).

For backwards compatibility we'll also need a slow path in dbus-daemon that overwrites the sender field if the sender was lying about it, but we can make that rare by having libdbus and all its reimplementations (GDBus, ndesk-dbus, dbus-java) set the sender by default.

D-Bus 2.0 - if it ever happens - should just reject messages with a falsified or missing sender field.

[1] i.e. where dbus_bus_set_unique_name() has been called, either by the
    application or via higher-level bus APIs
Comment 1 GitLab Migration User 2018-10-12 21:09:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus/issues/48.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.