Lennart Poettering
e3afaf6b8e
sd-bus: rename default bus address constants, they aren't "paths" but "addresses"
2014-11-28 16:17:33 +01:00
Lennart Poettering
3acc1dafd1
sd-bus: add new call sd_bus_get_scope() for querying whether one is connected to a system or a user bus
2014-11-28 16:17:33 +01:00
Lennart Poettering
52cfc0379a
sd-bus: rework credential query logic
...
Also, make the call to free kdbus slices generic and use it everywhere
2014-11-28 16:17:33 +01:00
Michal Schmidt
279d3c9cea
treewide: more log_*_errno() conversions
2014-11-28 14:45:55 +01:00
Michal Schmidt
ff49bc3212
treewide: drop unnecessary trailing \n in log_*() calls
2014-11-28 14:26:31 +01:00
Michal Schmidt
da927ba997
treewide: no need to negate errno for log_*_errno()
...
It corrrectly handles both positive and negative errno values.
2014-11-28 13:29:21 +01:00
Michal Schmidt
0a1beeb642
treewide: auto-convert the simple cases to log_*_errno()
...
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno().
2014-11-28 12:04:41 +01:00
Lennart Poettering
1214b53c8e
kdbus: when running in a container, don't complain that we cannot write to /sys
2014-11-28 03:16:56 +01:00
Lennart Poettering
412c18f10c
sd-bus: the attach_mask kernel module parameter is 64bit now, hence initialize it as such
2014-11-28 02:25:45 +01:00
Lennart Poettering
1a29929959
kdbus: set kernel attach mask before creating the first bus
2014-11-27 22:05:24 +01:00
Lennart Poettering
fb6d9b77a7
sd-bus: set creds info for "org.freedesktop.DBus.Local" generated messages, too
2014-11-27 22:05:23 +01:00
Lennart Poettering
38ce47e262
sd-bus: when we get the list of well-known names back from kdbus we shouldn't confuse the empty list with unknown information
2014-11-27 22:02:13 +01:00
Lennart Poettering
771b2724c0
sd-bus: deal with whitespace in matches
2014-11-27 22:02:12 +01:00
Lennart Poettering
7d31d92400
sd-bus: unify logic how we patch the message source of driver messages
2014-11-27 22:02:12 +01:00
Lennart Poettering
ac653862e0
sd-bus: fake valid well-known-names metadata for faked bus messages
2014-11-27 22:02:12 +01:00
Lennart Poettering
50c4521675
sd-bus: optimize how we generate the well-known-names lists in messages from kdbus
2014-11-27 22:02:12 +01:00
Lennart Poettering
7fa934b0d3
sd-bus: be stricter with mismatches between dbus1 and kdbus message headers
2014-11-27 22:02:12 +01:00
Lennart Poettering
64e96a194d
bus-proxy: check passed parameter signature of all driver method calls
2014-11-27 21:58:07 +01:00
Alin Rauta
be660c371b
networkd: fix kernel rtnl receive buffer overrun error
...
We got the following error when running systemd on a device with many ports:
"rtnl: kernel receive buffer overrun
Event source 'rtnl-receive-message' returned error, disabling: No buffer space
available"
I think the kernel socket receive buffer queue should be increased. The default
value is taken from:
"/proc/sys/net/core/rmem_default", but we can overwrite it using SO_RCVBUF
socket option.
This is already done in networkd for other sockets.
For example, the bus socket (sd-bus/bus-socket.c) has a receive queue of 8MB.
In our case, the default is 208KB.
Increasing the buffer receive queue for manager socket to 512KB should be enough
to get rid of the above error.
[tomegun: bump the limit even higher to 8M]
2014-11-27 18:59:47 +01:00
David Herrmann
342f3005f5
bus: prefix custom endpoints with "$UID-"
...
The kdbus module will later get a policy that endpoint-names are
restricted to "<uid>-<name>" just like bus-names. Make sure that systemd
is already compatible to that.
2014-11-27 13:49:41 +01:00
Lennart Poettering
cf226cfc24
sd-bus: make sure that when we connect to the system bus we have enough creds to make security decisions
2014-11-26 18:59:31 +01:00
Lennart Poettering
d108ddf172
sd-bus: update kdbus.h from upstream
2014-11-26 15:43:50 +01:00
Lennart Poettering
e12d81ae80
sd-bus: given that the kernel now passes the auxgroups list as 32bit array to us, no need to convert to uid_t manually
...
This way, we can save one allocation and avoid copying the array
unnecesarily.
2014-11-26 14:59:12 +01:00
David Herrmann
affc7fe9e1
bus: update kdbus.h (ABI break)
...
We changed creds to u32, so fix systemd sd-bus to acknowledge that.
2014-11-26 11:11:54 +01:00
Lennart Poettering
38813cc824
bus-kernel: when installing an activator, ask for any kind of metadata to be attached to incoming messages
...
We don't know what the activated service might want in the end, hence
enable everything current and future, just to be sure.
2014-11-26 03:06:50 +01:00
Lennart Poettering
8aee3fc7ea
sd-bus: don't clobber return values on failure in bus_kernel_open_bus_fd()
2014-11-26 03:06:50 +01:00
Lennart Poettering
fa7796e97b
sd-bus: set per-bus attach flag requirement mask to ANY
...
On the system and user busses we create it's the receiver that chooses
which metadata is attched, not the sender, hence set the requirement
mask to ANY, to allow any current of future credential bit to be
attached.
2014-11-26 03:06:50 +01:00
Lennart Poettering
b5dae4c7f7
sd-bus: add suppot for renegotiating message credential attach flags
2014-11-26 02:20:55 +01:00
Lennart Poettering
f3c0588651
sd-bus: use free_and_strdup() where appropriate
...
This simplifies things a bit and makes sure we free any previously set
creds component before writing in a new one.
2014-11-26 02:20:55 +01:00
Lennart Poettering
bd5f920f12
core: show log message about process triggering kdbus service activation
2014-11-25 20:52:48 +01:00
Lennart Poettering
f9a458c666
sd-bus: react properly to EOVERFLOW by generating a log message about dropped broadcast messages and proceeding
2014-11-25 20:42:31 +01:00
Lennart Poettering
48eaba354e
kdbus: update header file to current upstream version
2014-11-25 19:25:33 +01:00
Lennart Poettering
0a9f1fd79b
kdbus: minor simplification
2014-11-25 19:25:19 +01:00
Lennart Poettering
9f6dfd0624
sd-bus: fix error handling when receiving invalid service name
...
Also, properly keep track of incoming additional service names.
2014-11-25 14:28:34 +01:00
Lennart Poettering
6dfcc64bb5
sd-bus: properly handle non-initialized audit records attached to incoming kernel messages
2014-11-25 14:28:34 +01:00
Lennart Poettering
a6ede528c4
sd-bus: properly copy selinux label and description field when duplicating creds object
2014-11-25 14:28:34 +01:00
Lennart Poettering
0258159049
sd-bus: add supplementary groups list to creds object
2014-11-25 14:28:34 +01:00
Lennart Poettering
2e9efd22ce
busctl: if no parameter is specified for "busctl status" show credentials of bus owner
2014-11-25 14:28:34 +01:00
Lennart Poettering
becca6eaaf
sd-bus: properly handle uninitialized audit creds from kdbus
2014-11-25 14:28:34 +01:00
Lennart Poettering
359c09b1c1
sd-bus: don't fail when querying creds and dbus1 refuses to tell us the selinux context
2014-11-25 14:28:34 +01:00
Lennart Poettering
40ed1a4574
busctl: add new --augment-creds= switch for controlling whether shown credential data shall be augment with data from /proc
2014-11-25 14:28:34 +01:00
Lennart Poettering
705a415f68
sd-bus: update to current kernel version, by splitting off the extended KDBUS_ITEM_PIDS structure from KDBUS_ITEM_CREDS
...
Also:
- adds support for euid, suid, fsuid, egid, sgid, fsgid fields.
- makes augmentation of creds with data from /proc explicitly
controllable to give apps better control over this, given that this is
racy.
- enables augmentation for kdbus connections (previously we only did it
for dbus1). This is useful since with recent kdbus versions it is
possible for clients to control the metadata they want to send.
- changes sd_bus_query_sender_privilege() to take the euid of the client
into consideration, if known
- when we don't have permissions to read augmentation data from /proc,
don't fail, just don't add the data in
2014-11-25 14:28:34 +01:00
Lennart Poettering
1d58a1fe13
busctl: improve readability a bit
2014-11-25 14:28:34 +01:00
Lennart Poettering
5cf4f2d176
bus: change creds dumping order to be more close to internal storage order
2014-11-25 14:28:34 +01:00
Lennart Poettering
dc18cefdc3
sd-bus: don't blindly take incomplete ucred bits from AF_UNIX when constructing message
2014-11-25 14:28:34 +01:00
Lennart Poettering
a44b10818a
busctl: add --timeout= option to specify method call timeout
2014-11-21 20:31:50 +01:00
Lennart Poettering
3805157836
busctl: add options to control message header flags when invoking methods
2014-11-21 20:13:26 +01:00
Lennart Poettering
1fc5560911
busctl: show property values in "introspect" output, add "set-property" command, and support both a terse and a verbose output format
2014-11-21 00:32:02 +01:00
Lennart Poettering
b18ec7e29f
busctl: when --address is specified do not assume we connect to a full bus
2014-11-21 00:32:02 +01:00
Lennart Poettering
79f34de9fb
busctl: use canned error message on parse failure
2014-11-21 00:32:02 +01:00