summaryrefslogtreecommitdiff
path: root/src/libsystemd
Commit message (Collapse)AuthorAge
* bus: append bloom-filter to all signalsDavid Herrmann2015-01-09
| | | | | Make sure to append bloom-filters to all signal-messages, not only broadcasts.
* sd-bus: fix copy-paste errorLukasz Skalski2015-01-08
|
* bus-util: fix error number output when waiting for jobLennart Poettering2015-01-07
|
* busctl: exit cleanly when the bus connection is severedLennart Poettering2015-01-07
|
* sd-bus: when we synthesize messages, initialize timestamps ourselvesLennart Poettering2015-01-07
|
* sd-bus: unify how we set the sender of synthetic messagesLennart Poettering2015-01-07
|
* sd-bus: make use of the newly added timestamps on kdbus kernel messagesLennart Poettering2015-01-07
|
* sd-bus: always catch name requests for the special names ↵Lennart Poettering2015-01-07
| | | | "org.freedesktop.DBus" and "org.freedesktop.DBus.Local" and refuse them
* core: add new logic for services to store file descriptors in PID 1Lennart Poettering2015-01-06
| | | | | | | | | | | | | | With this change it is possible to send file descriptors to PID 1, via sd_pid_notify_with_fds() which PID 1 will store individually for each service, and pass via the usual fd passing logic on next invocation. This is useful for enable daemon reload schemes where daemons serialize their state to /run, push their fds into PID 1 and terminate, restoring their state on next start from the data in /run and passed in from PID 1. The fds are kept by PID 1 as long as no POLLHUP or POLLERR is seen on them, and the service they belong to are either not dead or failed, or have a job queued.
* sd-bus: sync kdbus.hDaniel Mack2015-01-05
| | | | | | | | | 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
* systemctl: fix waiting for jobs when using direct connections to PID 1 for dbusLennart Poettering2015-01-05
|
* machined,bus-proxy: fix connecting to containersLennart Poettering2015-01-05
|
* tree-wide: spelling fixesVeres Lajos2014-12-30
| | | | | | | https://github.com/vlajos/misspell_fixer https://github.com/torstehu/systemd/commit/b6fdeb618cf2f3ce1645b3315f15f482710c7ffa Thanks to Torstein Husebo <torstein@huseboe.net>.
* bus: replace ENOSYS return codes with EBADR/ENOTSUPZbigniew Jędrzejewski-Szmek2014-12-30
| | | | | | | | | ENOSYS is used to signify compiled-out functionality. Using it for different kinds of error is misleading. For BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED, logind-action.c uses ENOTSUP already, so changing it to ENOTSUP makes the dbus and action paths behave the same.
* bus: add sd_bus_emit_object_{added/removed}()David Herrmann2014-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | This implements two new helpers, discussed on systemd-devel about 1 year ago: sd_bus_emit_object_added() sd_bus_emit_object_removed() Both calls are equivalent to their respective counterpart sd_bus_emit_interfaces_{added/removed}(), but can figure out the list of interfaces themselves, instead of requiring the caller to provide them. Furthermore, both calls properly deal with builtin interfaces provided via org.freedesktop.DBus.* and alike. Both calls simply traverse a node and all its parent nodes to figure out a list of all interfaces registered as vtable or fallback. It then appends each of them, similar to the interfaces_{added/removed}() helpers. Note that interfaces_{added/removed}() runs a parent traversal for *each* passed interface. Therefore, it can simply bail out, once it found a parent node that implements a given interface. With object_{added/removed}() we cannot know the registered interfaces in advance, thus, we cannot run one traversal per node. Instead, we run a single traversal and remember all interfaces that we added. Therefore, a child-interface overrides all conflicting parent-interfaces. We keep a "Set *s" context to track those while climbing up the tree.
* bus: fix capabilities on big-endianDavid Herrmann2014-12-30
| | | | | | | | | | | 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-30
| | | | | | | | | | | 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.
* machinectl: add "enable" and "disable" verbs for enabling/disabling ↵Lennart Poettering2014-12-29
| | | | | | | systemd-nspawn for containers This is basically just a shortcut for "systemctl enable systemd-nspawn@<foobar>.service", but does escaping.
* machinectl: add new "start" verb to start a container as a service in nspawnLennart Poettering2014-12-29
|
* bus: fix typoDavid Herrmann2014-12-29
| | | | Drop spurious 'we'.
* rtnl: recv_message - don't enforce sender uidTom Gundersen2014-12-29
| | | | | | | All we care about is that the kernel (pid==0) sent the message. Verifying the sender uid seems to break when using userns. Reported by Stéphane Graber.
* sd-rtnl: rtnl_call - don't dispatch wqueue after timeout has passedTom Gundersen2014-12-29
| | | | Only a minor change as the timeout would be hit soon thereafetr at the next loop.
* sd-rtnl: rtnl_poll - fix typoTom Gundersen2014-12-29
| | | | This caused rtnl_poll to always return true immediately in sd_rtnl_call().
* sd-rtnl: recv_message - drop message when peeking failsTom Gundersen2014-12-29
| | | | | Read the message form the socket or we will loop trying to read the same message repeatedly.
* sd-rtnl: recv_message - don't fail on interruptTom Gundersen2014-12-29
| | | | We should just try again instead.
* sd-rtnl: recv_message - log when dropping messageTom Gundersen2014-12-29
| | | | We drop messages received from the wrong uid/pid, log this at debug level.
* libsystemd: Fix minor typo in commentSylvain Plantefève2014-12-28
|
* bus: remove spurious include of <sys/capability.h>Filipe Brandenburger2014-12-25
| | | | | | | | | They do not use any functions from libcap directly. The CAP_SYS_ADMIN constant in use by bus-objects.c comes from <linux/capability.h> imported through "missing.h". The "missing.h" header is imported through "util.h" which gets imported in "bus-util.h". Tested that everything builds cleanly after this change.
* sd-bus: rename sd_bus_open_system_container() to sd_bus_open_system_machine()Lennart Poettering2014-12-24
| | | | | | | Pretty much everywhere else we use the generic term "machine" when referring to containers in API, so let's do though in sd-bus too. In particular, since the concept of a "container" exists in sd-bus too, but as part of the marshalling system.
* busctl: when introspecting objects, optionally limit output by interface nameLennart Poettering2014-12-23
|
* sd-bus: teach x-container-unix: bus protoocol to connect to the namespace of ↵Lennart Poettering2014-12-23
| | | | a PID instead of a container name
* core: rearrange code so that libsystemd/sd-bus/ does not include header ↵Lennart Poettering2014-12-23
| | | | | | | 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-22
| | | | | | Kernel notifications carry a timestamp now, so make sure bus_kernel_translate_message() doesn't complain when it stumbles across them.
* sd-bus: sync kdbus.h (ABI break)Daniel Mack2014-12-20
| | | | | | | | | | | | | | | Sync kdbus.h with upstream changes: * Two optional cancellation points where added for synchronously blocking KDBUS_CMD_SEND commands: A sigmask to change the mask of accepted signals before the task is put to sleep, and a generic file descriptor that can be written to, in order to cancel the command. Both methods are currently unused. * The KDBUS_CMD_CANCEL ioctl was removed. sd-bus was never using that command, so there's no change needed. * Some kerneldoc fixes
* machined: add new GetImage() bus call for retrieving the bus path for an imageLennart Poettering2014-12-19
|
* LLDP: Add support for networkctlSusant Sahani2014-12-19
|
* networkd: add FDB supportAlin Rauta2014-12-18
|
* bus: send attach flags on BUS_MAKEDavid Herrmann2014-12-12
| | | | | 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-12
| | | | | | 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-11
| | | | | | Changes: * bloom parameters are returned in an offset via HELLO * FREE now takes items just like any other ioctl
* treewide: correct spacing near eol in code commentsTorstein Husebø2014-12-11
|
* sd-bus: correct spacing near eol in code commentsTorstein Husebø2014-12-11
|
* libsystemd: add sd-hwdb libraryTom Gundersen2014-12-11
| | | | | | | | | | | | | | | | This is libudev-hwdb, but decoupled from libudev and in the libsystemd style. The core code is unchanged, apart from the following minor changes: - hwdb.bin located in /**/systemd/hwdb/ take preference over the ones located in /**/udev/ - properties are stored internally in an OrderedHashmap, rather than a linked list. - a new API call allows individual properties to be queried directly, rather than iterating over them all - the iteration over properties have been moved inside the library, rather than exposing a list directly - the unused 'flags' parameter was dropped
* bus: sync with kdbus.gitDavid Herrmann2014-12-11
| | | | | | | | | | 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.
* bus: zero cmd_free before passing to ioctlDavid Herrmann2014-12-11
| | | | | Make sure the whole cmd_free object is zeroed before passing it into the kernel. This makes valgrind happy and makes us future proof.
* bus: fix memfd-cache regarding memfd offsetsDavid Herrmann2014-12-11
| | | | | | | | | We must restore part->mmap_begin when poping memfds from the memfd-cache. We rely on the memfds to be unsealed, so we can be sure that we own the whole FD. Therefore, simply set part->mmap_begin to the same as part->data. This fixes test-bus-kernel-benchmark.
* sd-bus: make BUS_ERROR_MAP_ELF_USE() use a const variableLennart Poettering2014-12-10
|
* sd-bus: move common errors src/shared/bus-errors.h → ↵Lennart Poettering2014-12-10
| | | | | | src/libsystemd/sd-bus/bus-common-errors.h Stuff in src/shared/ should not use stuff from src/libsystemd/ really.
* kdbus: downgrade warning if we cannot patch kdbus attach mask to DEBUG if ↵Lennart Poettering2014-12-10
| | | | kdbus is not available
* util: introduce our own gperf based capability listLennart Poettering2014-12-10
| | | | | This way, we can ensure we have a more complete, up-to-date list of capabilities around, always.