summaryrefslogtreecommitdiff
path: root/src/systemd
Commit message (Collapse)AuthorAge
* libsystemd: add sd-device libraryTom Gundersen2015-04-02
| | | | | | | | | | | | This provides equivalent functionality to libudev-device, but in the systemd style. The public API only caters to creating sd_device objects from for devices that already exist in /sys, there is no support for listening for monitoring events or creating devices received over the udev netlink protocol. The private API contains the necessary functionality to make sd-device a drop-in replacement for libudev-device, but which we would not otherwise want to export.
* sd-event: rename PASSIVE/PREPARED to INITIAL/ARMEDTom Gundersen2015-03-14
|
* Fix typosTorstein Husebø2015-03-09
|
* networkd: add support for Uplink Failure DetectionAlin Rauta2015-02-27
| | | | | | | Introduce BindCarrier= to indicate the set of links that determine if the current link should be brought UP or DOWN. [tomegun: add a bit to commit message]
* id128: add new sd_id128_is_null() callLennart Poettering2015-02-24
|
* sd-bus: allow setting a per-connection default value for the ↵Lennart Poettering2015-02-18
| | | | | | | | | "allow-interactive-authentication" message flag Most of our client tools want to set this bit for all their method calls, even though it defaults to off in sd-bus, and rightfully so. Hence, to simplify thing, introduce a per sd_bus-object flag that sets the default value for all messages created on the connection.
* sd-bus: add missing format attributeCristian Rodríguez2015-02-16
|
* sd-bus: export sd_bus_error_set_errnofv()Lennart Poettering2015-02-13
|
* sd-rtnl: extend type system to allow address-family to decide the union membersTom Gundersen2015-02-08
| | | | | | So far we only supported selecting them by sibling attributes. (This stuff is all a bit crazy, but there seems to be no other way...)
* sd-rtnl: introduce sd_rtnl_new_from_netlinkTom Gundersen2015-02-02
|
* sd-icmp6-nd: Add support for fetching the latest expired prefixPatrik Flykt2015-01-27
| | | | | Keep the expired prefix for the duration of the prefix expiration event and remove it afterwards.
* sd-icmp6-nd: Parse ICMPv6 prefix informationPatrik Flykt2015-01-27
| | | | | | | | | | | | Save each new onlink IPv6 prefix and attach an expiry timer to it. If the prefixes overlap, take the shorter prefix and write a debug message about the event. Once the prefix is resent in a Router Advertisement, update the timer. Add a new event for the expiring prefix. Add two helper functions, one for returning a prefix length given a Router Advertisement and the other for generic prefix matching given an IPv6 prefix and address.
* sd-icmp6-nd: Add helper function to get the IPv6 link MTUPatrik Flykt2015-01-27
| | | | Update MTU according to the latest value received.
* sd-dhcp6-lease: Revise address iteration functionsPatrik Flykt2015-01-27
| | | | | | | | Revise the address iteration functions so that one helper function resets the iterator to the start of the address list while the second one fetches addresses one by one. The test case is also updated.
* nspawn: add new option "--port=" for exposing container ports on the local hostLennart Poettering2015-01-13
| | | | This exposes an IP port on the container as local port using DNAT.
* 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.
* 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: 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.
* 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.
* sd-lldp: minor header cleanupTom Gundersen2014-12-19
| | | | | | | | | | | * (potentially) public headers must reside in src/systemd/ (not in src/libsystemd*) * some private (not prefixed with sd_) functions moved from sd-lldp.h to lldp-internal.h * introduce lldp-util.h for the cleanup macro, as these should not be public * rename the cleanup macro, we always name them _cleanup_foo_, never _cleanup_sd_foo_ * mark some function arguments as 'const'
* LLDP: Add support for networkctlSusant Sahani2014-12-19
|
* networkd: add FDB supportAlin Rauta2014-12-18
|
* journal: fix dangling 'else' ambiguityDavid Herrmann2014-12-12
| | | | | | | | | | | Rework the sd-journal iterators to avoid dangling 'else' ambiguity. For a detailed explanation, see: commit bff686e2a981ccd0888cdf1981977d24320f1770 Author: David Herrmann <dh.herrmann@gmail.com> Date: Fri Dec 12 09:43:54 2014 +0100 hwdb: fix dangling 'else' ambuguity
* hwdb: fix dangling 'else' ambuguityDavid Herrmann2014-12-12
| | | | | | | | | | | | | | | | | | | | Imagine the following use of hwdb: if (condition_A) SD_HWDB_FOREACH_PROPERTY(hwdb, modalias, key, value) operation_A(key, value); else log_error("..."); This should work just fine, but but definitely does not what you would expect. Due to how SD_HWDB_FOREACH_PROPERTY is defined, the dangling 'else' is linked to the hidden 'if' statement in the macro instead of the outer 'if (condition_A)'. This is unexpected and really annoying to debug. Fix this by never leaving un-finished if-statements in SD_HWDB_FOREACH_PROPERTY(). We simply inverse the if() statement and explicitly add an 'else'-branch. This way, the statement is closed and all ambuguities are resolved.
* hwdb: FOREACH_HWDB_PROPERTY -> SD_HWDB_FOREACH_PROPERTYDavid Herrmann2014-12-12
| | | | | Lets not pollute the global namespace. Prefix all our exported names and macros with SD_HWDB_*.
* treewide: 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
* sd-dhcp6-client: Implement Information Request messagePatrik Flykt2014-12-10
| | | | | | | | | | | Implement Information Request message according to RFC 3315, section 18.1.5. with the excepion that the first message is not delayed by a random amount. Instead systemd-networkd is supposed to take care of desynchronizing between other clients. Initialize the DHCPv6 client structure in sd_dhcp6_client_start() as this allows toggling between information request and normal DHCPv6 address aquisition modes.
* sd-bus: get rid of PID starttime conceptLennart Poettering2014-12-09
| | | | As kdbus no longer exports this, remove all traces from sd-bus too
* sd-bus: properly support passing memfds around with offset/size parametersLennart Poettering2014-12-09
|
* networkd: manager - enumerate addresses globally, rather than per-linkTom Gundersen2014-12-08
| | | | The kernel always returns all addresses, rather than only for the given link, so let's only enumerate once.
* sd-bus: rework ELF error mapping table magicLennart Poettering2014-12-08
| | | | | | | The ELF magic cannot work for consumers of our shard library, since they are in a different module. Hence make all the ELF magic private, and instead introduce a public function to register additional static mapping table.
* sd-rtnl: fix compileTom Gundersen2014-12-04
| | | | No idea how this appeared to compile for me. Mea culpa.
* sd-rtnl: rename sd_rtnl_message_route_get_{dst,src}_len to *_prefixlenTom Gundersen2014-12-04
| | | | This makes the API more consistent.
* networkd: add support for source routingTom Gundersen2014-12-04
|
* rtnl: make checks for default routes more strictLennart Poettering2014-12-03
| | | | | Also check that the source netmask is 0, not only the destination netmask.
* nss-myhostname: always resolve the host name "gateway" to the local default ↵Lennart Poettering2014-12-03
| | | | | | | | gateway This is useful inside of containers or local networks to intrdouce a stable name of the default gateway host (in case of containers usually the host, in case of LANs usually local router).
* sd-rtnl: add sd_rtnl_message_{new_neigh,neigh_get_{family,ifindex}}Tom Gundersen2014-12-02
|
* sd-rtnl: add typesystem for RTM_*NEIGHTom Gundersen2014-12-02
|
* sd-rtnl: add sd_rtnl_message_route_get_familyTom Gundersen2014-12-02
|
* sd-bus: make more connection properties readableLennart Poettering2014-11-28
|
* sd-bus: add new sd_bus_get_address() for querying the current bus addressLennart Poettering2014-11-28
| | | | Also, update "busctl" to show this in its output.
* sd-bus: rename sd_bus_get_owner_id() → sd_bus_get_bus_id()Lennart Poettering2014-11-28
| | | | | | | The ID returned really doesn't identify the owner, but the bus instance, hence fix this misnaming. Also, update "busctl status" to show the ID in its output.
* sd-bus: add new call sd_bus_get_scope() for querying whether one is ↵Lennart Poettering2014-11-28
| | | | connected to a system or a user bus
* bus-proxy: check passed parameter signature of all driver method callsLennart Poettering2014-11-27
|
* networkd: fix kernel rtnl receive buffer overrun errorAlin Rauta2014-11-27
| | | | | | | | | | | | | | | | | | | | | | 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]
* sd-bus: add suppot for renegotiating message credential attach flagsLennart Poettering2014-11-26
|
* sd-bus: add supplementary groups list to creds objectLennart Poettering2014-11-25
|
* sd-bus: update to current kernel version, by splitting off the extended ↵Lennart Poettering2014-11-25
| | | | | | | | | | | | | | | | | | | | | | 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
* sd-dhcp-lease: load/save client IDDan Williams2014-11-19
| | | | | The lease is usually tied to the client ID, so users of the lease may want to know what client ID it was acquired with.