summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-14Merge pull request #5335 from poettering/resolved-some-fixesLennart Poettering
some post-mdns fixes for resolved
2017-02-14Define clone order on ppc (#5325)Zbigniew Jędrzejewski-Szmek
This was tested on ppc64le. Assume the same is true for ppc64.
2017-02-14resolved: restore ANY reply behaviour for mDNSLennart Poettering
This restores behaviour of 53fda2bb933694c9bdb1bbf1f5583e39673b74b2: for mDNS (and mDNS only) we'll match replies to transactions honouring ANY matches.
2017-02-14resolved: size the mdns announce answer array properlyLennart Poettering
The array doesn't grow dynamically, hence pick the right size at the moment of allocation. Let's simply multiply the number of addresses of this link by 2, as that's how many RRs we maintain for it.
2017-02-14rules: add persistent by-path drm rules (#5337)Marc-Andre Lureau
Create persistent symlinks for DRM devices, ex: /dev/dri/by-path/pci-0000:00:02.0-card -> /dev/dri/card1 /dev/dri/by-path/pci-0000:00:02.0-render -> /dev/dri/renderD129 etc... This allows to configure DRM device usage with stable paths. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-02-13Merge pull request #5298 from martinpitt/relocatable-testsZbigniew Jędrzejewski-Szmek
test: make unit tests relocatable and add an "install-tests" make target
2017-02-13fstab-generator: quiesce false-positive -Werror=format-nonliteral (#5336)Martin Pitt
Commit ae3251851 changed the fprintf() format argument into a variable which triggers a gcc 6.3 warning/error: src/fstab-generator/fstab-generator.c:243:17: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] fprintf(f, format, res); This is a false positive, as the function is only being called with constant (not user-definable) arguments which are valid format strings.
2017-02-13buildsys: add "install-tests" targetMartin Pitt
Add a new "install-tests" make target that installs our unit test-* executables and their test data files into /usr/lib/systemd/tests/. This is useful for packaging the tests to run them with root privileges or in CI. Fixes #5257
2017-02-13test: make unit tests relocatableMartin Pitt
It is useful to package test-* binaries and run them as root under autopkgtest or manually on particular machines. They currently have a built-in hardcoded absolute path to their test data, which does not work when running the test programs from any other path than the original build directory. By default, make the tests look for their data in <test_exe_directory>/testdata/ so that they can be called from any directory (provided that the corresponding test data is installed correctly). As we don't have a fixed static path in the build tree (as build and source tree are independent), set $TEST_DIR with "make check" to point to <srcdir>/test/, as we previously did with an automake variable.
2017-02-13test: move resolved test data into test/Martin Pitt
Moe test-resolve's test data from src/resolve/test-data to test/test-resolve/ to be consistent with test/test-{execute,path}/. This will make it easier to make the tests relocatable.
2017-02-13fstab-generator: add x-systemd.before and x-systemd.after fstab options (#5330)Ruslan Bilovol
Currently fstab entries with 'nofail' option are mounted asynchronously and there is no way how to specify dependencies between such fstab entry and another units. It means that users are forced to write additional dependency units manually. The patch introduces new systemd fstab options: x-systemd.before=<PATH> x-systemd.after=<PATH> - to specify another mount dependency (PATH is translated to unit name) x-systemd.before=<UNIT> x-systemd.after=<UNIT> - to specify arbitrary UNIT dependency For example mount where A should be mounted before local-fs.target unit: /dev/sdb1 /mnt/test/A none nofail,x-systemd.before=local-fs.target
2017-02-13resolved: name announce timer event sourceLennart Poettering
2017-02-13resolved: let's propagate errors from dns_scope_announce() and elsewhereLennart Poettering
We don't actually make use of the return value for now, but it matches our coding style elsewhere, and it actually shortens our code quite a bit. Also, add a missing OOM check after dns_answer_new().
2017-02-13resolved: count the number of addresses per linkLennart Poettering
This becomes handy later on. Moreover, we keep track of similar counters for other objects like this too, hence adding this here too is obvious.
2017-02-13resolved: don't return ANY transactions when looking for transactionsLennart Poettering
This reverts a part of 53fda2bb933694c9bdb1bbf1f5583e39673b74b2: On classic DNS and LLMNR ANY requests may be replied to with any kind of RR, and the reply does not have to be comprehensive: these protocols simply define that if there's an RRset that can answer the question, then at least one should be sent as reply, but not necessarily all. This means it's not safe to "merge" transactions for arbitrary RR types into ANY requests, as the reply might not answer the specific question. As the merging is primarily an optimization, let's undo this for now. This logic may be readded later, in a way that only applies to mDNS. Also, there's an OOM problem with this chunk: dns_resource_key_new() might fail due to OOM and this is not handled. (This is easily removed though, by using DNS_RESOURCE_KEY_CONST()).
2017-02-13Merge pull request #5331 from namhyung/coredump-reverseDjalal Harouni
Add -r/--reverse option to coredumpctl
2017-02-13Merge pull request #5319 from keszybz/test-executeLennart Poettering
test-execute without capsh
2017-02-13Merge pull request #5320 from jwrdegoede/cube-iwork8-airLennart Poettering
Extended evdev keyboard match rule + cube iwork8 air keymap fixup hwdb entry
2017-02-13coredumpctl: Add -r/--reverse optionNamhyung Kim
Like journalctl, users sometimes want to see coredump list in reverse order. Signed-off-by: Namhyung Kim <namhyung@gmail.com>
2017-02-13coredumpctl: Remove dubious newline in the help messageNamhyung Kim
It seems the -o opiton and -D option can be printed together. Signed-off-by: Namhyung Kim <namhyung@gmail.com>
2017-02-13Merge pull request #5322 from keszybz/silence-gcc-warningMartin Pitt
Silence gcc warnings
2017-02-12Merge pull request #4832 from rojkov/mdnsZbigniew Jędrzejewski-Szmek
2017-02-12seccomp: disable RestrictAddressFamilies= for the ABI we shall block, not ↵Lennart Poettering
the one we are compiled for (#5272) It's a difference. Not a big one, but let's be correct here.
2017-02-12man: busctl: improve capture description (#5321)Lucas Werkmeister
2017-02-12Merge pull request #5276 from poettering/resolved-cnameZbigniew Jędrzejewski-Szmek
a good number of resolved fixes
2017-02-12core/dbus: silence gcc warning about unitialized variableZbigniew Jędrzejewski-Szmek
src/core/dbus.c: In function 'find_unit': src/core/dbus.c:334:15: warning: 'u' may be used uninitialized in this function [-Wmaybe-uninitialized] *unit = u; ^ src/core/dbus.c:301:15: note: 'u' was declared here Unit *u; ^
2017-02-12core/manager: silence gcc warning about unitialized variableZbigniew Jędrzejewski-Szmek
At -O3, this was printed a hundred times for various callers of manager_add_job_by_name(). AFAICT, there is no error and `unit` is always intialized. Nevertheless, add explicit initialization to silence the noise. src/core/manager.c: In function 'manager_start_target': src/core/manager.c:1413:16: warning: 'unit' may be used uninitialized in this function [-Wmaybe-uninitialized] return manager_add_job(m, type, unit, mode, e, ret); ^ src/core/manager.c:1401:15: note: 'unit' was declared here Unit *unit; ^
2017-02-12core/manager: make manager_load_unit*() functions always take output argZbigniew Jędrzejewski-Szmek
We were inconsistent, manager_load_unit_prepare() would crash if _ret was ever NULL. But none of the callers use NULL. So simplify things and require it to be non-NULL.
2017-02-12hwdb: Cube iwork8 air button keymap fixupHans de Goede
The home and power buttons on the Cube iwork8 air tablet are swapped, add a hwdb entry fixing this up. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2017-02-12rules: Add extended evdev/input match rules for event nodes with the same nameHans de Goede
Sometimes a system may have 2 input event nodes with the same name where we only want to apply keyboard hwdb rules to 1 of the 2 devices. This problem happens e.g. on devices where the soc_button_array driver is used (e.g. intel atom based tablets) which registers 2 event nodes with the name "gpio-keys". This commit adds a new extended match rule which extends the match to also check $attr{phys} and $attr{capabilities/ev}, allowing to differentiate between devices with an identical name. Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2017-02-12core: skip ReadOnlyPaths= and other permission-related mounts on ↵Lennart Poettering
PermissionsStartOnly= (#5309) ReadOnlyPaths=, ProtectHome=, InaccessiblePaths= and ProtectSystem= are about restricting access and little more, hence they should be disabled if PermissionsStartOnly= is used or ExecStart= lines are prefixed with a "+". Do that. (Note that we will still create namespaces and stuff, since that's about a lot more than just permissions. We'll simply disable the effect of the four options mentioned above, but nothing else mount related.) This also adds a test for this, to ensure this works as intended. No documentation updates, as the documentation are already vague enough to support the new behaviour ("If true, the permission-related execution options…"). We could clarify this further, but I think we might want to extend the switches' behaviour a bit more in future, hence leave it at this for now. Fixes: #5308
2017-02-12calendarspec: fix duplicate detection (#5310)Doug Christman
a2eb5ea79c added a new field to `CalendarComponent`; update `normalize_chain` to compare all fields when dropping duplicates
2017-02-12shared: pass *unsigned_long to namespace_flag_from_string_many (#5315)Evgeny Vereshchagin
Fixes: ``` src/shared/bus-unit-util.c: In function ‘bus_append_unit_property_assignment’: src/shared/bus-unit-util.c:570:65: warning: passing argument 2 of ‘namespace_flag_from_string_many’ from incompatible pointer type [-Wincompatible-pointer-types] r = namespace_flag_from_string_many(eq, &flags); ^ In file included from src/shared/bus-unit-util.c:31:0: src/shared/nsflags.h:41:5: note: expected ‘long unsigned int *’ but argument is of type ‘uint64_t * {aka long long unsigned int *}’ int namespace_flag_from_string_many(const char *name, unsigned long *ret); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Closes #5312
2017-02-12shared: convert unsigned long to uint64_t explicitly (#5314)Evgeny Vereshchagin
Closes #5313
2017-02-12Merge pull request #5303 from poettering/deleted-unitsZbigniew Jędrzejewski-Szmek
a small number of install and unit management related fixes
2017-02-12It's now ok to use Google NTP servers (#5311)Michael Shields
2017-02-12man: systemd.journal-fields: document _SYSTEMD_INVOCATION_ID (#5316)Lucas Werkmeister
#4067 added documentation to systemd.exec(5), but not systemd.journal-fields(7).
2017-02-12test-execute: use __func__ to shorten messagesZbigniew Jędrzejewski-Szmek
2017-02-12README: document capsh's usefulnessZbigniew Jędrzejewski-Szmek
2017-02-12test-execute: detect missing capsh in all testsZbigniew Jędrzejewski-Szmek
Fixes #5273.
2017-02-10Merge pull request #5250 from ddstreet/test-sys-nodes-scriptZbigniew Jędrzejewski-Szmek
replace test/sys.tar.xz with script to create test/sys/ contents
2017-02-11networkd: add IPv6ProxyNDPAddress support (#5174)Florian Klink
IPv6 Neighbor discovery proxy is the IPv6 equivalent to proxy ARP for IPv4. It is required when ISPs do not unconditional route IPv6 subnets to their designated target, but expect neighbor solicitation messages for every address on a link. A variable IPv6ProxyNDPAddress= is introduced to the [Network] section, each representing a IPv6 neighbour proxy entry in the neighbour table.
2017-02-10basic/architecture: adjust Risc-V ifdef (#5304)Zbigniew Jędrzejewski-Szmek
https://lists.freedesktop.org/archives/systemd-devel/2017-February/038286.html Let's keep both the old and new for now, so systemd builds correctly in either environment. Later on we should drop the old.
2017-02-10seccomp: order seccomp ABI list, so that our native ABI comes last (#5306)Lennart Poettering
this way, we can still call seccomp ourselves, even if seccomp() is blocked by the filter we are installing. Fixes: #5300
2017-02-10test: remove sys.tar.xzDan Streetman
The tarball is no longer needed, as the sys-script.py script creates all the sys/ contents.
2017-02-10test: change Makefile.am to use sys-script.py instead of sys.tar.xzDan Streetman
2017-02-10test: create sys-script.py scriptDan Streetman
The script contains the contents of all sys/ test files, and creates all dirs/links/files when run. This replaces the sys.tar.xz tarball that contained sys/, so changes to sys files only require a simple commit in git, instead of checking in an entire new tarball for each sys/ change.
2017-02-10test: add script to convert sys/ into sys-script.pyDan Streetman
Instead of keeping all sys/ nodes in a tarball, use a script "sys-script.py" to create all the sys/ entries. This adds a script to create that initial "sys-script.py" script, using an existing sys/ directory, created from the sys.tar.xz contents. The "sys-script.py" can then be edited or recreated later, when any sys/ files are added or modified; the change will be only a patch to the "sys-script.py" script in git, instead of forcing git to store a new binary tarball.
2017-02-10path-lookup: if $HOME can be determined but $XDG_RUNTIME_DIR can't, is itLennart Poettering
So far, if either $HOME or $XDG_RUNTIME_DIR is not set we wouldn't use either, and fail acquire_config_dirs() and acquire_control_dirs() in their entireties. With this change, let's make use of the variables we can acquire, and don't bother with the other. Specifically this means: in both acquire_config_dirs() and acquire_control_dirs() handle ENXIO from user_config_dir() and user_runtime_dir() directly, instead of propagating it up and handling it in the caller.
2017-02-10path-lookup: drop redundant strv_isempty() checkLennart Poettering
If the strv is empty, then strv_extend_strv_concat() is a NOP anyway, and hence there is no reason to guard for this explicitly.