]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 years agolibsystemd-network: avoid double free on error
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 00:50:17 +0000 (19:50 -0500)] 
libsystemd-network: avoid double free on error

This could happen if the remote sent us a badly formatted
option.

CID #1317206.

8 years agolibsystemd-network: use assert_se
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 00:45:58 +0000 (19:45 -0500)] 
libsystemd-network: use assert_se

It cannot fail.

CID #1320623.

8 years agonetworkd: use (void) to mark ignored values
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 00:25:45 +0000 (19:25 -0500)] 
networkd: use (void) to mark ignored values

Null link or netdev are handled fine.

CID #1338084.

8 years agotest-tmpfiles: actually test that the file is temporary
Zbigniew Jędrzejewski-Szmek [Wed, 20 Jan 2016 00:17:01 +0000 (19:17 -0500)] 
test-tmpfiles: actually test that the file is temporary

CID #1341451.

8 years agoMerge pull request #2373 from keszybz/man-api-build-3
Daniel Mack [Tue, 19 Jan 2016 19:44:58 +0000 (20:44 +0100)] 
Merge pull request #2373 from keszybz/man-api-build-3

Man page grammar and build tweaks v3

8 years agoman/sd_event_{add_io,add_time,add_signal,now}: various small fixes 2373/head
Zbigniew Jędrzejewski-Szmek [Tue, 5 Jan 2016 04:17:21 +0000 (23:17 -0500)] 
man/sd_event_{add_io,add_time,add_signal,now}: various small fixes

- remove things which are clear from the context
- 0 is a valid descriptor number, hence "positive" → "non-negative"
- "positive" means greater than zero, hence "positive non-zero" → "positive"
- use oxford comma
- reword some things for clarity

8 years agoMerge pull request #2369 from zonque/resolved
Lennart Poettering [Tue, 19 Jan 2016 14:11:10 +0000 (15:11 +0100)] 
Merge pull request #2369 from zonque/resolved

resolved: hide public mDNS configuration knobs for now

8 years agoMerge pull request #2357 from keszybz/warnings-2
Lennart Poettering [Tue, 19 Jan 2016 14:09:53 +0000 (15:09 +0100)] 
Merge pull request #2357 from keszybz/warnings-2

Remove gcc warnings v2

8 years agoresolved: remove configuration knobs for mDNS until it's ready 2369/head
Daniel Mack [Tue, 19 Jan 2016 13:05:01 +0000 (14:05 +0100)] 
resolved: remove configuration knobs for mDNS until it's ready

These bits were intenionally left out while mDNS is under development.

Remove the exposed knobs and man page entries again until this is settled.

8 years agoresolved: fix mDNS IPv6 multicast address
Daniel Mack [Tue, 19 Jan 2016 12:58:55 +0000 (13:58 +0100)] 
resolved: fix mDNS IPv6 multicast address

Fixes #2366

8 years agoMerge pull request #2358 from poettering/dnssec16
Tom Gundersen [Tue, 19 Jan 2016 00:44:20 +0000 (01:44 +0100)] 
Merge pull request #2358 from poettering/dnssec16

sixteenth DNSSEC patch set

8 years agoresolved: don't forget about lost OPT and RRSIG when downgrading a feature level 2358/head
Lennart Poettering [Mon, 18 Jan 2016 23:51:26 +0000 (00:51 +0100)] 
resolved: don't forget about lost OPT and RRSIG when downgrading a feature level

Certain Belkin routers appear to implement a broken DNS cache for A RRs and some others, but implement a pass-thru for
AAAA RRs. This has the effect that we quickly recognize the broken logic of the router when we do an A lookup, but for
AAAA everything works fine until we actually try to validate the request. Given that the validation will necessarily
fail ultimately let's make sure we remember even when downgrading a feature level that OPT or RRSIG was missing.

8 years agoupdate DNSSEC TODO
Lennart Poettering [Mon, 18 Jan 2016 21:45:18 +0000 (22:45 +0100)] 
update DNSSEC TODO

8 years agoresolved: don't try to print error strings, where errno isn't set
Lennart Poettering [Mon, 18 Jan 2016 22:29:04 +0000 (23:29 +0100)] 
resolved: don't try to print error strings, where errno isn't set

8 years agoresolved: when restarting a transaction pick a new ID
Lennart Poettering [Mon, 18 Jan 2016 22:27:16 +0000 (23:27 +0100)] 
resolved: when restarting a transaction pick a new ID

When we restart a transaction because of an incompatible server, pick a new transaction ID.

This should increase compatibility with DNS servers that don't like if they get different requests with the same
transaction ID.

8 years agoresolved: enforce maximum limit on DNS transactions
Lennart Poettering [Mon, 18 Jan 2016 22:15:35 +0000 (23:15 +0100)] 
resolved: enforce maximum limit on DNS transactions

given that DNSSEC lookups may result in quite a number of auxiliary transactions, let's better be safe than sorry and
also enforce a limit on the number of total transactions, not just on the number of queries.

8 years agoresolved: add DNAME test case to the complex DNSSEC test
Lennart Poettering [Mon, 18 Jan 2016 21:43:21 +0000 (22:43 +0100)] 
resolved: add DNAME test case to the complex DNSSEC test

8 years agoresolved: fix how we detect whether auxiliary DNSSEC transactions are ready
Lennart Poettering [Mon, 18 Jan 2016 21:36:58 +0000 (22:36 +0100)] 
resolved: fix how we detect whether auxiliary DNSSEC transactions are ready

Previously, when getting notified about a completed auxiliary DNSSEC transaction we'd immediately act on it, and
possibly abort the main transaction. This is problematic, as DNS transactions that already completed at the time we
started using them will never get the notification event, and hence never be acted on in the same way.

Hence, introduce a new call dns_transaction_dnssec_ready() that checks the state of auxiliary DNSSEC transactions, and
returns 1 when we are ready for the actual DNSSEC validation step. Then, make sure this is invoked when the auxiliary
transactions are first acquired (and thus possibly reused) as well when the notifications explained above take place.

This fixes problems particularly when doing combined A and AAAA lookups  where the auxiliary DNSSEC transactions get
reused between them, and where we got confused if we reused an auxiliary DNSSEC transaction from one when it already
got completed from the other.

8 years agoresolved: end log messages in a full stop
Lennart Poettering [Mon, 18 Jan 2016 21:34:41 +0000 (22:34 +0100)] 
resolved: end log messages in a full stop

8 years agoresolved: never consider following a CNAME/DNAME chain for a CNAME/DNAME lookup
Lennart Poettering [Mon, 18 Jan 2016 21:33:23 +0000 (22:33 +0100)] 
resolved: never consider following a CNAME/DNAME chain for a CNAME/DNAME lookup

Let's avoid thinking that a CNAME/DNAME chain traversal could be a good idea if QTYPE is already CNAME/DNAME.

(Also, let's bail out early when trying to see if some RR is a suitable CNAME/DNAME for some other RR).

8 years agoresolved: when following a CNAME, turn off search domains
Lennart Poettering [Mon, 18 Jan 2016 20:31:16 +0000 (21:31 +0100)] 
resolved: when following a CNAME, turn off search domains

If the first step was done via a search domain, make sure the subsequent steps are not.

8 years agoresolved: properly reset old collected data when following a CNAME redirect
Lennart Poettering [Mon, 18 Jan 2016 20:30:45 +0000 (21:30 +0100)] 
resolved: properly reset old collected data when following a CNAME redirect

8 years agoresolved: beef up complex dnssec test to also use ResolveAddress() and do IDNA checks
Lennart Poettering [Mon, 18 Jan 2016 20:02:00 +0000 (21:02 +0100)] 
resolved: beef up complex dnssec test to also use ResolveAddress() and do IDNA checks

8 years agoresolved: rework IDNA logic
Lennart Poettering [Mon, 18 Jan 2016 19:31:39 +0000 (20:31 +0100)] 
resolved: rework IDNA logic

Move IDNA logic out of the normal domain name processing, and into the bus frontend calls. Previously whenever
comparing two domain names we'd implicitly do IDNA conversion so that "pöttering.de" and "xn--pttering-n4a.de" would be
considered equal. This is problematic not only for DNSSEC, but actually also against he IDNA specs.

Moreover it creates problems when encoding DNS-SD services in classic DNS. There, the specification suggests using
UTF8 encoding for the actual service name, but apply IDNA encoding to the domain suffix.

With this change IDNA conversion is done only:

- When the user passes a non-ASCII hostname when resolving a host name using ResolveHostname()
- When the user passes a non-ASCII domain suffix when resolving a service using ResolveService()

No IDNA encoding is done anymore:

- When the user does raw ResolveRecord() RR resolving
- On the service part of a DNS-SD service name

Previously, IDNA encoding was done when serializing names into packets, at a point where information whether something
is a label that needs IDNA encoding or not was not available, but at a point whether it was known whether to generate a
classic DNS packet (where IDNA applies), or an mDNS/LLMNR packet (where IDNA does not apply, and UTF8 is used instead
for all host names). With this change each DnsQuery object will now maintain two copies of the DnsQuestion to ask: one
encoded in IDNA for use with classic DNS, and one encoded in UTF8 for use with LLMNR and MulticastDNS.

8 years agoresolved: minor optimization for dns_question_is_equal()
Lennart Poettering [Mon, 18 Jan 2016 19:22:45 +0000 (20:22 +0100)] 
resolved: minor optimization for dns_question_is_equal()

If the poinetrs are equal, we don't have to do a deep comparison.

This is similar to a similar optimization we already have in place for RRs and keys.

8 years agoresolved: be slightly stricter when validating DnsQuestion
Lennart Poettering [Mon, 18 Jan 2016 19:21:55 +0000 (20:21 +0100)] 
resolved: be slightly stricter when validating DnsQuestion

Also verify whether the DNS RR types are actually suitable for a question.

8 years agoresolved: make key argument of dns_question_contains() const
Lennart Poettering [Mon, 18 Jan 2016 19:21:30 +0000 (20:21 +0100)] 
resolved: make key argument of dns_question_contains() const

8 years agoresolved add dns_name_apply_idna() to convert a domain name into its IDNA equivalent
Lennart Poettering [Mon, 18 Jan 2016 19:18:28 +0000 (20:18 +0100)] 
resolved add dns_name_apply_idna() to convert a domain name into its IDNA equivalent

8 years agoMerge pull request #2326 from poettering/dnssec15
Tom Gundersen [Mon, 18 Jan 2016 22:10:53 +0000 (23:10 +0100)] 
Merge pull request #2326 from poettering/dnssec15

Fifteenth batch of DNSSEC patches

8 years agobuild-sys: allow building man pages even if disabled in ./configure
Zbigniew Jędrzejewski-Szmek [Sat, 26 Dec 2015 02:20:47 +0000 (21:20 -0500)] 
build-sys: allow building man pages even if disabled in ./configure

This is purely for developer convenience: building man pages is slow
so people tend to disable them when not working on documentation. But
sometimes it is useful to build the man page to look something up,
especially when working on an older machine which has outdated
documentation, or to test some change to documentation. The rules to build
man pages are now outside of the ENABLE_MANPAGES conditional, but they
are not used unless manually invoked, and only the inclusion of man
pages in build and install targets is affected by the conditional.

Also, more generated files are removed in clean, which seems to be
good thing, and Makefile.am is simplified.

8 years agojournal-remote: update to 64bit µhttp api, provide fallback 2357/head
Zbigniew Jędrzejewski-Szmek [Fri, 15 Jan 2016 19:58:50 +0000 (14:58 -0500)] 
journal-remote: update to 64bit µhttp api, provide fallback

64 bit offset is now accepted, which is nice. The old function is
deprecated, and generates a compile time warning when used. We only
use an offset of 0, so we really don't care. Adapt to use the new
function, but fall back to the old one on older versions.

8 years agojournal-remote: fix warning about deprecated µhttpd macro
Zbigniew Jędrzejewski-Szmek [Fri, 15 Jan 2016 19:13:12 +0000 (14:13 -0500)] 
journal-remote: fix warning about deprecated µhttpd macro

src/journal-remote/journal-remote.c:590:13: warning: Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE
                 return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
             ^

The new define was added in 0.9.38. Instead of requiring the new
libmicrohttpd version, provide the fallback, it is trivial.

8 years agoresolve: fix return value from dns_packet_append_rr()
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 20:08:48 +0000 (15:08 -0500)] 
resolve: fix return value from dns_packet_append_rr()

8 years agoudevd: initialize fds to -1 and close them before exiting
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 02:02:56 +0000 (21:02 -0500)] 
udevd: initialize fds to -1 and close them before exiting

Little change in practice, because the program will exit soon
afterwards, but the standard style of closing all fds is now followed.
Also gets rid of gcc warning about fd_ctrl and fd_uevent being
unitialized.

8 years agojournald: do not free uninitialized pointer in error path
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 22:42:52 +0000 (17:42 -0500)] 
journald: do not free uninitialized pointer in error path

8 years agologind: simplify job variable handling
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 03:02:18 +0000 (22:02 -0500)] 
logind: simplify job variable handling

manager_{start,stop}_{slice,scope,unit} functions had an optional job
output parameter. But all callers specified job, so make the parameter
mandatory, add asserts. Also extract common job variable handling to
a helper function to avoid duplication.

Avoids gcc warning about job being unitialized.

8 years agologind: do not use an uninitialized variable
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 22:27:33 +0000 (17:27 -0500)] 
logind: do not use an uninitialized variable

We requested various fields using SD_BUS_CREDS_AUGMENT but at least
sd_bus_creds_get_tty can fail with ENXIO, not setting the output variable.

8 years agosd-event: fix theoretical leak on error in event_make_signal_data
Zbigniew Jędrzejewski-Szmek [Fri, 25 Dec 2015 21:59:44 +0000 (16:59 -0500)] 
sd-event: fix theoretical leak on error in event_make_signal_data

8 years agosd-ndisc: simplify if stmt and reindent log messages
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 01:22:30 +0000 (20:22 -0500)] 
sd-ndisc: simplify if stmt and reindent log messages

Merge separate two error handling statements into two nested ifs.
This looks cleaner, and avoids a gcc warning about *prefix being
uninitialized.

While at it, fix identation of logging statements elsewhere in the
file.

8 years agosd-ndisc: simplify ndisc_prefix_new
Zbigniew Jędrzejewski-Szmek [Mon, 11 Jan 2016 22:26:57 +0000 (17:26 -0500)] 
sd-ndisc: simplify ndisc_prefix_new

If the initial allocation succeeded, there is no way to
fail, so cleanup function is not necessary.

8 years agosd-device: initialize variables to avoid warning
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 22:42:06 +0000 (17:42 -0500)] 
sd-device: initialize variables to avoid warning

The code is correct, assuming that the kernel does not feed
us garbled data. Let's initialize those variables to avoid the
warning anyway.

8 years agobus-kernel: reword assignment of dst_id in bus_message_setup_kmsg
Zbigniew Jędrzejewski-Szmek [Mon, 11 Jan 2016 17:42:42 +0000 (12:42 -0500)] 
bus-kernel: reword assignment of dst_id in bus_message_setup_kmsg

Setting of dst_id was based on interplay of two booleans,
making the logic hard to follow (for humans and compilers alike).
gcc was confused and emmitted a warning about an uninitialized
variable. Rework the code to make it obvious that dst_id is
set properly.

8 years agosd-netlink: remove unused table
Zbigniew Jędrzejewski-Szmek [Mon, 11 Jan 2016 17:16:02 +0000 (12:16 -0500)] 
sd-netlink: remove unused table

8 years agobasic: add missing word in comment
Zbigniew Jędrzejewski-Szmek [Fri, 25 Dec 2015 21:29:09 +0000 (16:29 -0500)] 
basic: add missing word in comment

8 years agobasic/escape: merge utf8 and non-utf8 paths in cunescape_one
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 20:36:57 +0000 (15:36 -0500)] 
basic/escape: merge utf8 and non-utf8 paths in cunescape_one

Not every byte sequence is valid utf8. We allow escaping of non-utf8
sequences in strings by using octal and hexadecimal escape sequences
(\123 and \0xAB) for bytes at or above 128. Users of cunescape_one
could infer whether such use occured when they received an answer
between 128 and 256 in *ret (a non-ascii one byte character). But this
is subtle and misleading: the comments were wrong, because ascii is a
subset of unicode, so c != 0 did not mean non-unicode, but rather
ascii-subset-of-unicode-or-raw-byte. This was all rather confusing, so
make the "single byte" condition explicit.

I'm not convinced that allowing non-utf8 sequences to be produced is
useful in all cases where we allow it (e.g. in config files), but that
behaviour is unchanged, just made more explicit.

This also fixes an (invalid) gcc warning about unitialized variable
(*ret_unicode) in callers of cunescape_one.

8 years agocore/dbus-execute: do not needlessly compare strings again
Zbigniew Jędrzejewski-Szmek [Mon, 11 Jan 2016 19:37:30 +0000 (14:37 -0500)] 
core/dbus-execute: do not needlessly compare strings again

gcc complains that dirs might be unitialized. It cannot, but
we just checked that name has one of three values above, so
no need to check again.

8 years agotest-bus-error: add tests for setting error == 0
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 03:44:44 +0000 (22:44 -0500)] 
test-bus-error: add tests for setting error == 0

8 years agosd-event: check clock argument to sd_event_now()
Zbigniew Jędrzejewski-Szmek [Mon, 11 Jan 2016 22:19:25 +0000 (17:19 -0500)] 
sd-event: check clock argument to sd_event_now()

sd_event_now() is a public function, so we must check all
arguments for validity. Update man page and add tests.

Sample debug message:
Assertion 'IN_SET(clock, CLOCK_REALTIME, CLOCK_REALTIME_ALARM, CLOCK_MONOTONIC, CLOCK_BOOTTIME, CLOCK_BOOTTIME_ALARM)' failed at src/libsystemd/sd-event/sd-event.c:2719, function sd_event_now(). Ignoring.

8 years agobus-error: verify additional error maps during installation
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jan 2016 19:23:54 +0000 (14:23 -0500)] 
bus-error: verify additional error maps during installation

Go over the entries in the map and check that they make sense.
Tests are added. In the future we might want to do additional
checks, e.g. verifying that the error names are in the expected
format.

8 years agobasic,bus-error: return negative error from errno_from_name
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 22:19:51 +0000 (17:19 -0500)] 
basic,bus-error: return negative error from errno_from_name

errno_from_name used an unusual return convention where 0 meant
"not found". This tripped up config_parse_syscall_errno(),
which would treat that as success. Return -EINVAL instead,
and adjust bus_error_name_to_errno() for the new convention.

Also remove a goto which was used as a simple if and clean
up surroudning code a bit.

8 years agoUse negative_errno() to assert errno is positive after a few system calls
Zbigniew Jędrzejewski-Szmek [Tue, 12 Jan 2016 22:25:23 +0000 (17:25 -0500)] 
Use negative_errno() to assert errno is positive after a few system calls

This is not particularly intrusive because it happens in simple
utility functions. It helps gcc understand that error codes
are negative.

This gets a rid of most of the remaining warnings.

8 years agoMerge pull request #2352 from martinpitt/master
Daniel Mack [Mon, 18 Jan 2016 10:49:32 +0000 (11:49 +0100)] 
Merge pull request #2352 from martinpitt/master

keymap: Add HP ProBook 440 G3

8 years agokeymap: Add HP ProBook 440 G3 2352/head
Martin Pitt [Mon, 18 Jan 2016 10:01:32 +0000 (11:01 +0100)] 
keymap: Add HP ProBook 440 G3

Fixes #2343

8 years agoMerge pull request #2347 from aroig/gh/fix-udev-user-wants
Daniel Mack [Mon, 18 Jan 2016 09:53:49 +0000 (10:53 +0100)] 
Merge pull request #2347 from aroig/gh/fix-udev-user-wants

Fix broken SYSTEMD_USER_WANTS in udev rules.

8 years agoMerge pull request #2350 from evverx/fix-memory-leak-on-failed-preset-all
Daniel Mack [Mon, 18 Jan 2016 09:52:15 +0000 (10:52 +0100)] 
Merge pull request #2350 from evverx/fix-memory-leak-on-failed-preset-all

core: fix memory leak on failed preset-all

8 years agoMerge pull request #2349 from evverx/test-functions-cleanup
Daniel Mack [Mon, 18 Jan 2016 09:51:19 +0000 (10:51 +0100)] 
Merge pull request #2349 from evverx/test-functions-cleanup

tests: various fixes

8 years agotests: add STRIP_BINARIES 2349/head
Evgeny Vereshchagin [Mon, 18 Jan 2016 06:45:20 +0000 (06:45 +0000)] 
tests: add STRIP_BINARIES

We need a beautiful stacktraces sometimes
For example https://github.com/systemd/systemd/pull/2328

8 years agocore: fix memory leak on failed preset-all 2350/head
Evgeny Vereshchagin [Mon, 18 Jan 2016 06:10:33 +0000 (06:10 +0000)] 
core: fix memory leak on failed preset-all

How to reproduce
$ systemctl set-default multi-user # https://github.com/systemd/systemd/issues/2298
$ systemctl preset-all
Failed to execute operation: Too many levels of symbolic links

$ systemctl poweroff

Fixes:
==1==
==1== HEAP SUMMARY:
==1==     in use at exit: 65,645 bytes in 7 blocks
==1==   total heap usage: 40,539 allocs, 40,532 frees, 30,147,547 bytes allocated
==1==
==1== 109 (24 direct, 85 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 7
==1==    at 0x4C2BBCF: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1==    by 0x4C2DE2F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1==    by 0x23DA71: unit_file_changes_add (install.c:233)
==1==    by 0x23E45D: remove_marked_symlinks_fd (install.c:453)
==1==    by 0x23E267: remove_marked_symlinks_fd (install.c:405)
==1==    by 0x23E641: remove_marked_symlinks (install.c:494)
==1==    by 0x243A91: execute_preset (install.c:2190)
==1==    by 0x244343: unit_file_preset_all (install.c:2351)
==1==    by 0x18AAA2: method_preset_all_unit_files (dbus-manager.c:1846)
==1==    by 0x1D8157: method_callbacks_run (bus-objects.c:420)
==1==    by 0x1DA9E9: object_find_and_run (bus-objects.c:1257)
==1==    by 0x1DB02B: bus_process_object (bus-objects.c:1373)
==1==
==1== LEAK SUMMARY:
==1==    definitely lost: 24 bytes in 1 blocks
==1==    indirectly lost: 85 bytes in 1 blocks
==1==      possibly lost: 0 bytes in 0 blocks
==1==    still reachable: 65,536 bytes in 5 blocks
==1==         suppressed: 0 bytes in 0 blocks
==1== Reachable blocks (those to which a pointer was found) are not shown.
==1== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==1==
==1== For counts of detected and suppressed errors, rerun with: -v
==1== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

8 years agotests: fix TEST-03-JOBS
Evgeny Vereshchagin [Sun, 17 Jan 2016 03:21:52 +0000 (03:21 +0000)] 
tests: fix TEST-03-JOBS

We have

JOB UNIT                     TYPE  STATE
  1 testsuite.target         start waiting
 81 end.service              start waiting
187 sleep.service            start waiting
136 hello.service            start waiting
 82 testsuite.service        start running
135 hello-after-sleep.target start waiting

sometimes

8 years agotests: remove unnecessary setup_nspawn_root
Evgeny Vereshchagin [Sun, 17 Jan 2016 03:33:20 +0000 (03:33 +0000)] 
tests: remove unnecessary setup_nspawn_root

we don't run nspawn in TEST-02-CRYPTSETUP

8 years agotests: fix TEST-02-CRYPTSETUP on Debian/Ubuntu
Evgeny Vereshchagin [Sun, 17 Jan 2016 03:32:37 +0000 (03:32 +0000)] 
tests: fix TEST-02-CRYPTSETUP on Debian/Ubuntu

8 years agotests: install fsck*
Evgeny Vereshchagin [Sat, 16 Jan 2016 08:06:59 +0000 (08:06 +0000)] 
tests: install fsck*

systemd-fsck depends on /sbin/fsck*

8 years agotests: remove unnecessary --boot
Evgeny Vereshchagin [Fri, 15 Jan 2016 23:58:45 +0000 (23:58 +0000)] 
tests: remove unnecessary --boot

* Use $ROOTLIBDIR/systemd always
* Don't pass $ROOTLIBDIR/systemd as the first argument:

$ cat /proc/1/cmdline
/lib/systemd/systemd/lib/systemd/systemd...

8 years agoresolved: fix logging about DNAME redirection 2326/head
Lennart Poettering [Sun, 17 Jan 2016 20:53:16 +0000 (21:53 +0100)] 
resolved: fix logging about DNAME redirection

8 years agoresolved: when we find a DNAME RR, don't insist in a signed CNAME RR
Lennart Poettering [Sun, 17 Jan 2016 20:50:10 +0000 (21:50 +0100)] 
resolved: when we find a DNAME RR, don't insist in a signed CNAME RR

If we have a signed DNAME RR response, there's no need to insist on a signature for a CNAME RR response, after all it
is unlikely to be signed, given the implicit synthethis of CNAME through DNAME RRs.

8 years agoFix broken SYSTEMD_USER_WANTS in udev rules. 2347/head
Abdo Roig-Maranges [Sun, 17 Jan 2016 20:28:06 +0000 (21:28 +0100)] 
Fix broken SYSTEMD_USER_WANTS in udev rules.

The functionality of SYSTEMD_USER_WANTS that attaches dependencies to device
units from udev rules was broken since commit b2c23da8. I guess it was due to
a mass replace s/SYSTEMD_USER/MANAGER_USER/.

8 years agounits: don't fail if /root doesn't exist for shell units
Lennart Poettering [Sun, 17 Jan 2016 16:25:42 +0000 (17:25 +0100)] 
units: don't fail if /root doesn't exist for shell units

As discussed on the ML:

http://lists.freedesktop.org/archives/systemd-devel/2016-January/035594.html

8 years agoresolved: update DNSSEC TODO
Lennart Poettering [Fri, 15 Jan 2016 20:40:20 +0000 (21:40 +0100)] 
resolved: update DNSSEC TODO

8 years agoresolved: try to reduce number or DnsResourceKeys we keep around by merging them
Lennart Poettering [Fri, 15 Jan 2016 20:38:27 +0000 (21:38 +0100)] 
resolved: try to reduce number or DnsResourceKeys we keep around by merging them

Quite often we read the same RR key multiple times from the same message. Try to replace them by a single object when
we notice this. Do so again when we add things to the cache.

This should reduce memory consumption a tiny bit.

8 years agoresolved: when switching between DNSSEC modes, possibly flush caches
Lennart Poettering [Fri, 15 Jan 2016 20:07:21 +0000 (21:07 +0100)] 
resolved: when switching between DNSSEC modes, possibly flush caches

If the networkd configuration changes during runtime, make sure to flush all caches when we switch from a less trusted
to a more trusted mode.

8 years agoresolved: when the server feature level changes between query and response restart...
Lennart Poettering [Fri, 15 Jan 2016 19:45:17 +0000 (20:45 +0100)] 
resolved: when the server feature level changes between query and response restart transaction

In some cases we learn something about a server's feature level through its responses. If we notice that after doing
basic checking of a response, and after collecting all auxiliary DNSSEC info the feature level of the server is lower
than where we started, restart the whole transaction.

This is useful to deal with servers that response rubbish when talked to with too high feature levels.

8 years agoresolved: check OPT RR before accepting a reply for verification of server feature...
Lennart Poettering [Fri, 15 Jan 2016 19:36:40 +0000 (20:36 +0100)] 
resolved: check OPT RR before accepting a reply for verification of server feature level

Let's make sure we first check if the OPT was lost in the reply, before we accept a reply as successful and use it for
verifying the current feature level.

8 years agoresolved: when restarting a DNS transaction, remove all auxiliary DNSSEC transactions
Lennart Poettering [Fri, 15 Jan 2016 19:34:09 +0000 (20:34 +0100)] 
resolved: when restarting a DNS transaction, remove all auxiliary DNSSEC transactions

When we restart a DNS transaction, remove all connections to any auxiliary DNSSEC transactions, after all we might
acquire completely different data this time, requiring different auxiliary DNSSEC transactions.

8 years agoresolved: when we receive an reply which is OPT-less or RRSIG-less, downgrade what...
Lennart Poettering [Fri, 15 Jan 2016 19:29:56 +0000 (20:29 +0100)] 
resolved: when we receive an reply which is OPT-less or RRSIG-less, downgrade what we verified

If we receive a reply that lacks the OPT RR, then this is reason to downgrade what was verified before, as it's
apparently no longer true, and the previous OPT RR we saw was only superficially OK.

Similar, if we realize that RRSIGs are not augmented, then also downgrade the feature level that was verified, as
DNSSEC is after all not supported. This check is in particular necessary, as we might notice the fact that RRSIG is not
augmented only very late, when verifying the root domain.

Also, when verifying a successful response, actually take in consideration that it might have been reported already
that RRSIG or OPT are missing in the response.

8 years agoresolved: downgrade server feature level more aggressively when we have reason to
Lennart Poettering [Fri, 15 Jan 2016 18:23:51 +0000 (19:23 +0100)] 
resolved: downgrade server feature level more aggressively when we have reason to

This adds logic to downgrade the feature level more aggressively when we have reason to. Specifically:

- When we get a response packet that lacks an OPT RR for a query that had it. If so, downgrade immediately to UDP mode,
  i.e. don't generate EDNS0 packets anymore.

- When we get a response which we are sure should be signed, but lacks RRSIG RRs, we downgrade to EDNS0 mode, i.e.
  below DO mode, since DO is apparently not really supported.

This should increase compatibility with servers that generate non-sensical responses if they messages with OPT RRs and
suchlike, for example the situation described here:

https://open.nlnetlabs.nl/pipermail/dnssec-trigger/2014-November/000376.html

This also changes the downgrade code to explain in a debug log message why a specific downgrade happened.

8 years agoresolved: ignore invalid OPT RRs in incoming packets
Lennart Poettering [Fri, 15 Jan 2016 17:18:54 +0000 (18:18 +0100)] 
resolved: ignore invalid OPT RRs in incoming packets

This validates OPT RRs more rigorously, before honouring them: if we any of the following condition holds, we'll ignore
them:

a) Multiple OPT RRs in the same message
b) OPT RR not owned by the root domain
c) OPT RR in the wrong section (Belkin routers do this)
d) OPT RR contain rfc6975 algorithm data (Belkin routers do this)
e) OPT version is not 0
f) OPT payload doesn't add up with the lengths

Note that d) may be an indication that the server just blindly copied OPT data from the response into the reply.
RFC6975 data is only supposed to be included in queries, and we do so. It's not supposed to be included in responses
(and the RFC is very clear on that). Hence if we get it back in a reply, then the server probably just copied the OPT
RR.

8 years agoresolved: update RFCs list and TODO list
Lennart Poettering [Fri, 15 Jan 2016 01:48:56 +0000 (02:48 +0100)] 
resolved: update RFCs list and TODO list

8 years agoresolved: add complex test case
Lennart Poettering [Fri, 15 Jan 2016 01:24:39 +0000 (02:24 +0100)] 
resolved: add complex test case

This new test case tries to resolve a couple of known domains, to verify the validation results. It talks to resolved
via the bus, thus comprehensively testing the whole shebang.

Of course, it requires network connectivity and a DNSSEC capable DNS server, hence this is a manual test.

8 years agoresolved: complete NSEC non-existance proofs
Lennart Poettering [Fri, 15 Jan 2016 01:21:22 +0000 (02:21 +0100)] 
resolved: complete NSEC non-existance proofs

This fills in the last few gaps:

- When checking if a domain is non-existing, also check that no wildcard for it exists
- Ensure we don't base "covering" tests on NSEC RRs from a parent zone
- Refuse to accept expanded wildcard NSEC RRs for absence proofs.

8 years agoresolved: make sure the NSEC proof-of-non-existance check also looks for wildcard...
Lennart Poettering [Thu, 14 Jan 2016 20:05:57 +0000 (21:05 +0100)] 
resolved: make sure the NSEC proof-of-non-existance check also looks for wildcard domains

8 years agoresolved: on negative NODATA replies, properly deal with empty non-terminals
Lennart Poettering [Thu, 14 Jan 2016 19:12:29 +0000 (20:12 +0100)] 
resolved: on negative NODATA replies, properly deal with empty non-terminals

empty non-terminals generally lack NSEC RRs, which means we can deduce their existance only from the fact that there
are other RRs that contain them in their suffix. Specifically, the NSEC proof for NODATA on ENTs works by sending the
NSEC whose next name is a suffix of the queried name to the client. Use this information properly.

8 years agoresolved: rename dnssec_verify_dnskey() → dnssec_verify_dnskey_by_ds()
Lennart Poettering [Thu, 14 Jan 2016 19:11:11 +0000 (20:11 +0100)] 
resolved: rename dnssec_verify_dnskey() → dnssec_verify_dnskey_by_ds()

This should clarify that this is not regular signature-based validation, but validation through DS RR fingerprints.

8 years agoresolved: be stricter when using NSEC3
Lennart Poettering [Thu, 14 Jan 2016 17:14:43 +0000 (18:14 +0100)] 
resolved: be stricter when using NSEC3

We can user signer and synthesizing source information to check that the NSEC3 RRs we want to use are
actually reasonable and properly signed.

8 years agoresolved: when validating an RRset, store information about the synthesizing source...
Lennart Poettering [Thu, 14 Jan 2016 17:03:03 +0000 (18:03 +0100)] 
resolved: when validating an RRset, store information about the synthesizing source and zone in each RR

Having this information available is useful when we need to check whether various RRs are suitable for proofs. This
information is stored in the RRs as number of labels to skip from the beginning of the owner name to reach the
synthesizing source/signer. Simple accessor calls are then added to retrieve the signer/source from the RR using this
information.

This also moves validation of a a number of RRSIG parameters into a new call dnssec_rrsig_prepare() that as side-effect
initializes the two numeric values.

8 years agoresolved: do not use NSEC RRs from the wrong zone for proofs
Lennart Poettering [Thu, 14 Jan 2016 16:28:58 +0000 (17:28 +0100)] 
resolved: do not use NSEC RRs from the wrong zone for proofs

When proving NODATA DS lookups we need to insist on looking at the parent zone's NSEC RR, not the child zone's.

When proving any other NODATA lookups we need to insist on looking at the child zone's NSEC RR, not the parent's.

8 years agoresolved: ignore DS RRs without generating an error if they use an unsupported digest...
Lennart Poettering [Thu, 14 Jan 2016 16:27:28 +0000 (17:27 +0100)] 
resolved: ignore DS RRs without generating an error if they use an unsupported digest algorithm

8 years agoresolved: some RR types may appear only or not at all in a zone apex
Lennart Poettering [Thu, 14 Jan 2016 16:25:06 +0000 (17:25 +0100)] 
resolved: some RR types may appear only or not at all in a zone apex

Add extra checks when validating with RRSIGs. This follows recommendations from:

http://www.george-barwood.pwp.blueyonder.co.uk/DnsServer/NotesOnDNSSSEC.htm

8 years agoUpdate TODO
Lennart Poettering [Thu, 14 Jan 2016 17:08:29 +0000 (18:08 +0100)] 
Update TODO

8 years agoMerge pull request #2340 from evverx/fix-memory-leak-on-enable-disable-etc
Daniel Mack [Sun, 17 Jan 2016 12:47:18 +0000 (13:47 +0100)] 
Merge pull request #2340 from evverx/fix-memory-leak-on-enable-disable-etc

core: fix memory leak on set-default, enable, disable etc

8 years agocore: fix memory leak on set-default, enable, disable etc 2340/head
Evgeny Vereshchagin [Sun, 17 Jan 2016 09:36:03 +0000 (09:36 +0000)] 
core: fix memory leak on set-default, enable, disable etc

Fixes:
==1==    by 0x23E44C: remove_marked_symlinks_fd (install.c:453)
==1==    by 0x23E256: remove_marked_symlinks_fd (install.c:405)
==1==    by 0x23E630: remove_marked_symlinks (install.c:494)
==1==    by 0x2427A0: unit_file_disable (install.c:1876)
==1==    by 0x18A633: method_disable_unit_files_generic (dbus-manager.c:1760)
==1==    by 0x18A6CA: method_disable_unit_files (dbus-manager.c:1768)
==1==    by 0x1D8146: method_callbacks_run (bus-objects.c:420)
==1==    by 0x1DA9D8: object_find_and_run (bus-objects.c:1257)
==1==    by 0x1DB01A: bus_process_object (bus-objects.c:1373)
==1==
==1== 228 (48 direct, 180 indirect) bytes in 2 blocks are definitely lost in loss record 8 of 14
==1==    at 0x4C2BBCF: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1==    by 0x4C2DE2F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1==    by 0x23DA60: unit_file_changes_add (install.c:233)
==1==    by 0x23DDB2: create_symlink (install.c:298)
==1==    by 0x240C5C: install_info_symlink_wants (install.c:1328)
==1==    by 0x240FC8: install_info_apply (install.c:1384)
==1==    by 0x241211: install_context_apply (install.c:1439)
==1==    by 0x242563: unit_file_enable (install.c:1830)
==1==    by 0x18A06E: method_enable_unit_files_generic (dbus-manager.c:1650)
==1==    by 0x18A141: method_enable_unit_files (dbus-manager.c:1660)
==1==    by 0x1D8146: method_callbacks_run (bus-objects.c:420)
==1==    by 0x1DA9D8: object_find_and_run (bus-objects.c:1257)
==1==
==1== 467 (144 direct, 323 indirect) bytes in 3 blocks are definitely lost in loss record 9 of 14
==1==    at 0x4C2DD9F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1==    by 0x23DA60: unit_file_changes_add (install.c:233)
==1==    by 0x23DE97: create_symlink (install.c:320)
==1==    by 0x242CFC: unit_file_set_default (install.c:1951)
==1==    by 0x18A881: method_set_default_target (dbus-manager.c:1802)
==1==    by 0x1D8146: method_callbacks_run (bus-objects.c:420)
==1==    by 0x1DA9D8: object_find_and_run (bus-objects.c:1257)
==1==    by 0x1DB01A: bus_process_object (bus-objects.c:1373)
==1==    by 0x259143: process_message (sd-bus.c:2567)
==1==    by 0x259326: process_running (sd-bus.c:2609)
==1==    by 0x259BDC: bus_process_internal (sd-bus.c:2798)
==1==    by 0x259CAD: sd_bus_process (sd-bus.c:2817)
==1==
==1== LEAK SUMMARY:
==1==    definitely lost: 216 bytes in 6 blocks
==1==    indirectly lost: 560 bytes in 14 blocks
==1==      possibly lost: 0 bytes in 0 blocks
==1==    still reachable: 65,536 bytes in 5 blocks
==1==         suppressed: 0 bytes in 0 blocks
==1== Reachable blocks (those to which a pointer was found) are not shown.
==1== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==1==

8 years agoMerge pull request #2334 from jwilk/spelling
Daniel Mack [Fri, 15 Jan 2016 12:11:16 +0000 (13:11 +0100)] 
Merge pull request #2334 from jwilk/spelling

man: fix typos

8 years agoman: fix typos 2334/head
Jakub Wilk [Fri, 15 Jan 2016 11:46:08 +0000 (12:46 +0100)] 
man: fix typos

8 years agoMerge pull request #2328 from evverx/fix-transient-units-memeory-leak
Daniel Mack [Fri, 15 Jan 2016 08:03:34 +0000 (09:03 +0100)] 
Merge pull request #2328 from evverx/fix-transient-units-memeory-leak

Fix transient units memory leak

8 years agotests: add function for valgrind wrapper creation 2328/head
Evgeny Vereshchagin [Fri, 15 Jan 2016 02:52:12 +0000 (02:52 +0000)] 
tests: add function for valgrind wrapper creation

I used it for d9814c7 and bffd87b

8 years agocore: fix memory leak in transient units
Evgeny Vereshchagin [Fri, 15 Jan 2016 02:41:27 +0000 (02:41 +0000)] 
core: fix memory leak in transient units

Fixes:
==1== HEAP SUMMARY:
==1==     in use at exit: 67,182 bytes in 91 blocks
==1==   total heap usage: 70,485 allocs, 70,394 frees, 42,184,635 bytes
allocated
==1==
==1== 5,742 (696 direct, 5,046 indirect) bytes in 29 blocks are
definitely lost in loss record 4 of 7
==1==    at 0x4C2DD9F: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1==    by 0x21ADDD: realloc_multiply (alloc-util.h:67)
==1==    by 0x21BFB0: strv_push (strv.c:448)
==1==    by 0x21C245: strv_consume (strv.c:520)
==1==    by 0x21C33C: strv_extend (strv.c:559)
==1==    by 0x278AD7: unit_write_drop_in (unit.c:3352)
==1==    by 0x278EEB: unit_write_drop_in_private (unit.c:3403)
==1==    by 0x190C21: bus_service_set_transient_property
(dbus-service.c:254)
==1==    by 0x190DBC: bus_service_set_property (dbus-service.c:284)
==1==    by 0x18F00E: bus_unit_set_properties (dbus-unit.c:1226)
==1==    by 0x186F6A: transient_unit_from_message (dbus-manager.c:683)
==1==    by 0x1872B7: method_start_transient_unit (dbus-manager.c:763)
==1==
==1== LEAK SUMMARY:
==1==    definitely lost: 696 bytes in 29 blocks
==1==    indirectly lost: 5,046 bytes in 58 blocks
==1==      possibly lost: 0 bytes in 0 blocks
==1==    still reachable: 61,440 bytes in 4 blocks
==1==         suppressed: 0 bytes in 0 blocks

8 years agoMerge pull request #2322 from fbuihuu/downgrade-warn-for-not-found-unit
Zbigniew Jędrzejewski-Szmek [Thu, 14 Jan 2016 17:33:19 +0000 (12:33 -0500)] 
Merge pull request #2322 from fbuihuu/downgrade-warn-for-not-found-unit

transaction: downgrade warnings about wanted units which are not found

8 years agoMerge pull request #2316 from poettering/dnssec14
Tom Gundersen [Thu, 14 Jan 2016 16:02:57 +0000 (17:02 +0100)] 
Merge pull request #2316 from poettering/dnssec14

Fourteenth DNSSEC PR

8 years agoMerge pull request #2319 from walyong/log_msg_v04
Lennart Poettering [Thu, 14 Jan 2016 15:09:54 +0000 (16:09 +0100)] 
Merge pull request #2319 from walyong/log_msg_v04

[v4] bus-util: print "systemctl --user" on user service manager

8 years agotransaction: downgrade warnings about wanted unit which are not found 2322/head
Franck Bui [Thu, 14 Jan 2016 08:25:18 +0000 (09:25 +0100)] 
transaction: downgrade warnings about wanted unit which are not found

If a unit was pulled by a Wants= dependency but its unit file was not
present then we logged this as an error.

However Wants= might be used to configure a soft/optional dependency
on another unit, ie. start an optional service only if it's installed
otherwise simply skip it. In this case emitting an error doesn't look
appropriate.

But it's still an error if the optional dependency exists but its
activation fails for any reasons.

8 years agoMerge pull request #2320 from evverx/fix-memory-leak-on-reload
Daniel Mack [Thu, 14 Jan 2016 09:35:45 +0000 (10:35 +0100)] 
Merge pull request #2320 from evverx/fix-memory-leak-on-reload

Fix memory leak on daemon-reload