summaryrefslogtreecommitdiff
path: root/Makefile.am
AgeCommit message (Collapse)Author
2016-07-22core: add a concept of "dynamic" user ids, that are allocated as long as a ↵Lennart Poettering
service is running This adds a new boolean setting DynamicUser= to service files. If set, a new user will be allocated dynamically when the unit is started, and released when it is stopped. The user ID is allocated from the range 61184..65519. The user will not be added to /etc/passwd (but an NSS module to be added later should make it show up in getent passwd). For now, care should be taken that the service writes no files to disk, since this might result in files owned by UIDs that might get assigned dynamically to a different service later on. Later patches will tighten sandboxing in order to ensure that this cannot happen, except for a few selected directories. A simple way to test this is: systemd-run -p DynamicUser=1 /bin/sleep 99999
2016-07-05Merge pull request #3638 from whot/udev-prop-touchpad-integrationLennart Poettering
tag touchpads as internal/external
2016-07-03build-sys: link test-keymap-util against libsystemd-sharedFelipe Sateler
2016-07-03tests: run file via libtool to determine shell scriptsFelipe Sateler
The actual output file might be a wrapper script, so lets follow the indirection Fixes: #3644
2016-07-01hwdb: add a 70-touchpad.hwdb to tag internal vs external touchpadsPeter Hutterer
Add a new key ID_INPUT_TOUCHPAD_INTEGRATION=internal|external so we have a single source for figuring out which touchpads are built-in. Fairly simple approach: bluetooth is external, usb is external unless it's an Apple touchpad. Everything else is internal.
2016-06-29Merge pull request #3516 from fsateler/shared-basicLennart Poettering
build-sys: Convert libshared into a private shared library
2016-06-26catalog: make support URL to show in shipped catalog entries configurable ↵Lennart Poettering
(#3597) Let's allow distros to change the support URL to expose in catalog entries by default. It doesn't make sense to direct end-users to the upstream project for common errors. This adds a --with-support-url= switch to configure, which allows overriding the default at build-time. Fixes: #2516
2016-06-24build-sys: Add new libsystemd-shared private libraryFelipe Sateler
Link as many binaries as possible with it, to save storage space. Preserve the static libshared and libbasic for use in libraries, nss modules and udev. Libraries need to be static in order to avoid polluting the symbol namespace. Udev needs to be static so downstream can avoid strict version dependencies with the systemd package, and this can complicate upgrade scenarios.
2016-06-24build-sys: do not recompile everything for libsystemdFelipe Sateler
2016-06-24Merge pull request #3549 from poettering/resolved-moreTom Gundersen
resolved: more fixes, among them "systemctl-resolve --status" to see DNS configuration in effect, and a local DNS stub listener on 127.0.0.53
2016-06-23build-sys: move fdset.[ch] src/basic → src/shared (#3580)Lennart Poettering
It makes use of the sd_listen_fds() call, and as such should live in src/shared, as the distinction between src/basic and src/shared is that the latter may use libsystemd APIs, the former does not. Note that btrfs-util.[ch] and log.[ch] also include header files from libsystemd, but they only need definitions, they do not invoke any function from it. Hence they may stay in src/basic.
2016-06-21resolved: respond to local resolver requests on 127.0.0.53:53Lennart Poettering
In order to improve compatibility with local clients that speak DNS directly (and do not use NSS or our bus API) listen locally on 127.0.0.53:53 and process any queries made that way. Note that resolved does not implement a full DNS server on this port, but simply enough to allow normal, local clients to resolve RRs through resolved. Specifically it does not implement queries without the RD bit set (these are requests where recursive lookups are explicitly disabled), and neither queries with DNSSEC DO set in combination with DNSSEC CD (i.e. DNSSEC lookups with validation turned off). It also refuses zone transfers and obsolete RR types. All lookups done this way will be rejected with a clean error code, so that the client side can repeat the query with a reduced feature set. The code will set the DNSSEC AD flag however, depending on whether the data resolved has been validated (or comes from a local, trusted source). Lookups made via this mechanisms are propagated to LLMNR and mDNS as necessary, but this is only partially useful as DNS packets cannot carry IP scope data (i.e. the ifindex), and hence link-local addresses returned cannot be used properly (and given that LLMNR/mDNS are mostly about link-local communication this is quite a limitation). Also, given that DNS tends to use IDNA for non-ASCII names, while LLMNR/mDNS uses UTF-8 lookups cannot be mapped 1:1. In general this should improve compatibility with clients bypassing NSS but it is highly recommended for clients to instead use NSS or our native bus API. This patch also beefs up the DnsStream logic, as it reuses the code for local TCP listening. DnsStream now provides proper reference counting for its objects. In order to avoid feedback loops resolved will no silently ignore 127.0.0.53 specified as DNS server when reading configuration. resolved listens on 127.0.0.53:53 instead of 127.0.0.1:53 in order to leave the latter free for local, external DNS servers or forwarders. This also changes the "etc.conf" tmpfiles snippet to create a symlink from /etc/resolv.conf to /usr/lib/systemd/resolv.conf by default, thus making this stub the default mode of operation if /etc is not populated.
2016-06-18Ensure kdbus isn't used (#3501)Dave Reisner
Delete the dbus1 generator and some critical wiring. This prevents kdbus from being loaded or detected. As such, it will never be used, even if the user still has a useful kdbus module loaded on their system. Sort of fixes #3480. Not really, but it's better than the current state.
2016-06-16networkd: added support for vrf interfaces (#3316)Andreas Rammhold
2016-06-13Merge pull request #3491 from poettering/hwdb-acpiTom Gundersen
hwdb: update UEFI/ACPI/PNP/EISA/EDID database from UEFI web site
2016-06-13Merge pull request #3384 from keszybz/localed-keymapLennart Poettering
More verbose logging in localed, unit tests, and a few tweaks to keymap conversions
2016-06-11test-keymap-util: use kbd-model-map/language-fallback-map from $(srcdir)Zbigniew Jędrzejewski-Szmek
This adds (undocumented) environment variables SYSTEMD_KBD_MODEL_MAP and SYSTEMD_LANGUAGE_FALLBACK_MAP, which, if set, override compiled-in locations of those two files. Instead of skipping tests when the maps are not installed, just use the one from the source dir. We still cannot do the mappings the other way if /usr/lib/kbd/keymaps is not present, so truncate the tests in that case. Also tweak the debug messages a bit to make it easier to see which function is failing.
2016-06-10hwdb: update UEFI/ACPI/PNP/EISA/EDID database from UEFI web siteFederico Mena Quintero
Let's hook up the ACPI database we maintain from the upstream UEFI sources. This adds a tool to convert the database provided upstream to our native format, similar to how this is handled for the PCI and USB databases. Note that the upstream web site claims to offer an XLS download, but the actual data made available is an HTML file in reality, just one with the ".xls" suffix... The data provided from the UEFI folks is not very high quality nor complete, hence apply a patch after the conversion step that fixes up a few things and adds in more entries from various sources. For example, the EDID ids maintained by GNOME and other sources have been added too, as they all appear to use the same ID namespace. This also adds explicit support for 4 character ACPI ids, in addition to the normal 3 character PNP ids. Also fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90524
2016-06-10networkd: add support to configure VLAN on bridge portsTobias Jungel
2016-06-09networkd: clean up vlan handling a bit (#3478)Lennart Poettering
Let's add a generic parser for VLAN ids, which should become handy as preparation for PR #3428. Let's also make sure we use uint16_t for the vlan ID type everywhere, and that validity checks are already applied at the time of parsing, and not only whne we about to prepare a netdev. Also, establish a common definition VLANID_INVALID we can use for non-initialized VLAN id fields.
2016-06-06network: beef up ipv6 RA support considerablyLennart Poettering
This reworks sd-ndisc and networkd substantially to support IPv6 RA much more comprehensively. Since the API is extended quite a bit networkd has been ported over too, and the patch is not as straight-forward as one could wish. The rework includes: - Support for DNSSL, RDNSS and RA routing options in sd-ndisc and networkd. Two new configuration options have been added to networkd to make this configurable. - sd-ndisc now exposes an sd_ndisc_router object that encapsulates a full RA message, and has direct, friendly acessor functions for the singleton RA properties, as well as an iterative interface to iterate through known and unsupported options. The router object may either be retrieved from the wire, or generated from raw data. In many ways the sd-ndisc API now matches the sd-lldp API, except that no implicit database of seen data is kept. (Note that sd-ndisc actually had a half-written, but unused implementaiton of such a store, which is removed now.) - sd-ndisc will now collect the reception timestamps of RA, which is useful to make sd_ndisc_router fully descriptive of what it covers. Fixes: #1079
2016-06-06keymap-util: add tests and fix one small bugZbigniew Jędrzejewski-Szmek
When converting an empty x11 variant, we would not delete vconsole mapping properly. find_legacy_keymap() is made non-static. I think it's important to be able to test it. In principle we could also test it through the higher-level interface of x11_convert_to_vconsole, but x11_convert_to_vconsole also uses find_converted_keymap, and it's better to test at this lower level. Note that find_legacy_keymap might be a bit of a misnomer, because we'd probably want to keep kbd-model-map even if the "legacy" layouts went away. So we might want to change this name, but I'm leaving that for another commit.
2016-06-06localed: split out keymap parsing to a separate fileZbigniew Jędrzejewski-Szmek
This way the dbus and management logic is seperated from the business logic and we can write test cases for the mapping functionality.
2016-05-29util-lib: Add sparc64 support for process creation (#3348)Michael Karcher
The current raw_clone function takes two arguments, the cloning flags and a pointer to the stack for the cloned child. The raw cloning without passing a "thread main" function does not make sense if a new stack is specified, as it returns in both the parent and the child, which will fail in the child as the stack is virgin. All uses of raw_clone indeed pass NULL for the stack pointer which indicates that both processes should share the stack address (so you better don't pass CLONE_VM). This commit refactors the code to not require the caller to pass the stack address, as NULL is the only sensible option. It also adds the magic code needed to make raw_clone work on sparc64, which does not return 0 in %o0 for the child, but indicates the child process by setting %o1 to non-zero. This refactoring is not plain aesthetic, because non-NULL stack addresses need to get mangled before being passed to the clone syscall (you have to apply STACK_BIAS), whereas NULL must not be mangled. Implementing the conditional mangling of the stack address would needlessly complicate the code. raw_clone is moved to a separete header, because the burden of including the assert machinery and sched.h shouldn't be applied to every user of missing_syscalls.h
2016-05-26nspawn: split out seccomp call into nspawn-seccomp.[ch]Djalal Harouni
Split seccomp into nspawn-seccomp.[ch]. Currently there are no changes, but this will make it easy in the future to share or use the seccomp logic from systemd core.
2016-05-21build-sys: bump so versionZbigniew Jędrzejewski-Szmek
2016-05-14po, catalog - add Bulgarian translationAlexander Shopov
2016-05-12Create initrd-root-device.target synchronization point (#3239)Daniel Drake
Add a synchronization point so that custom initramfs units can run after the root device becomes available, before it is fsck'd and mounted. This is useful for custom initramfs units that may modify the root disk partition table, where the root device is not known in advance (it's dynamically selected by the generators).
2016-05-09network: add automatic configuration for the networks created by nspawn ↵Lennart Poettering
--network-zone= This way, they "just work", similar to --network-veth behaves, as long as networkd is enabled and running on all involved nodes.
2016-05-06tests: add test for #3171 (#3206)Evgeny Vereshchagin
2016-05-04Merge pull request #3156 from keszybz/duid-settingsLennart Poettering
Rework DUID setting
2016-05-03test-networkd-conf: add tests for the parsing functionsZbigniew Jędrzejewski-Szmek
2016-05-03tests: add test for #3166 (#3180)Evgeny Vereshchagin
2016-05-02Merge pull request #3153 from poettering/async-cloneZbigniew Jędrzejewski-Szmek
machined: make "clone" asynchronous, and support copy-based fall-back
2016-05-02machined: run clone operation asynchronously in the backgroundLennart Poettering
Cloning an image can be slow, if the image is not on a btrfs subvolume, hence let's make sure we do this asynchronously in a child process, so that machined isn't blocked as long as we process the client request. This adds a new, generic "Operation" object to machined, that is used to track these kind of background processes. This is inspired by the MachineOperation object that already exists to make copy operations asynchronous. A later patch will rework the MachineOperation logic to use the generic Operation instead.
2016-05-02tests: add test for https://github.com/systemd/systemd/issues/2467 (#3168)Evgeny Vereshchagin
2016-05-01build-sys: add TEST-0[89]-* to distEvgeny Vereshchagin
Follow-up for 91f9f8f1bae and 4f4d6ee4be1c
2016-04-25nspawn: optionally fix up OS tree uid/gids for usernsLennart Poettering
This adds a new --private-userns-chown switch that may be used in combination with --private-userns. If it is passed a recursive chmod() operation is run on the OS tree, fixing all file owner UID/GIDs to the right ranges. This should make user namespacing pretty workable, as the OS trees don't need to be prepared manually anymore.
2016-04-22shared: move output_mode_to_string() into output-mode.cLennart Poettering
After all, the enum definition is in output-mode.h
2016-04-22core,systemctl: add bus API to retrieve processes of a unitLennart Poettering
This adds a new GetProcesses() bus call to the Unit object which returns an array consisting of all PIDs, their process names, as well as their full cgroup paths. This is then used by "systemctl status" to show the per-unit process tree. This has the benefit that the client-side no longer needs to access the cgroupfs directly to show the process tree of a unit. Instead, it now uses this new API, which means it also works if -H or -M are used correctly, as the information from the specific host is used, and not the one from the local system. Fixes: #2945
2016-04-21Merge pull request #3005 from keszybz/kill-user-procesesLennart Poettering
Kill user session scope by default
2016-04-21build-sys: add --without-kill-user-processes configure optionZbigniew Jędrzejewski-Szmek
2016-04-14build-sys: add missing -ldlEvgeny Vereshchagin
Fixes #3035
2016-04-12tests: override XDG_RUNTIME_DIR where we use the user runtime dirLennart Poettering
We don#t really support systems where XDG_RUNTIME_DIR is not supported for systemd --user. Hence, let's always set our own XDG_RUNTIME_DIR for tests that involve systemd --user, so that we know it is set, and that it doesn't polute the user's actual runtime dir.
2016-04-12basic: remove rbtree code, it's unusedLennart Poettering
it's unused, and should we need it one day we can always resurrect it from git history.
2016-04-12localed: downgrade libxkbcommon to an optional runtime dependencyLennart Poettering
Previously, libxkbcommon was a compile-time option. When enabled the localed binary would strictly depend on it, thus pulling in libxkbcommon and its dependencies, which are non-trivial in size. With this change we dlopen() libxkbcommon when it is available instead. If the library is available behaviour is as before. However, if it isn't the system is considered "headless", i.e. without local hardware and all attempts to set the local keyboard configuration will be refused. This is useful for general-purpose distributions which want to support "headless" (such as container systems) and "full" systems with the same build.
2016-04-11Merge pull request #3014 from msekletar/nspawn-empty-machine-id-v3Lennart Poettering
nspawn: always setup machine id (v3)
2016-04-11nspawn: always setup machine idMichal Sekletar
We check /etc/machine-id of the container and if it is already populated we use value from there, possibly ignoring value of --uuid option from the command line. When dealing with R/O image we setup transient machine id. Once we determined machine id of the container, we use this value for registration with systemd-machined and we also export it via container_uuid environment variable. As registration with systemd-machined is done by the main nspawn process we communicate container machine id established by setup_machine_id from outer child to the main process by unix domain socket. Similarly to PID of inner child.
2016-04-08build-sys: test/sys depends on test/sys.tar.xzEvgeny Vereshchagin
Fixes: $ ls -ld test/sys drwxr-xr-x. 12 vagrant vagrant 4096 Jan 6 2012 test/sys $ git pull Updating d4337c1..710a885 Fast-forward ... test/sys.tar.xz | Bin 261380 -> 165116 bytes test/udev-test.pl | 67 ++++++++++++----- $ sudo make check TESTS=test/udev-test.pl ... FAIL: test/udev-test.pl $ rm -r test/sys $ make test/sys $ sudo make check TESTS=test/udev-test.pl ... PASS: test/udev-test.pl
2016-04-07build-sys: force generation of triggers.systemd fileZbigniew Jędrzejewski-Szmek
We don't want to actually install it anywhere, because it is only usable copied or %included directly into a spec file, and must be available before %prep is run. But still, it's useful to generate it automatically so it's easier to copy and it doesn't go stale.