]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 years agoMerge pull request #2694 from zonque/proxyarp-missing
Lennart Poettering [Mon, 22 Feb 2016 13:33:27 +0000 (14:33 +0100)] 
Merge pull request #2694 from zonque/proxyarp-missing

missing.h: Explicitly check for IFLA_BRPORT_PROXYARP

8 years agomissing.h: Explicitly check for IFLA_BRPORT_PROXYARP 2694/head
Daniel Mack [Mon, 22 Feb 2016 12:10:16 +0000 (13:10 +0100)] 
missing.h: Explicitly check for IFLA_BRPORT_PROXYARP

RHEL explicitly disables IFLA_BRPORT_PROXYARP by renaming the enum value.

In order to support unpatched builds, we have two options:

a) redefine the enum value through missing.h and ignore the fact that it
   is really unsupported, or

b) omit that enum value on rtnl_prot_info_bridge_port_types[]

As we are not actually using this netlink type anywhere, and because it
is only hooked up for the sake of completeness, this patch opts for the
former.

8 years agoMerge pull request #2687 from poettering/resolved-fix-2683
Daniel Mack [Mon, 22 Feb 2016 08:59:07 +0000 (09:59 +0100)] 
Merge pull request #2687 from poettering/resolved-fix-2683

networkd: make sure we allocate the NTA set before we add items to it

8 years agoMerge pull request #2686 from poettering/github-templates
Daniel Mack [Mon, 22 Feb 2016 08:58:23 +0000 (09:58 +0100)] 
Merge pull request #2686 from poettering/github-templates

add github issue template

8 years agoMerge pull request #2688 from poettering/calendar-fix-2678
Zbigniew Jędrzejewski-Szmek [Mon, 22 Feb 2016 02:29:41 +0000 (21:29 -0500)] 
Merge pull request #2688 from poettering/calendar-fix-2678

A fix for #2678

8 years agoutil-lib: fix returned error code 2688/head
Lennart Poettering [Sun, 21 Feb 2016 22:27:20 +0000 (23:27 +0100)] 
util-lib: fix returned error code

Make sure we propagate errors properly.

8 years agoutil-lib: add (void) cast to indicate that we don't care about the normalization...
Lennart Poettering [Sun, 21 Feb 2016 22:25:38 +0000 (23:25 +0100)] 
util-lib: add (void) cast to indicate that we don't care about the normalization success

After all, we verify that every calendar part is not out of bounds later on,
and it's fully OK if the normalization has no effect.

8 years agonetworkd: make sure we allocate the NTA set before we add items to it 2687/head
Lennart Poettering [Sun, 21 Feb 2016 21:27:01 +0000 (22:27 +0100)] 
networkd: make sure we allocate the NTA set before we add items to it

See: #2683

8 years agoMerge pull request #2650 from vcaputo/async_fsync
Lennart Poettering [Sun, 21 Feb 2016 20:35:50 +0000 (21:35 +0100)] 
Merge pull request #2650 from vcaputo/async_fsync

Perform journal offlines asynchronously when possible

8 years agoMerge pull request #2681 from keszybz/udev-rules
Lennart Poettering [Sun, 21 Feb 2016 20:22:55 +0000 (21:22 +0100)] 
Merge pull request #2681 from keszybz/udev-rules

udev-rules cleanup and coverity warning silencing

8 years agogithub: add a basic issue template 2686/head
Lennart Poettering [Sun, 21 Feb 2016 20:15:17 +0000 (21:15 +0100)] 
github: add a basic issue template

As documented here:

https://help.github.com/articles/creating-an-issue-template-for-your-repository/

8 years agogithub: move CONTRIBUTING.md into .github subdirectory
Lennart Poettering [Sun, 21 Feb 2016 20:05:02 +0000 (21:05 +0100)] 
github: move CONTRIBUTING.md into .github subdirectory

As suggested by:

https://github.com/blog/2111-issue-and-pull-request-templates

8 years agoudev-rules: use _cleanup_ for fclose 2681/head
Zbigniew Jędrzejewski-Szmek [Sun, 21 Feb 2016 15:04:36 +0000 (10:04 -0500)] 
udev-rules: use _cleanup_ for fclose

8 years agoudev-rules: make error messages about rules more uniform
Zbigniew Jędrzejewski-Szmek [Sun, 21 Feb 2016 05:26:32 +0000 (00:26 -0500)] 
udev-rules: make error messages about rules more uniform

Also downgrade non-fatal warnings to log_warning.

Previously rule_add_key() would check the output array and log a cryptic
error and return -1. Most of the time the return value was ignored. This
does not seems right, because the buffer can overflow with enough rules.
It would also check if we have enough space for the *next* rule, even if
there might be not next rule, i.e. off-by-one.

Replace this with a check that we have enough space for a next rule before
we start parsing.

Normally using macros to alter flow is not allowed, but in this case I
think it is worth it, because it allows lots of boilerplate code to be
removed and hides repeated boring parameters, making function logic much
easier to follow.

8 years agoudev-rules: rewrite function to avoid clobbering arguments
Zbigniew Jędrzejewski-Szmek [Sun, 21 Feb 2016 04:00:45 +0000 (23:00 -0500)] 
udev-rules: rewrite function to avoid clobbering arguments

If the attribute wasn't found, the last filename looked at was returned in
the input/output argument. This just seems bad style.

The return value was ignored, so change function to return void.

8 years agoudev-rules: modernize syntax a bit
Zbigniew Jędrzejewski-Szmek [Sun, 21 Feb 2016 01:40:41 +0000 (20:40 -0500)] 
udev-rules: modernize syntax a bit

8 years agoudev-rules: log_oom() on memory error and abort processing of event
Zbigniew Jędrzejewski-Szmek [Sun, 21 Feb 2016 01:09:34 +0000 (20:09 -0500)] 
udev-rules: log_oom() on memory error and abort processing of event

CID #1313566.

Also, change the return value to void, because it is ignored anyway.

8 years agosd-device: use (void) before set_iterate calls
Zbigniew Jędrzejewski-Szmek [Sun, 21 Feb 2016 00:16:01 +0000 (19:16 -0500)] 
sd-device: use (void) before set_iterate calls

set_iterate sets the output argument to NULL on error, and the return
value is not used in this case.

CID #1306804-09.

8 years agotime-util: check for overflow in conversion from ts to nsec_t
Zbigniew Jędrzejewski-Szmek [Sun, 21 Feb 2016 00:10:38 +0000 (19:10 -0500)] 
time-util: check for overflow in conversion from ts to nsec_t

CID #1320855.

8 years agotest-siphash24: add a test for concatenating very short buffers
Zbigniew Jędrzejewski-Szmek [Sat, 20 Feb 2016 21:28:42 +0000 (16:28 -0500)] 
test-siphash24: add a test for concatenating very short buffers

coverity seems to think that our siphash code can read past the
end of a short buffer. Add a test which adds very short buffers
with different combinations of length to the hash. Hashing is done
twice, once with zeros following "data", and once with some other
bytes following "data". The two results are then compared to
verify that the result does not depend on bytes past the specified
data length.

(This test passes.)

8 years agoMerge pull request #2675 from samueltardieu/llmnr-typo
Daniel Mack [Sat, 20 Feb 2016 11:27:48 +0000 (12:27 +0100)] 
Merge pull request #2675 from samueltardieu/llmnr-typo

Fix typo on systemd-resolved log message

8 years agosystemd-resolved: fix typo on log message 2675/head
Samuel Tardieu [Sat, 20 Feb 2016 07:54:57 +0000 (08:54 +0100)] 
systemd-resolved: fix typo on log message

8 years agojournal: defer journal closes on rotate 2650/head
Vito Caputo [Thu, 18 Feb 2016 01:37:10 +0000 (17:37 -0800)] 
journal: defer journal closes on rotate

When we rotate journals, we must set offline and close the current one,
but don't generally need to wait for this to complete.

Instead, we'll initiate an asynchronous offline via
journal_file_set_offline(oldfile, false), and add the file to a
per-server set of deferred closes to be closed later when they
won't block.

There's one complication however; journal_file_open() via
journal_file_verify_header() assumes that any writable journal in the
online state is the product of an unclean shutdown or other form of
corruption.

Thus there's a need for journal_file_open() to be aware of deferred
closes and synchronize with their completion when opening preexisting
journals for writing.  To facilitate this the deferred closes set is
supplied to the journal_file_open() function where the deferred closes
may be closed synchronously before verifying the header in such
circumstances.

8 years agojournal: asynchronous journal_file_set_offline()
Vito Caputo [Fri, 12 Feb 2016 12:59:57 +0000 (04:59 -0800)] 
journal: asynchronous journal_file_set_offline()

This adds a wait flag to journal_file_set_offline(), when false the offline is
performed asynchronously in a separate thread.

When wait is true, if an asynchronous offline is already in-progress it is
restarted and waited for.  Otherwise the offline is performed synchronously
without the use of a thread.

journal_file_set_online() cancels or waits for the asynchronous offline to
complete if in-flight, depending on where in the offline process the thread
happens to be.  If the thread is in the fsync() phase, it is cancelled and
waiting is unnecessary.  Otherwise, the thread is joined before proceeding.

A new offline_state member is added to JournalFile which is used via
atomic operations for communicating between the offline thread and the
journal_file_set_{offline,online}() functions.

8 years agojournal: add void cast to journal_file_close() calls
Vito Caputo [Sat, 20 Feb 2016 00:51:41 +0000 (16:51 -0800)] 
journal: add void cast to journal_file_close() calls

8 years agojournal: add void cast to fsync() calls
Vito Caputo [Sat, 20 Feb 2016 00:36:27 +0000 (16:36 -0800)] 
journal: add void cast to fsync() calls

8 years agoMerge pull request #2666 from keszybz/coverity-fixes
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2016 20:18:40 +0000 (15:18 -0500)] 
Merge pull request #2666 from keszybz/coverity-fixes

Coverity fixes

8 years agoMerge pull request #2670 from hbrueckner/for-upstream
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2016 20:13:03 +0000 (15:13 -0500)] 
Merge pull request #2670 from hbrueckner/for-upstream

udev/path_id: correct segmentation fault due to missing NULL check

8 years agoMerge pull request #2668 from samueltardieu/systemd-resolve-manual-typo
Daniel Mack [Fri, 19 Feb 2016 14:52:43 +0000 (15:52 +0100)] 
Merge pull request #2668 from samueltardieu/systemd-resolve-manual-typo

Fix typo in systemd-resolve man page

8 years agoudev/path_id: correct segmentation fault due to missing NULL check 2670/head
Hendrik Brueckner [Fri, 19 Feb 2016 14:21:18 +0000 (15:21 +0100)] 
udev/path_id: correct segmentation fault due to missing NULL check

Running "udevadm test-builtin path_id /sys/devices/platform/" results
in a segmentation fault.

The problem is that udev_device_get_subsystem(dev) might return NULL
in a streq() call.  Solve this problem by using streq_ptr() instead.

8 years agosystemd-resolve: fix typo in man page 2668/head
Samuel Tardieu [Fri, 19 Feb 2016 13:42:38 +0000 (14:42 +0100)] 
systemd-resolve: fix typo in man page

8 years agoUse (void) to silenc coverity on proc title changes 2666/head
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2016 12:35:35 +0000 (07:35 -0500)] 
Use (void) to silenc coverity on proc title changes

This is a cosmetic best-effort thing anyway.

8 years agoresolved: fix NULL dereference in debug stmt
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2016 12:27:43 +0000 (07:27 -0500)] 
resolved: fix NULL dereference in debug stmt

CID #1351544, #1351545.

8 years agoMerge pull request #2661 from nwmcsween/nwmcsween
Daniel Mack [Fri, 19 Feb 2016 11:29:23 +0000 (12:29 +0100)] 
Merge pull request #2661 from nwmcsween/nwmcsween

Include and internal struct member fixes.

8 years agoMerge pull request #2660 from keszybz/memleaks-and-ubsan
Daniel Mack [Fri, 19 Feb 2016 11:23:43 +0000 (12:23 +0100)] 
Merge pull request #2660 from keszybz/memleaks-and-ubsan

Memleaks and ubsan

8 years agoMerge pull request #2662 from keszybz/activate-setenv
Daniel Mack [Fri, 19 Feb 2016 11:19:18 +0000 (12:19 +0100)] 
Merge pull request #2662 from keszybz/activate-setenv

activate: fix -E option parsing

8 years agoMerge pull request #2648 from keszybz/dnssec-work
Martin Pitt [Fri, 19 Feb 2016 06:50:50 +0000 (07:50 +0100)] 
Merge pull request #2648 from keszybz/dnssec-work

Better support for DANE, shell completion

8 years agoactivate: fix -E option parsing 2662/head
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2016 02:54:31 +0000 (21:54 -0500)] 
activate: fix -E option parsing

Fixes #2658.

8 years agotime-util: rewrite check in a way that does not confuse gcc 2660/head
Zbigniew Jędrzejewski-Szmek [Tue, 16 Feb 2016 18:15:34 +0000 (13:15 -0500)] 
time-util: rewrite check in a way that does not confuse gcc

gcc thinks that multiplier might be unitialized. Split out the inner
loop to make the function easier to grok.

8 years agotest-hashmap: fix undefined behaviour on string constants
Zbigniew Jędrzejewski-Szmek [Thu, 18 Feb 2016 23:59:27 +0000 (18:59 -0500)] 
test-hashmap: fix undefined behaviour on string constants

The test was failing at -O2+ with gcc 5.3 and 6.0.
"val1" == "val1" and "val1" != "val1" are both valid.
http://stackoverflow.com/questions/4843640/why-is-a-a-in-c

8 years agojournal/catalog: fix memory leaks
Zbigniew Jędrzejewski-Szmek [Thu, 18 Feb 2016 22:37:17 +0000 (17:37 -0500)] 
journal/catalog: fix memory leaks

Various buffers were lost because finish_item() either consumed
the buffer or allocated a new one (if an entry with the same key existed).
The caller would simply forget the buffer in either case.

Also add a check for the case when a valid identifier is followed by
an empty body. We should not allow this.

Also be more consistent in error handling and always print an error
message.

8 years agobasic/strbuf: do not call bsearch with a null argument
Zbigniew Jędrzejewski-Szmek [Thu, 18 Feb 2016 22:33:10 +0000 (17:33 -0500)] 
basic/strbuf: do not call bsearch with a null argument

Das ist verboten!

src/basic/strbuf.c:162:23: runtime error: null pointer passed as argument 2,
                           which is declared to never be null

8 years agoDon't use internal struct member names 2661/head
Nathan McSween [Thu, 18 Feb 2016 23:35:22 +0000 (23:35 +0000)] 
Don't use internal struct member names

8 years agoRemove/add (un)needed includes
Nathan McSween [Thu, 18 Feb 2016 23:34:30 +0000 (23:34 +0000)] 
Remove/add (un)needed includes

8 years agoMerge pull request #2644 from 0xAX/check-alloc-overflow-macro
Zbigniew Jędrzejewski-Szmek [Thu, 18 Feb 2016 20:32:22 +0000 (15:32 -0500)] 
Merge pull request #2644 from 0xAX/check-alloc-overflow-macro

alloc-util: extract overflow check into inline function

8 years agoalloc-util: cleanups 2644/head
Alexander Kuleshov [Tue, 16 Feb 2016 17:51:43 +0000 (23:51 +0600)] 
alloc-util: cleanups

This patch contains a set of little cleanups for alloc-util.h:

1. The malloc_multiply(), realloc_multiply() and memdup_multiply()
functions check allocation related parameters on overflow. Let's
move them to the separate size_multiply_overflow() function for
simplicity, code duplication prevention and possible reuse in future.

2. use SIZE_MAX from stdlib instead of ((size_t) - 1) to be more
clear.

3. The 'a'/'b' variables are renamed to 'size' and 'need' to be
more clear.'

8 years agoMerge pull request #2621 from keszybz/wheel-group
Martin Pitt [Thu, 18 Feb 2016 18:20:14 +0000 (19:20 +0100)] 
Merge pull request #2621 from keszybz/wheel-group

build-sys: allow wheel group name to be specified

8 years agosystemd-resolve: initial shell completion 2648/head
Zbigniew Jędrzejewski-Szmek [Tue, 16 Feb 2016 23:17:01 +0000 (18:17 -0500)] 
systemd-resolve: initial shell completion

v2:
- use /sys/class/net to list interfaces,
  also copy the same code to systemd-nspawn
v3:
- do not propose "any" twice for --type

8 years agoresolve: also allow SSHFP payload to be exported
Zbigniew Jędrzejewski-Szmek [Wed, 17 Feb 2016 01:55:23 +0000 (20:55 -0500)] 
resolve: also allow SSHFP payload to be exported

8 years agoresolve: print TLSA packets in hexadecimal
Zbigniew Jędrzejewski-Szmek [Wed, 17 Feb 2016 01:36:10 +0000 (20:36 -0500)] 
resolve: print TLSA packets in hexadecimal

https://tools.ietf.org/html/rfc6698#section-2.2 says:
> The certificate association data field MUST be represented as a string
> of hexadecimal characters. Whitespace is allowed within the string of
> hexadecimal characters

8 years agosystemd-resolve: easy querying of TLSA records
Zbigniew Jędrzejewski-Szmek [Thu, 18 Feb 2016 02:08:57 +0000 (21:08 -0500)] 
systemd-resolve: easy querying of TLSA records

$ systemd-resolve --tlsa fedoraproject.org
_443._tcp.fedoraproject.org IN TLSA 0 0 1 GUAL5bejH7czkXcAeJ0vCiRxwMnVBsDlBMBsFtfLF8A=
        -- Cert. usage: CA constraint
        -- Selector: Full Certificate
        -- Matching type: SHA-256

$ systemd-resolve --tlsa=tcp fedoraproject.org:443
_443._tcp.fedoraproject.org IN TLSA 0 0 1 GUAL5bejH7czkXcAeJ0vCiRxwMnVBsDlBMBsFtfLF8A=
        ...

$ systemd-resolve --tlsa=udp fedoraproject.org
_443._udp.fedoraproject.org: resolve call failed: '_443._udp.fedoraproject.org' not found

v2:
- use uint16_t
- refuse port 0

8 years agoMerge pull request #2646 from evverx/fix-2637
Zbigniew Jędrzejewski-Szmek [Thu, 18 Feb 2016 15:24:16 +0000 (10:24 -0500)] 
Merge pull request #2646 from evverx/fix-2637

Fix #2637 (doubled specifier expansion in ExecStart=)

8 years agoMerge pull request #2653 from keszybz/test-dns-domain
Martin Pitt [Thu, 18 Feb 2016 15:11:03 +0000 (16:11 +0100)] 
Merge pull request #2653 from keszybz/test-dns-domain

build-sys: remove duplicated entry in tests

8 years agobuild-sys: remove duplicated entry in tests 2653/head
Zbigniew Jędrzejewski-Szmek [Thu, 18 Feb 2016 13:30:18 +0000 (08:30 -0500)] 
build-sys: remove duplicated entry in tests

test-dns-domain should be built and run even without ENABLE_RESOLVED.

8 years agocore: revert "core: resolve specifier in config_parse_exec()" 2646/head
Evgeny Vereshchagin [Wed, 17 Feb 2016 22:32:36 +0000 (22:32 +0000)] 
core: revert "core: resolve specifier in config_parse_exec()"

This reverts commit cb48dfca6a8bc15d9081651001a16bf51e03838a.

Exec*-settings resolve specifiers twice:
%%U -> config_parse_exec [cb48dfca6a8] -> %U -> service_spawn -> 0

Fixes #2637

8 years agoMerge pull request #2652 from filbranden/testsresolved1
Martin Pitt [Thu, 18 Feb 2016 09:33:39 +0000 (10:33 +0100)] 
Merge pull request #2652 from filbranden/testsresolved1

Do not build tests that depend on resolved when it has been disabled

8 years agobuild-sys: Do not build tests that depend on resolved when it has been disabled 2652/head
Filipe Brandenburger [Thu, 18 Feb 2016 08:39:38 +0000 (00:39 -0800)] 
build-sys: Do not build tests that depend on resolved when it has been disabled

If ./configure --disable-resolved has been used, do not try to build
test-dns-packet and test-resolve-tables which depend on it.

Previously, the SOURCES, LIBS and LDADDs for these tests were made conditional
while the main rules for them weren't, causing build failures trying to build a
binary with no sources.

This was uncovered when trying to build udeb for systemd in CI, which uses
--disable-resolved for a minimal build, which uncovered the issue.

Fixes #2651.

8 years agobuild-sys: allow references to wheel group to be omitted 2621/head
Zbigniew Jędrzejewski-Szmek [Mon, 15 Feb 2016 16:08:26 +0000 (11:08 -0500)] 
build-sys: allow references to wheel group to be omitted

https://github.com/systemd/systemd/issues/2492

8 years agotests: add test for https://github.com/systemd/systemd/issues/2637
Evgeny Vereshchagin [Wed, 17 Feb 2016 22:20:56 +0000 (22:20 +0000)] 
tests: add test for https://github.com/systemd/systemd/issues/2637

+ perl -e 'exit(!(qq{0} eq qq{\x25U}))'
exec-spec-interpolation.service: Main process exited, code=exited, status=1/FAILURE
exec-spec-interpolation.service: Unit entered failed state.
exec-spec-interpolation.service: Failed with result 'exit-code'.
        PID: 11270
        Start Timestamp: Wed 2016-02-17 22:21:31 UTC
        Exit Timestamp: Wed 2016-02-17 22:21:31 UTC
        Exit Code: exited
        Exit Status: 1
Assertion 'service->main_exec_status.status == status_expected' failed at src/test/test-execute.c:65, function check(). Aborting.

8 years agoMerge pull request #2640 from keszybz/dnssec-work-3
Lennart Poettering [Wed, 17 Feb 2016 11:45:31 +0000 (12:45 +0100)] 
Merge pull request #2640 from keszybz/dnssec-work-3

resolve: dumping of binary packets

8 years agotest-resolve-tables: verify that dns type/class length is within limits 2640/head
Zbigniew Jędrzejewski-Szmek [Mon, 15 Feb 2016 23:22:11 +0000 (18:22 -0500)] 
test-resolve-tables: verify that dns type/class length is within limits

DNS_TYPE_STRING_MAX causes a problem with the table autogeneration code,
change to _DNS_TYPE_STRING_MAX.

8 years agoUse provided buffer in dns_resource_key_to_string
Zbigniew Jędrzejewski-Szmek [Sun, 14 Feb 2016 23:51:55 +0000 (18:51 -0500)] 
Use provided buffer in dns_resource_key_to_string

When the buffer is allocated on the stack we do not have to check for
failure everywhere. This is especially useful in debug statements, because
we can put dns_resource_key_to_string() call in the debug statement, and
we do not need a seperate if (log_level >= LOG_DEBUG) for the conversion.

dns_resource_key_to_string() is changed not to provide any whitespace
padding. Most callers were stripping the whitespace with strstrip(),
and it did not look to well anyway. systemd-resolve output is not column
aligned anymore.

The result of the conversion is not stored in DnsTransaction object
anymore. It is used only for debugging, so it seems fine to generate it
when needed.

Various debug statements are extended to provide more information.

8 years agoReplace DNS_RESOURCE_KEY_NAME with a version which always returns "." for root
Zbigniew Jędrzejewski-Szmek [Sat, 13 Feb 2016 19:54:15 +0000 (14:54 -0500)] 
Replace DNS_RESOURCE_KEY_NAME with a version which always returns "." for root

This fixes formatting of root domain in debug messages:
Old:
systemd-resolved[10049]: Requesting DS to validate transaction 19313 (., DNSKEY with key tag: 19036).
New:
systemd-resolved[10049]: Requesting DS to validate transaction 19313 (, DNSKEY with key tag: 19036).

8 years agosystemd-resolved: split out inner loop
Zbigniew Jędrzejewski-Szmek [Thu, 4 Feb 2016 02:37:11 +0000 (21:37 -0500)] 
systemd-resolved: split out inner loop

With two nested loops and a switch statements, it's quite hard to
understand what break and continue mean.

8 years agosystemd-resolve: allow whole packets to be dumped in binary form
Zbigniew Jędrzejewski-Szmek [Sun, 31 Jan 2016 05:06:49 +0000 (00:06 -0500)] 
systemd-resolve: allow whole packets to be dumped in binary form

8 years agosystemd-resolve: allow keys to be dumped in binary form
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2016 23:24:28 +0000 (18:24 -0500)] 
systemd-resolve: allow keys to be dumped in binary form

$ systemd-resolve --raw --openpgp zbyszek@fedoraproject.org | pgpdump /dev/stdin

8 years agosystemd-resolve: reword --help output
Zbigniew Jędrzejewski-Szmek [Mon, 15 Feb 2016 18:15:23 +0000 (13:15 -0500)] 
systemd-resolve: reword --help output

The output didn't specify if the default for --cname/--search/--legend and
other options was yes or no. Change the description to be explicit about that.

Also make the --help output and man page closer.

8 years agoman: show output in example systemd-resolve commands
Zbigniew Jędrzejewski-Szmek [Sat, 13 Feb 2016 18:53:18 +0000 (13:53 -0500)] 
man: show output in example systemd-resolve commands

I think example output allows the reader of the man page to
see what functionlity is provided without running the commands
themselves. Specific values in the examples are bound to get out
of date but this is not a problem.

8 years agoMerge pull request #2623 from poettering/networkd-fixes
Zbigniew Jędrzejewski-Szmek [Tue, 16 Feb 2016 23:36:42 +0000 (18:36 -0500)] 
Merge pull request #2623 from poettering/networkd-fixes

Networkd, resolved, build-sys fixes

8 years agoMerge pull request #2626 from poettering/fionread-fix
Lennart Poettering [Tue, 16 Feb 2016 22:53:44 +0000 (23:53 +0100)] 
Merge pull request #2626 from poettering/fionread-fix

networkd: FIONREAD is not reliable on some sockets

8 years agoMerge pull request #2636 from 0xAX/not-edit-errno-manually
Lennart Poettering [Tue, 16 Feb 2016 19:22:07 +0000 (20:22 +0100)] 
Merge pull request #2636 from 0xAX/not-edit-errno-manually

main: no need to set errno manually

8 years agoresolved: make sure to normalize all domain names returned via the bus 2623/head
Lennart Poettering [Tue, 16 Feb 2016 13:17:53 +0000 (14:17 +0100)] 
resolved: make sure to normalize all domain names returned via the bus

Most domain names we deal with are normalized anyway (since we read them that
way from DNS packets), but some might not (because they are synthesized from
unnormalized configuration or so), hence make sure to normalize all names
before passing them out to clients, to be fully deterministic.

Note that internally we are process normalized and non-normalized names the
same way, and while comparing them ignore the differences due to unnormalized
names. However, that internal implementation detail really shouldn't spill out
the clients, hence make sure to clean it all up.

8 years agoudev: fix cg_unified() return code checking
Lennart Poettering [Tue, 16 Feb 2016 13:03:47 +0000 (14:03 +0100)] 
udev: fix cg_unified() return code checking

Fixes fall-out from 8b3aa503c171acdb9ec63484a8c50e2680d31e79.

Fixes: #2635
8 years agocore: fix assertion check
Lennart Poettering [Tue, 16 Feb 2016 12:18:36 +0000 (13:18 +0100)] 
core: fix assertion check

Fixes: #2632
8 years agoresolve: print a noisy warning if we show crypto keys that could not be authenticated
Lennart Poettering [Mon, 15 Feb 2016 20:25:33 +0000 (21:25 +0100)] 
resolve: print a noisy warning if we show crypto keys that could not be authenticated

Doing DNS retrieval on non-authenticated crypt keys is useless, hence warn
loudly about it.

8 years agonetworkd: rework idle detection logic of networkd
Lennart Poettering [Mon, 15 Feb 2016 18:11:18 +0000 (19:11 +0100)] 
networkd: rework idle detection logic of networkd

This patch makes networkd stay around as long as there is more than just a
loopback interface around, or the loopback device isn't fully probed yet, or
the loopback device has a .network file attached.

In essence, this means networkd stays around now continously as it should,
unless it is running in some (container?) environment that really has no
interface except a loopback device.

Fixes #2577.

8 years agobuild-sys: fix type detection
Lennart Poettering [Mon, 15 Feb 2016 18:06:01 +0000 (19:06 +0100)] 
build-sys: fix type detection

Before this patch existence of char16_t, char32_t, key_serial_t was checked
with AC_CHECK_DECLS() which doesn't actually work for types. Correct this to
use AC_CHECK_TYPES() instead.

Also, while we are at it, change the check for memfd_create() to use
AC_CHECK_DECLS() instead of AC_CHECK_FUNCS(). This is a better choice, since a
couple of syscalls are defined by glibc but not exported in the header files
(pivot_root() for example), and we hence should probably be more picky with
memfd_create() too, which glibc might decide to expose one day, but not
necessarily in the headers too.

8 years agoresolved: turn on DNSSEC by default, unless configured otherwise
Lennart Poettering [Mon, 15 Feb 2016 17:40:02 +0000 (18:40 +0100)] 
resolved: turn on DNSSEC by default, unless configured otherwise

Let's make sure DNSSEC gets more testing, by defaulting DNSSEC to
"allow-downgrade" mode. Since distros should probably not ship DNSSEC enabled
by default add a configure switch to disable this again.

DNSSEC in "allow-downgrade" mode should mostly work without affecting user
experience. There's one exception: some captive portal systems rewrite DNS in
order to redirect HTTP traffic to the captive portal. If these systems
implement DNS servers that are otherwise DNSSEC-capable (which in fact is
pretty unlikely, but still...), then this will result in the captive portal
being inaccessible. To fix this support in NetworkManager (or any other network
management solution that does captive portal detection) is required, which
simply turns off DNSSEC during the captive portal detection, and resets it back
to the default (i.e. on) after captive portal authentication is complete.

8 years agomain: no need to set errno manually 2636/head
Alexander Kuleshov [Tue, 16 Feb 2016 12:42:45 +0000 (18:42 +0600)] 
main: no need to set errno manually

If we are not PID 1 and started as init, we executing systemctl
with execv(). Here no need to set errno manually, because in a
failure case, because the execv() anyway will set errno depends
on a error.

8 years agoMerge pull request #2630 from keszybz/systemctl-m-h
Lennart Poettering [Tue, 16 Feb 2016 12:21:14 +0000 (13:21 +0100)] 
Merge pull request #2630 from keszybz/systemctl-m-h

systemctl: fix style to avoid modification of array passed by caller

8 years agonetworkd: FIONREAD is not reliable on some sockets 2626/head
Lennart Poettering [Mon, 15 Feb 2016 21:50:01 +0000 (22:50 +0100)] 
networkd: FIONREAD is not reliable on some sockets

Fixes: #2457
8 years agosystemctl: fix style to avoid modification of array passed by caller 2630/head
Zbigniew Jędrzejewski-Szmek [Tue, 16 Feb 2016 00:06:53 +0000 (19:06 -0500)] 
systemctl: fix style to avoid modification of array passed by caller

Followup for 4524439edb7d.

8 years agoMerge pull request #2628 from benjarobin/fix-pull-req-2611
Lennart Poettering [Mon, 15 Feb 2016 23:05:20 +0000 (00:05 +0100)] 
Merge pull request #2628 from benjarobin/fix-pull-req-2611

time-util: Rename and fix call of deserialize_timestamp_value()

8 years agotime-util: Rename and fix call of deserialize_timestamp_value() 2628/head
Benjamin Robin [Mon, 15 Feb 2016 22:26:34 +0000 (23:26 +0100)] 
time-util: Rename and fix call of deserialize_timestamp_value()

The deserialize_timestamp_value() is renamed timestamp_deserialize() to be more
consistent with dual_timestamp_deserialize()
And add the NULL check back on realtime and monotonic

8 years agoMerge pull request #2622 from keszybz/systemctl-m-h
Lennart Poettering [Mon, 15 Feb 2016 22:07:24 +0000 (23:07 +0100)] 
Merge pull request #2622 from keszybz/systemctl-m-h

systemctl: include -M or -H arguments in the hint

8 years agosystemctl: include -M or -H arguments in the hint 2622/head
Zbigniew Jędrzejewski-Szmek [Mon, 15 Feb 2016 16:57:48 +0000 (11:57 -0500)] 
systemctl: include -M or -H arguments in the hint

https://github.com/systemd/systemd/issues/2431

Some newlines are added, but the output will still exceed 80 columns in many
cases. The fallback for oom conditions is changed from "n/a" to something
"<service>", and a similar pattern is used for the new code. This way we
have a realistic fallback for oom, which seems nicer than making the whole
function return an error code which would then have to be propagated.

$ systemctl -M fedora-rawhide restart systemd-networkd.service
Job for systemd-networkd.service failed because start of the service was attempted too often.
See "systemctl -M fedora-rawhide status systemd-networkd.service" and "journalctl -M fedora-rawhide -xe" for details.
To force a start use "systemctl -M fedora-rawhide reset-failed systemd-networkd.service"
followed by "systemctl -M fedora-rawhide start systemd-networkd.service" again.

8 years agoMerge pull request #2611 from 0xAX/deserialize-clkid
Lennart Poettering [Mon, 15 Feb 2016 19:29:59 +0000 (20:29 +0100)] 
Merge pull request #2611 from 0xAX/deserialize-clkid

time-util: introduce deserialize_timestamp_value()

8 years agologind: use deserialize_timestamp_value() 2611/head
Alexander Kuleshov [Mon, 15 Feb 2016 18:04:49 +0000 (00:04 +0600)] 
logind: use deserialize_timestamp_value()

which is introduced in the ebf30a086d commit.

8 years agomachine: use deserialize_timestamp_value()
Alexander Kuleshov [Mon, 15 Feb 2016 18:04:09 +0000 (00:04 +0600)] 
machine: use deserialize_timestamp_value()

which is introduced in the ebf30a086dfa commit.

8 years agotime-util: introduce deserialize_timestamp_value()
Alexander Kuleshov [Mon, 15 Feb 2016 18:01:44 +0000 (00:01 +0600)] 
time-util: introduce deserialize_timestamp_value()

The time-util.c provides dual_timestamp_deserialize() function to
convert value to usec_t and set it as value of ts->monotonic and
ts->realtime.

There are some places in code which do the same but only for one
clockid_t (realtime or monotonic), when dual_timestamp_deserialize()
sets value of both.

This patch introduces the deserialize_timestamp_value() which converts
 a given value to usec_t and write it to a given timestamp.

8 years agoMerge pull request #2620 from bengal/assert-sd-event-now
Daniel Mack [Mon, 15 Feb 2016 15:50:55 +0000 (16:50 +0100)] 
Merge pull request #2620 from bengal/assert-sd-event-now

dhcp: assert the success of sd_event_now()

8 years agodhcp: assert the success of sd_event_now() 2620/head
Beniamino Galvani [Mon, 15 Feb 2016 15:11:51 +0000 (16:11 +0100)] 
dhcp: assert the success of sd_event_now()

The function must never fail.

8 years agoMerge pull request #2618 from zonque/busproxy-removal
Lennart Poettering [Mon, 15 Feb 2016 13:54:09 +0000 (14:54 +0100)] 
Merge pull request #2618 from zonque/busproxy-removal

remove bus-proxyd

8 years agoMerge pull request #2596 from keszybz/move-activate-to-bin
Lennart Poettering [Mon, 15 Feb 2016 13:08:28 +0000 (14:08 +0100)] 
Merge pull request #2596 from keszybz/move-activate-to-bin

Move activate to bin, extend --fdnames functionality

8 years agoMerge pull request #2617 from rabinv/master
Daniel Mack [Mon, 15 Feb 2016 10:11:19 +0000 (11:11 +0100)] 
Merge pull request #2617 from rabinv/master

missing.h: define IFLA_EXT_MASK

8 years agomissing.h: define IFLA_EXT_MASK 2617/head
Rabin Vincent [Fri, 12 Feb 2016 07:41:44 +0000 (08:41 +0100)] 
missing.h: define IFLA_EXT_MASK

We already define IFLA_PROMISCUITY and some other of these masks in
order to allow building with older headers.  Define IFLA_EXT_MASK too,
which was added in the same kernel version as IFLA_PROMISCUITY (v3.10).

8 years agoPromote systemd-activate to /usr/bin/systemd-socket-activate 2596/head
Zbigniew Jędrzejewski-Szmek [Fri, 12 Feb 2016 03:11:33 +0000 (22:11 -0500)] 
Promote systemd-activate to /usr/bin/systemd-socket-activate

It has fairly wide functionality now and the interface has been
stable for a while. It it a useful testing tool.

The name is changed to better indicate what it does.

8 years agoMerge pull request #2608 from poettering/resolved-prop-fix
Zbigniew Jędrzejewski-Szmek [Sat, 13 Feb 2016 21:48:03 +0000 (16:48 -0500)] 
Merge pull request #2608 from poettering/resolved-prop-fix

bus property name fix in resolved

8 years agoMerge pull request #2609 from 0xAX/service-dual-timestamp-serialization
Zbigniew Jędrzejewski-Szmek [Sat, 13 Feb 2016 21:38:58 +0000 (16:38 -0500)] 
Merge pull request #2609 from 0xAX/service-dual-timestamp-serialization

service: remove unnecessary check that dual_timestamp is set

8 years agobusctl: when formatting message contents, make sure to print all whitespaces 2608/head
Lennart Poettering [Sat, 13 Feb 2016 19:32:11 +0000 (20:32 +0100)] 
busctl: when formatting message contents, make sure to print all whitespaces

Previously we'd miss a necessary whitespace at the end of arrays, if more data
was following.