summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "test: make unit tests relocatable and add an "install-tests" make ↵revert-5298-relocatable-testsZbigniew Jędrzejewski-Szmek2017-02-1421-60/+21
| | | | target"
* Merge pull request #5298 from martinpitt/relocatable-testsZbigniew Jędrzejewski-Szmek2017-02-1321-21/+60
|\ | | | | test: make unit tests relocatable and add an "install-tests" make target
| * buildsys: add "install-tests" targetMartin Pitt2017-02-131-2/+20
| | | | | | | | | | | | | | | | | | 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
| * test: make unit tests relocatableMartin Pitt2017-02-1310-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * test: move resolved test data into test/Martin Pitt2017-02-1313-14/+13
| | | | | | | | | | | | 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.
* | fstab-generator: quiesce false-positive -Werror=format-nonliteral (#5336)Martin Pitt2017-02-131-0/+3
|/ | | | | | | | | | | 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.
* fstab-generator: add x-systemd.before and x-systemd.after fstab options (#5330)Ruslan Bilovol2017-02-132-3/+49
| | | | | | | | | | | | | | | | | | | | | | 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
* Merge pull request #5331 from namhyung/coredump-reverseDjalal Harouni2017-02-131-6/+21
|\ | | | | Add -r/--reverse option to coredumpctl
| * coredumpctl: Add -r/--reverse optionNamhyung Kim2017-02-131-5/+20
| | | | | | | | | | | | | | Like journalctl, users sometimes want to see coredump list in reverse order. Signed-off-by: Namhyung Kim <namhyung@gmail.com>
| * coredumpctl: Remove dubious newline in the help messageNamhyung Kim2017-02-131-1/+1
| | | | | | | | | | | | It seems the -o opiton and -D option can be printed together. Signed-off-by: Namhyung Kim <namhyung@gmail.com>
* | Merge pull request #5319 from keszybz/test-executeLennart Poettering2017-02-132-16/+34
|\ \ | | | | | | test-execute without capsh
| * | test-execute: use __func__ to shorten messagesZbigniew Jędrzejewski-Szmek2017-02-121-13/+13
| | |
| * | README: document capsh's usefulnessZbigniew Jędrzejewski-Szmek2017-02-121-0/+1
| | |
| * | test-execute: detect missing capsh in all testsZbigniew Jędrzejewski-Szmek2017-02-121-3/+20
| | | | | | | | | | | | Fixes #5273.
* | | Merge pull request #5320 from jwrdegoede/cube-iwork8-airLennart Poettering2017-02-132-0/+21
|\ \ \ | |_|/ |/| | Extended evdev keyboard match rule + cube iwork8 air keymap fixup hwdb entry
| * | hwdb: Cube iwork8 air button keymap fixupHans de Goede2017-02-121-0/+8
| | | | | | | | | | | | | | | | | | | | | 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>
| * | rules: Add extended evdev/input match rules for event nodes with the same nameHans de Goede2017-02-122-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge pull request #5322 from keszybz/silence-gcc-warningMartin Pitt2017-02-132-9/+10
|\ \ \ | | | | | | | | Silence gcc warnings
| * | | core/dbus: silence gcc warning about unitialized variableZbigniew Jędrzejewski-Szmek2017-02-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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; ^
| * | | core/manager: silence gcc warning about unitialized variableZbigniew Jędrzejewski-Szmek2017-02-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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; ^
| * | | core/manager: make manager_load_unit*() functions always take output argZbigniew Jędrzejewski-Szmek2017-02-121-4/+4
| |/ / | | | | | | | | | | | | 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.
* | | Merge pull request #4832 from rojkov/mdnsZbigniew Jędrzejewski-Szmek2017-02-1221-48/+387
|\ \ \
| * | | resolve: mention added mDNS support in NEWSDmitry Rozhkov2017-01-191-0/+5
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolve: Add support for mDNS to systemd-resolve utilityDmitry Rozhkov2017-01-192-2/+10
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: actually enable mDNS supportDmitry Rozhkov2017-01-191-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: implement sending goodbye mDNS packetDmitry Rozhkov2017-01-196-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | resolved: remove unneeded braces Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: add cache-flush bit to answers in mDNS announcementsDmitry Rozhkov2017-01-198-20/+24
| | | | | | | | | | | | | | | | | | | | | | | | See the section 10.2 of RFC6762 for details. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: implement mDNS probing and announcementDmitry Rozhkov2017-01-196-9/+118
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: process mDNS queriesDmitry Rozhkov2017-01-193-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This way other hosts can resolve our hostname to its address using mDNS. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: set multicast membership for mDNS socketsDmitry Rozhkov2017-01-191-2/+10
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: set description to correct event sourceDmitry Rozhkov2017-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we fail an assertion down the path since t->timeout_event_source is NULL and it's the "other" transaction that's supposed to have the event source. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: populate mDNS scopes' zones with RRs for the hostDmitry Rozhkov2017-01-195-0/+134
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: adhere to RFC when handling mDNS goodbye packetsDmitry Rozhkov2017-01-191-0/+6
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: ignore mDNS multicast packets originated from our hostDmitry Rozhkov2017-01-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default all sent multicast packets are looped back to the sending host. And since the code that adds the mDNS socket to the mDNS multicast group is the same as for LLMNR I decided that for now it'd be safer to filter looped back packets in the application than to switch loopback off. Because I don't know what would be the implications for LLMNR with loopback switched off. I suspect that loopback can be disabled for LLMNR safely too and the function manager_our_packet() is not really needed. But I'd prefer to do it in another patchset. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: fix typo in warning messageDmitry Rozhkov2017-01-191-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
| * | | resolved: install answers to mDNS transactions tooDmitry Rozhkov2017-01-191-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently resolving mDNS requests doesn't work because in dns_transaction_process_reply() no answer gets installed into mDNS transactions. When receiving a mDNS reply we should not check for query section equivalence of the request and its corresponsing response. But still we need to install answers to mDNS transactions to make it possible to actually resolve mDNS requests. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
* | | | seccomp: disable RestrictAddressFamilies= for the ABI we shall block, not ↵Lennart Poettering2017-02-121-3/+27
| | | | | | | | | | | | | | | | | | | | the one we are compiled for (#5272) It's a difference. Not a big one, but let's be correct here.
* | | | man: busctl: improve capture description (#5321)Lucas Werkmeister2017-02-121-4/+4
| | | |
* | | | Merge pull request #5276 from poettering/resolved-cnameZbigniew Jędrzejewski-Szmek2017-02-1223-120/+251
|\ \ \ \ | |_|/ / |/| | | a good number of resolved fixes
| * | | resolved: if strict DNSSEC mode is selected never downgrade below DNSSEC ↵Lennart Poettering2017-02-092-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | server feature level due to packet loss Fixes: #4315
| * | | resolved: also synthesize records for the full local hostnameLennart Poettering2017-02-092-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we'd only synthesize RRs for the LLMNR and mDNS versions of the hostnames (i.e. the first label of the kernel hostname, as well as the first label of the kernel hostname suffixed with .local). With this change, we also synthesize an RR for the full hostname, which is relevant in case it has more than one label. Fixes: #5041
| * | | nss-myhostname: don't fill scopeid for non-link-local addressesLennart Poettering2017-02-091-7/+4
| | | | | | | | | | | | | | | | Inspired by #4465, we shouldn't do this for nss-myhostname either.
| * | | resolved: when a server response with REFUSED, try a different oneLennart Poettering2017-02-091-1/+10
| | | | | | | | | | | | | | | | Fixes: #4264
| * | | nss-resolve: don't set scopeindex for non-link-local addressesLennart Poettering2017-02-091-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently some apps don't like that. And given that this isn't necessary for link-local addresses, let's suppress this information. Fixes: #4465
| * | | resolved: when following a CNAME initialize authenticated bit by the weakest ↵Lennart Poettering2017-02-094-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | answer When following a CNAME chain, don't set the authenticated bit, unless all lookups in the chain could be authenticated.
| * | | resolved: follow CNAMES for DNS stub repliesLennart Poettering2017-02-093-48/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clients expect us to follow CNAMEs for them, hence do so. On the first iteration start putting together a packet, and then keep adding data we acquire through CNAMEs to it, until we finally send it off. Fixes: #3826
| * | | tree-wide: make bus_map_all_properties return a proper sd_bus_errorLennart Poettering2017-02-0911-39/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And then show it, to make things a bit friendlier to the user if we fail acquiring some props. In fact, this fixes a number of actual bugs, where we used an error structure for output that we actually never got an error in.
| * | | core: fix minor memory leakLennart Poettering2017-02-091-1/+1
| | | |
* | | | core: skip ReadOnlyPaths= and other permission-related mounts on ↵Lennart Poettering2017-02-124-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | calendarspec: fix duplicate detection (#5310)Doug Christman2017-02-122-2/+2
| | | | | | | | | | | | | | | | a2eb5ea79c added a new field to `CalendarComponent`; update `normalize_chain` to compare all fields when dropping duplicates