summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-kernel.c
Commit message (Collapse)AuthorAgeFilesLines
...
* tree-wide: whenever we include libgen.h, immediately undefine basename()Lennart Poettering2015-02-111-1/+6
| | | | Also, document in adjacent comments and in CODING_STYLE why we do that.
* bus: sync with kdbus (ABI break)David Herrmann2015-02-051-11/+13
|
* Revert "sd-bus: change serialization of kdbus messages to qualify in their ↵Kay Sievers2015-01-301-37/+24
| | | | | | | | entirety as gvariant objects" This breaks booting with kdbus. This reverts commit b381de4197157748ed96e469fcc372c23f842ae1.
* sd-bus: change serialization of kdbus messages to qualify in their entirety ↵Lennart Poettering2015-01-261-24/+37
| | | | | | | | | | | | | | | | | | as gvariant objects Previously, we only minimally altered the dbus1 framing for kdbus, and while the header and its fields where compliant Gvariant objects, and so was the body, the entire message together was not. As result of discussions with Ryan Lortie this is now changed, so that the messages in there entirely are fully compliant GVariants. This follows the framing description described here: https://wiki.gnome.org/Projects/GLib/GDBus/Version2 Note that this change changes the framing of *all* messages sent via kdbus, this means you have to reboot your kdbus system, after compiling and installing this new version.
* sd-bus: reuse the KDBUS_CMD_FREE wrapper wherever appropriateLennart Poettering2015-01-261-8/+1
|
* bus: drop systemd.kdbus_attach_flags_mask= cmdlineDavid Herrmann2015-01-181-18/+9
| | | | | | | There is no reason to provide our own attach_flags_mask. We can simply rely on kdbus.attach_flags_mask= which is read by the kernel *and* kmod. If it's set, we assume the user wants to override our setting, so we simply skip setting it.
* sd-bus: sync kdbus.h (API break)Daniel Mack2015-01-121-1/+1
| | | | | Just a simple variable rename, and a dropped flag that sd-bus didn't make use of.
* bus: append bloom-filter to all signalsDavid Herrmann2015-01-091-1/+1
| | | | | Make sure to append bloom-filters to all signal-messages, not only broadcasts.
* sd-bus: unify how we set the sender of synthetic messagesLennart Poettering2015-01-071-10/+0
|
* sd-bus: make use of the newly added timestamps on kdbus kernel messagesLennart Poettering2015-01-071-18/+52
|
* sd-bus: sync kdbus.hDaniel Mack2015-01-051-1/+2
| | | | | | | | | Catch up with latest changes in kdbus.ko: * Signals can be sent as unicast now, hence they need to be marked as such with the KDBUS_MSG_SIGNAL in the message flags. * Follow ioctl number change for KDBUS_CMD_FREE
* bus: fix capabilities on big-endianDavid Herrmann2014-12-301-1/+1
| | | | | | | | | | | The kernel provides capabilities as a u32 array, sd-bus uses an u8 array. This works fine on little-endian as both are encoded the same way. However, this fails on big-endian if we do not perform sufficient byte-swapping on each u32 entry. This patch makes sd-bus use u32, too. We avoid changing any kernel provided data so we can keep pointing into kdbus pool buffers which contain u32 arrays.
* bus: drop creds->capability_sizeDavid Herrmann2014-12-301-1/+7
| | | | | | | | | | | The number of available caps can be read from /proc/sys/kernel/cap_last_cap during runtime. Our helper cap_last_cap() does that, so there's no reason to remember the size of any capability cache. We can just pre-allocate arrays with a suitable size for all available caps and reject any higher caps. The kernel capability API uses u32 as base so make sure we do the same. Note that this is specified by POSIX, so it's unlikely to change.
* bus: fix typoDavid Herrmann2014-12-291-1/+1
| | | | Drop spurious 'we'.
* core: rearrange code so that libsystemd/sd-bus/ does not include header ↵Lennart Poettering2014-12-231-185/+0
| | | | | | | files from core Stuff in src/shared or src/libsystemd should *never* include code from src/core or any of the tools, so don't do that here either. It's not OK!
* sd-bus: ignore KDBUS_ITEM_TIMESTAMP in kernel messagesDaniel Mack2014-12-221-0/+3
| | | | | | Kernel notifications carry a timestamp now, so make sure bus_kernel_translate_message() doesn't complain when it stumbles across them.
* bus: send attach flags on BUS_MAKEDavid Herrmann2014-12-121-0/+8
| | | | | Make sure to set send-attach-flags on BUS_MAKE. These control which information is revealed about the bus-owner.
* bus: fix assert() on HELLO error-pathDavid Herrmann2014-12-121-1/+6
| | | | | | Make sure we don't call into any bus_kernel_*() functions before b->is_kernel is set to true. Hard-code the CMD_FREE just like the other helpers do.
* bus: sync with kdbus.gitDavid Herrmann2014-12-111-12/+41
| | | | | | Changes: * bloom parameters are returned in an offset via HELLO * FREE now takes items just like any other ioctl
* bus: sync with kdbus.gitDavid Herrmann2014-12-111-13/+20
| | | | | | | | | | Sync up with recent kdbus changed: * several ioctls gained .size and .items members (but still unused) * CMD_SEND gained its own ioctl structure * several members of kdbus_msg were dropped as they were only used during SEND, not during RECV etc. * CMD_RECV and CMD_SEND now share a kdbus_reply member which contains the offset and size of the returned message.
* kdbus: downgrade warning if we cannot patch kdbus attach mask to DEBUG if ↵Lennart Poettering2014-12-101-1/+1
| | | | kdbus is not available
* sd-bus: get rid of PID starttime conceptLennart Poettering2014-12-091-11/+6
| | | | As kdbus no longer exports this, remove all traces from sd-bus too
* bus: sync with kdbus-git (ABI break)David Herrmann2014-12-091-7/+7
| | | | | | | | | kdbus-git gained two new features: * memfd offsets: This allows to specify a 'start' offset in kdbus_memfd so you can send partial memfd hunks instead of always the full memfd * KDBUS_HELLO_UNPRIVILEGED: If passed during HELLO, the client will be treated as unprivileged.
* sd-bus: follow kdbus changes (ABI break)Daniel Mack2014-12-051-3/+3
| | | | | | | | Implement a recent change in the kdbus pool logic: PAYLOAD_VEC_OFF items are now referencing offsets relative to the connection's pool, not to the item itself. Follow this change in sd-bus.
* treewide: introduce UID_INVALID (and friends) as macro for (uid_t) -1Lennart Poettering2014-11-281-9/+9
|
* sd-bus: add arrays of strings in the bloom filterLennart Poettering2014-11-281-24/+53
| | | | | | Let's do this right from the beginning, to prepare ground for udev messages that most likely want to store list of strings (for device tags) in messages, and filter on them.
* sd-bus: add new call sd_bus_get_scope() for querying whether one is ↵Lennart Poettering2014-11-281-0/+36
| | | | connected to a system or a user bus
* sd-bus: rework credential query logicLennart Poettering2014-11-281-5/+18
| | | | Also, make the call to free kdbus slices generic and use it everywhere
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-281-2/+2
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-281-2/+2
| | | | | | | | | | | | | 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().
* kdbus: when running in a container, don't complain that we cannot write to /sysLennart Poettering2014-11-281-8/+6
|
* sd-bus: the attach_mask kernel module parameter is 64bit now, hence ↵Lennart Poettering2014-11-281-1/+6
| | | | initialize it as such
* kdbus: set kernel attach mask before creating the first busLennart Poettering2014-11-271-1/+34
|
* sd-bus: when we get the list of well-known names back from kdbus we ↵Lennart Poettering2014-11-271-0/+8
| | | | shouldn't confuse the empty list with unknown information
* sd-bus: unify logic how we patch the message source of driver messagesLennart Poettering2014-11-271-11/+14
|
* sd-bus: fake valid well-known-names metadata for faked bus messagesLennart Poettering2014-11-271-2/+8
|
* sd-bus: optimize how we generate the well-known-names lists in messages from ↵Lennart Poettering2014-11-271-2/+16
| | | | kdbus
* sd-bus: be stricter with mismatches between dbus1 and kdbus message headersLennart Poettering2014-11-271-5/+28
|
* bus: prefix custom endpoints with "$UID-"David Herrmann2014-11-271-10/+10
| | | | | | 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.
* sd-bus: given that the kernel now passes the auxgroups list as 32bit array ↵Lennart Poettering2014-11-261-14/+3
| | | | | | | to us, no need to convert to uid_t manually This way, we can save one allocation and avoid copying the array unnecesarily.
* bus: update kdbus.h (ABI break)David Herrmann2014-11-261-2/+2
| | | | We changed creds to u32, so fix systemd sd-bus to acknowledge that.
* bus-kernel: when installing an activator, ask for any kind of metadata to be ↵Lennart Poettering2014-11-261-1/+1
| | | | | | | 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.
* sd-bus: don't clobber return values on failure in bus_kernel_open_bus_fd()Lennart Poettering2014-11-261-4/+13
|
* sd-bus: set per-bus attach flag requirement mask to ANYLennart Poettering2014-11-261-9/+23
| | | | | | | 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.
* sd-bus: add suppot for renegotiating message credential attach flagsLennart Poettering2014-11-261-10/+27
|
* sd-bus: react properly to EOVERFLOW by generating a log message about ↵Lennart Poettering2014-11-251-0/+5
| | | | dropped broadcast messages and proceeding
* kdbus: minor simplificationLennart Poettering2014-11-251-2/+1
|
* sd-bus: fix error handling when receiving invalid service nameLennart Poettering2014-11-251-7/+15
| | | | Also, properly keep track of incoming additional service names.
* sd-bus: properly handle non-initialized audit records attached to incoming ↵Lennart Poettering2014-11-251-3/+9
| | | | kernel messages
* sd-bus: add supplementary groups list to creds objectLennart Poettering2014-11-251-0/+26
|