Bug 43557 - Feature request: support for file descriptors in dbus-send
Summary: Feature request: support for file descriptors in dbus-send
Status: RESOLVED MOVED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.5
Hardware: All All
: medium enhancement
Assignee: D-Bus Maintainers
QA Contact: D-Bus Maintainers
URL:
Whiteboard: review-
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-12-06 12:11 UTC by Elly Jones
Modified: 2018-10-12 21:13 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch against dbus-1.4.12 to add this feature. (1.03 KB, patch)
2011-12-06 12:11 UTC, Elly Jones
Details | Splinter Review

Description Elly Jones 2011-12-06 12:11:43 UTC
Created attachment 54161 [details] [review]
Patch against dbus-1.4.12 to add this feature.

dbus-send(1) cannot currently send file descriptors, although the underlying dbus protocol can. Add support for same, with a new syntax "fd:<n>".

Patch attached.
Comment 1 Simon McVittie 2012-02-08 08:32:04 UTC
Comment on attachment 54161 [details] [review]
Patch against dbus-1.4.12 to add this feature.

Review of attachment 54161 [details] [review]:
-----------------------------------------------------------------

::: tools/dbus-send.c
@@ +67,4 @@
>    double d;
>    unsigned char byte;
>    dbus_bool_t v_BOOLEAN;
> +  int _int;

"int fd" seems better?

@@ +138,5 @@
>  	}
>        break;
>  
> +    case DBUS_TYPE_UNIX_FD:
> +      _int = strtoul (value, NULL, 0);

Shouldn't this be base 10? I don't think we want to support things like fd:010 interpreted as octal (decimal 8!) or fd:0x10 interpreted as hex.

It should exit with an error if value isn't a valid base-10 integer.
Comment 2 GitLab Migration User 2018-10-12 21:13:05 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/60.


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.