Commit graph

24502 commits

Author SHA1 Message Date
Lennart Poettering cbd100ac7c resolved: don't insist in RRSIG metadata for NSEC3 RRs that have not been authenticated
In some cases we get NSEC3 RRs that have not been authenticated (because the chain of trust to the root is somewhere
broken). We can use these for checking negative replies, as long as we don't claim they were ultimately authenticated.
This means we need to be able to deal with NSEC3 RRs that lack RRSIG metadata.
2016-01-25 17:19:20 +01:00
Lennart Poettering ab88b6d087 resolved: use dns_query_reset_answer() where we can 2016-01-25 17:19:20 +01:00
Lennart Poettering b8b143c5ff update DNSSEC TODO 2016-01-25 17:19:20 +01:00
Lennart Poettering a7bf2ada62 resolved: properly propagate query candidate error
We already properly propagate errors from transactions to queries. Make sure that errors that happened during handling
of query candidates are propagated to the query, too.
2016-01-25 17:19:20 +01:00
Lennart Poettering 7cc6ed7ba6 resolved: replace DNS_TRANSACTION_RESOURCES by DNS_TRANSACTION_ERRNO
Whenever we encounter an OS error we did not expect, we so far put the transaction into DNS_TRANSACTION_RESOURCES
state. Rename this state to DNS_TRANSACTION_ERRNO, and save + propagate the actual system error to the caller. This
should make error messages triggered by system errors much more readable by the user.
2016-01-25 17:19:19 +01:00
Lennart Poettering f25f9e8d60 catalog: add DNSSEC log messages to message catalog 2016-01-25 17:19:19 +01:00
Lennart Poettering b35f360bbd catalog: fix line width to 79 chars
Line breaks default to 119 characters for systemd sources now, configured through the .vimrc and .dir-local.el files.
However, for the catalog files we really should stick to 79 chars, as they are regularly shown on terminal screens.
2016-01-25 17:19:19 +01:00
Lennart Poettering 1e02e182f1 resolved: log recognizably about DNSSEC downgrades
If we downgrade from DNSSEC to non-DNSSEC mode, let's log about this in a recognizable way (i.e. with a message ID),
after all, this is of major importance.
2016-01-25 17:19:19 +01:00
Lennart Poettering dd0bc0f141 resolved: synthesize RRs for data from /etc/hosts
This way the difference between lookups via NSS and our native bus API should become minimal.
2016-01-25 17:19:19 +01:00
Lennart Poettering 528e685ebd resolved: when synthesizing RR responses, own the name fully
When we synthesize A/AAAA for domains like "localhost", then make sure we generate ENODATA if the user asks for RR
types such a RP to be solved on the name. Previously, we'd pass the error back in that case that was generated from the
usual lookup procedure.
2016-01-25 17:19:19 +01:00
Lennart Poettering 0791110fbe resolved: properly handle LLMNR/TCP connection errors
The LLMNR spec suggests to do do reverse address lookups by doing direct LLMNR/TCP connections to the indicated
address, instead of doing any LLMNR multicast queries. When we do this and the peer doesn't actually implement LLMNR
this will result in a TCP connection error, which we need to handle. In contrast to most LLMNR lookups this will give
us a quick response on whether we can find a suitable name. Report this as new transaction state, since this should
mostly be treated like an NXDOMAIN rcode, except that it's not one.
2016-01-25 17:19:19 +01:00
Lennart Poettering 7bb70b6e3d core: normalize error handling a bit, in setup_pam()
Assign errno-style errors to a variable called "r" when they happen, the same way we do this in most other calls. It's
bad enough that the error handling part of the function deals with two different error variables (pam_code and r) now,
but before this fix it was even three!
2016-01-25 17:19:19 +01:00
Lennart Poettering 3347dd5ea1 resolved: fix rcode formatting string length
Since we honour the edns rcode extension we need more than 4 bits to format it. To avoid further confusion, derive the
right length from the type.
2016-01-25 17:19:19 +01:00
Lennart Poettering 3731ad2703 github: extend README.md a bit
Link up more stuff on the GitHub landing page.
2016-01-25 17:19:19 +01:00
Lennart Poettering cc5fddef6b github: add a CONTRIBUTING.md file that github shows when a PR or issue is filed
github links up CONTRIBUTING.md if it exists from the issue/PR filing form. Let's add one, in the hope that people have
a look before filing a PR.
2016-01-25 17:19:19 +01:00
Lennart Poettering 0aa5f6983f README: drop link to systemd-commits ML
Since we moved to github the commits ML is basically dead, hence don't advertise it anymore.
2016-01-25 17:19:19 +01:00
Lennart Poettering 1c4e4227fa CODING_STYLE: make sure line break recommendation matches edit configuration
In the .vimrc and .dir-locals.el we suggest a line width of 119. We should recommend the same in CODING_STYLE.
2016-01-25 17:19:19 +01:00
Lennart Poettering 7405bb3ec0 resolve: fix wording in resolver statistics output
Now that we count both negative and positive validation results, we shouldn't claim we just counted RRsets.
2016-01-25 17:19:19 +01:00
Lennart Poettering 59c5b5974d resolved: log each time we increase the DNSSEC verdict counters
Also, don't consider RRs that aren't primary to the lookups we do as relevant to the lookups.
2016-01-25 17:19:19 +01:00
Lennart Poettering f6618dcd96 resolved: never store NSEC/NSEC3 RRs from the upper zone of a zone cut in cache
When using NSEC/NSEC3 RRs from the cache to derive existance of arbitrary RRs, we should not get confused by the fact
that NSEC/NSEC3 RRs exist twice at zone cuts: once in the parent zone, and once in the child zone. For most RR types we
should only consult the latter since that's where the beef is. However, for DS lookups we have to check the former.

This change makes sure we never cache NSEC/NSEC3 RRs from any parent zone of a zone-cut. It also makes sure that when
we look for a DS RR in the cache we never consider any cached NSEC RR, as those are now always from the child zone.
2016-01-25 17:19:19 +01:00
Lennart Poettering fcfaff1235 resolved: if we detect a message with incomplete DNSSEC data, consider this an invalid packet event 2016-01-25 17:19:19 +01:00
Lennart Poettering 7aa8ce9855 resolved: also collect statistics about negative DNSSEC proofs
We already maintain statistics about positive DNSSEC proofs, and count them up by 1 for each validated RRset. Now,
update the same counters each time we validated a negative query, so that the statistics are the combined result of all
validation checks, both positive and negative.
2016-01-25 17:19:19 +01:00
Lennart Poettering 352af30838 resolve: use different bitmap checking rules when we find an exact NSEC3 match, or just a covering enclosure
If we are looking for a DS RR we need to check the NSEC3 bitmap of the parent zone's NSEC3 RR, not the one from the
child. For any other RR we need to look at the child's however, hence enforce this with the bitmaps.

Note that not coverign checks only the lower zone's NSEC3 bitmaps matter, hence the existing check is fine.
2016-01-25 17:19:18 +01:00
Lennart Poettering 300a716dc4 resolve: minor strings improvements 2016-01-25 17:19:18 +01:00
Lennart Poettering 624993ac85 man: document systemd-resolve(8)
This also links up the new manpage from systemd-resolved.service(8), and makes a couple of unrelated additions.
2016-01-25 17:19:18 +01:00
Lennart Poettering 54230826fd emacs: also configure nxml parameters in .dir-locals.el
We configure the parameters we use for the docbook XML.
2016-01-25 16:00:28 +01:00
Lennart Poettering b5eb973b39 resolve: rename "systemd-resolve-host" tool to simply "systemd-resolve"
The tool resolves way more than just hosts, hence give it a more generic name. This should be safe, as the tool is
currently undocumented. Before we add documentation for it, let's get the name right.

This also moves the C source into src/resolve/ (from src/resolve-host/), since the old name is a misnomer now. Also,
since it links directly to many of the C files of resolved it really belongs into resolved's directory anyway.
2016-01-25 16:00:28 +01:00
Lennart Poettering ce736ace37 resolved: get rid of unnecessary if check
DNS_ANSWER_FOREACH() can deal with NULL answers anyway, let's simplify our code here.
2016-01-25 15:59:40 +01:00
Lennart Poettering 839a4a20d8 resolved: split out RR synthesis logic into its own C file
Also, while we are at it, set the "authenticated" bit for everything we synthesize
2016-01-25 15:59:40 +01:00
Lennart Poettering d07b43a18e resolved: move dns_type_to_af() to dns-type.c 2016-01-25 15:59:40 +01:00
Lennart Poettering edbcc1fdd9 resolve: generate a nice clean error when clients try to resolve a name when the network is down 2016-01-25 15:59:40 +01:00
Lennart Poettering 6955a3ba9d resolved: when checking whether a link is relevant, check kernel operstate
This mimics what networkd is doing to detect a carrier.
2016-01-25 15:59:40 +01:00
Lennart Poettering 55abd6dadd resolved: fix typo
Noticed by @vcaputo
2016-01-25 15:59:39 +01:00
Lennart Poettering ebc8a1066a resolved: fix RR key reduction logic
Fixes #2380.
2016-01-25 15:59:39 +01:00
Lennart Poettering cf7d1a30e4 logind,machined: bump TasksMax=
Issue #2388 suggests the current TasksMax= setting for user processes is to low. Bump it to 12K. Also, bump the
container TasksMax= from 8K to 16K, so that it remains higher than the one for user processes.

(Compare: the kernel default limit for processes system-wide is 32K).

Fixes #2388
2016-01-25 15:59:39 +01:00
Lennart Poettering 147d3751d8 Merge pull request #2428 from msekletar/nspawn-alloca-fix
nspawn: fix memory leak
2016-01-25 13:46:23 +01:00
Michal Sekletar 61e741ed3d nspawn: fix memory leak 2016-01-25 12:06:38 +01:00
Zbigniew Jędrzejewski-Szmek ce262e5760 Merge pull request #2425 from yuwata/journal-remote-v4
ZJS: remove unnecessary oom check after strdupa().
2016-01-24 11:49:31 -05:00
Daniel Mack 3a79e301e8 Merge pull request #2423 from keszybz/udevd-crash-in-cleanup
udevd: do not clean up fds in main
2016-01-24 15:09:33 +01:00
Yu Watanabe 2f1acf6f13 journal-remote: fix broken --getter option
This commit fixes the following broken --getter option:
when systemd-journal-remote is called with --getter option,
it causes the error meesage "Zero sources specified" and
the getter command will not be called.
2016-01-24 16:12:13 +09:00
Yu Watanabe e6b6225e3b journal-remote: add an example to man 2016-01-24 16:12:13 +09:00
Yu Watanabe d10accb0b1 journal-remote: output file name is determined by the remote hostname
When --url option is specified, e.g. --url='http://some.host:19531/entries'
retrieved remote journal entries will be stored to
/var/log/journal/remote/remote-some.host.journal
2016-01-24 16:11:21 +09:00
Yu Watanabe b68f6b0a79 journal-remote: make --url option support arbitrary url
Currently, --url option supports the only form like http(s)://some.host:19531.
This commit adds support to call systemd-journal-remote as follwos:
systemd-journal-remote --url='http://some.host:19531'
systemd-journal-remote --url='http://some.host:19531/'
systemd-journal-remote --url='http://some.host:19531/entries'
systemd-journal-remote --url='http://some.host:19531/entries?boot&follow'
The first three example result the same and retrieve all entries.
The last example retrieves only current boot entries and wait new events.
2016-01-24 15:45:47 +09:00
Zbigniew Jędrzejewski-Szmek 9d5a981398 Merge pull request #2318 from vcaputo/coalesce-ftruncates-redux
journal: coalesce ftruncate()s in 250ms windows
2016-01-23 22:09:51 -05:00
Zbigniew Jędrzejewski-Szmek efa1606eec udevd: do not clean up fds in main
fds will also be closed during manager cleanup in run, leading
to an error when we try to close them again. It is now possible
to "leak" the fds on error, but it's an unlikely event and we
will exit immediately anyway.

Fixes #2418.
2016-01-23 11:45:22 -05:00
Lennart Poettering a9eb840583 Merge pull request #2410 from dobyrch/master
systemctl: Allow 'edit' and 'cat' on unloaded units
2016-01-22 17:28:59 +01:00
Lennart Poettering e14c67d046 Merge pull request #2412 from fbuihuu/device-fixes
Device fixes
2016-01-22 17:28:05 +01:00
Franck Bui ac9d396b2a device: make sure to not ignore re-plugged device
systemd automatically mounts device unless 'noauto' is part of the
mount options. This can happen during boot if the device is plugged at
that time or later when the system is already running (the latter case
is not documented AFAICS).

After the systemd booted, I plugged my USB device which had an entry
in /etc/fstab with the default options and systemd automatically
mounted it.

However I noticed that if I unplugged and re-plugged the device the
automatic mounting of the device didn't work anymore: systemd didn't
notice that the device was re-plugged.

This was due to the device unit which was not recycled by the GC
during the unplug event because in the case of automounting, the mount
unit still referenced it. When the device was re-plugged, the old
device unit was reused but it still had the old sysfs path (amongst
other useful information).

Systemd was confused by the stalled sysfs path and decided to ignore
the plug event.

This patch fixes this issue by simply not doing the sanity checking on
the sysfs path if the device is in unplugged state.
2016-01-22 13:53:00 +01:00
Lennart Poettering dd17a7aa12 Merge pull request #2413 from msekletar/update-todo-reload
Remove TODO entry
2016-01-22 11:53:58 +01:00
Michal Sekletar 99d7bd1c00 Remove TODO entry
Feature was introduced by 06af2a0
2016-01-22 10:10:45 +01:00