platform/upstream/systemd.git
8 years agoresolved: reorder functions
Michael Olbrich [Sun, 31 Jan 2016 20:02:10 +0000 (21:02 +0100)]
resolved: reorder functions

Preparation to make gcrypt optional.

8 years agoMerge pull request #2487 from msekletar/bootctl-foreach-dirent
Lennart Poettering [Sun, 31 Jan 2016 13:57:20 +0000 (14:57 +0100)]
Merge pull request #2487 from msekletar/bootctl-foreach-dirent

bootctl: replace readdir() loops with FOREACH_DIRENT

8 years agobootctl: replace readdir() loops with FOREACH_DIRENT
Michal Sekletar [Sun, 31 Jan 2016 08:41:43 +0000 (09:41 +0100)]
bootctl: replace readdir() loops with FOREACH_DIRENT

8 years agoMerge pull request #2469 from keszybz/resolved-2
Lennart Poettering [Sat, 30 Jan 2016 14:04:56 +0000 (15:04 +0100)]
Merge pull request #2469 from keszybz/resolved-2

Resolved 2

8 years agoMerge pull request #2478 from grawity/fix/touch-mode
Zbigniew Jędrzejewski-Szmek [Sat, 30 Jan 2016 02:19:21 +0000 (21:19 -0500)]
Merge pull request #2478 from grawity/fix/touch-mode

basic: fix touch() creating files with 07777 mode

8 years agobasic: fix touch() creating files with 07777 mode
Mantas Mikulėnas [Fri, 29 Jan 2016 21:36:08 +0000 (23:36 +0200)]
basic: fix touch() creating files with 07777 mode

mode_t is unsigned, so MODE_INVALID < 0 can never be true.

This fixes a possible DoS where any user could fill /run by writing to
a world-writable /run/systemd/show-status.

8 years agoman: reword sentence
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2016 23:24:27 +0000 (18:24 -0500)]
man: reword sentence

8 years agoresolved: log server type when switching servers
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2016 23:24:27 +0000 (18:24 -0500)]
resolved: log server type when switching servers

I'm not defining _DNS_SERVER_TYPE_MAX/INVALID as usual in the enum,
because it wouldn't be used, and then gcc would complain that
various enums don't test for _DNS_SERVER_TYPE_MAX. It seems better
to define the macro rather than add assert_not_reached() in multiple
places.

8 years agoresolved: add macro to compare sized fields
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2016 23:23:59 +0000 (18:23 -0500)]
resolved: add macro to compare sized fields

For consistency, generic.size is renamed to generic.data_size.

nsec3.next_hashed_name comparison was missing a size check.

8 years agoresolve-host: add option to list protocols
Zbigniew Jędrzejewski-Szmek [Thu, 5 Feb 2015 02:06:36 +0000 (21:06 -0500)]
resolve-host: add option to list protocols

8 years agoresolve-host: allow specifying type as TYPEnn
Zbigniew Jędrzejewski-Szmek [Mon, 2 Feb 2015 04:12:27 +0000 (23:12 -0500)]
resolve-host: allow specifying type as TYPEnn

This mirrors the behaviour of host and makes the conversion to and from
string symmetrical.

8 years agotest-tables: ellide boring parts of sparse mappings
Zbigniew Jędrzejewski-Szmek [Mon, 2 Feb 2015 01:24:31 +0000 (20:24 -0500)]
test-tables: ellide boring parts of sparse mappings

8 years agotest-resolve-tables: new "test", useful to print mappings
Zbigniew Jędrzejewski-Szmek [Mon, 2 Feb 2015 01:12:46 +0000 (20:12 -0500)]
test-resolve-tables: new "test", useful to print mappings

8 years agoresolved: calculate and print tags for DNSKEY records
Zbigniew Jędrzejewski-Szmek [Wed, 4 Feb 2015 22:06:33 +0000 (17:06 -0500)]
resolved: calculate and print tags for DNSKEY records

8 years agoMerge pull request #2474 from poettering/doc-fix-2189
Martin Pitt [Fri, 29 Jan 2016 15:53:13 +0000 (16:53 +0100)]
Merge pull request #2474 from poettering/doc-fix-2189

man: document special considerations when mixing templated service un…

8 years agoman: document special considerations when mixing templated service units and DefaultD...
Lennart Poettering [Fri, 29 Jan 2016 15:26:55 +0000 (16:26 +0100)]
man: document special considerations when mixing templated service units and DefaultDependencies=no

Fixes #2189.

8 years agoMerge pull request #2465 from poettering/systemctl-chroot
Daniel Mack [Fri, 29 Jan 2016 15:04:03 +0000 (16:04 +0100)]
Merge pull request #2465 from poettering/systemctl-chroot

Fix for #2015

8 years agoMerge pull request #2472 from poettering/mini-fixes
Daniel Mack [Fri, 29 Jan 2016 14:51:16 +0000 (15:51 +0100)]
Merge pull request #2472 from poettering/mini-fixes

Two mini fixes

8 years agosystemctl: actually honour the try-reload-or-restart verb aabf5d4243408 promised
Lennart Poettering [Fri, 29 Jan 2016 14:17:23 +0000 (15:17 +0100)]
systemctl: actually honour the try-reload-or-restart verb aabf5d4243408 promised

The verb entry got lost in the ultimate commit.

8 years agosystemctl: make most systemctl commands NOPs in a chroot() environment
Lennart Poettering [Thu, 28 Jan 2016 18:32:26 +0000 (19:32 +0100)]
systemctl: make most systemctl commands NOPs in a chroot() environment

Fixes #2015

8 years agosystemctl: consider a chroot() environment always offline
Lennart Poettering [Thu, 28 Jan 2016 18:32:07 +0000 (19:32 +0100)]
systemctl: consider a chroot() environment always offline

8 years agobasic: when parsing verb command lines, optionally shortcut them in chroot() environments
Lennart Poettering [Thu, 28 Jan 2016 18:30:56 +0000 (19:30 +0100)]
basic: when parsing verb command lines, optionally shortcut them in chroot() environments

This adds some basic infrastructure in order to fix #2015.

8 years agoman: document which section the configuration settings of timesyncd.conf belong into
Lennart Poettering [Fri, 29 Jan 2016 13:53:05 +0000 (14:53 +0100)]
man: document which section the configuration settings of timesyncd.conf belong into

8 years agoman: actually say which section resolv.conf's setting should be placed in
Lennart Poettering [Fri, 29 Jan 2016 13:46:06 +0000 (14:46 +0100)]
man: actually say which section resolv.conf's setting should be placed in

8 years agobuild-sys: install systemd-resolve in /usr/bin
Lennart Poettering [Fri, 29 Jan 2016 13:45:41 +0000 (14:45 +0100)]
build-sys: install systemd-resolve in /usr/bin

The command has a man page now and is public, hence add it to /usr/bin.

8 years agoMerge pull request #2466 from poettering/nspawn-journal
Zbigniew Jędrzejewski-Szmek [Fri, 29 Jan 2016 00:32:48 +0000 (19:32 -0500)]
Merge pull request #2466 from poettering/nspawn-journal

Two small nspawn fixes

8 years agoMerge pull request #2464 from poettering/reload-or-try-restart
Zbigniew Jędrzejewski-Szmek [Fri, 29 Jan 2016 00:11:30 +0000 (19:11 -0500)]
Merge pull request #2464 from poettering/reload-or-try-restart

Fix for #688

8 years agoresolved: expand flags field in DNSKEY records
Zbigniew Jędrzejewski-Szmek [Tue, 3 Feb 2015 04:49:49 +0000 (23:49 -0500)]
resolved: expand flags field in DNSKEY records

8 years agoresolved: convert TLSA fields to string
Zbigniew Jędrzejewski-Szmek [Mon, 2 Feb 2015 04:50:50 +0000 (23:50 -0500)]
resolved: convert TLSA fields to string

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

8 years agoresolved: OPENPGPKEY records
Zbigniew Jędrzejewski-Szmek [Mon, 2 Feb 2015 01:54:15 +0000 (20:54 -0500)]
resolved: OPENPGPKEY records

8 years agoresolved: TLSA records
Zbigniew Jędrzejewski-Szmek [Mon, 2 Feb 2015 00:17:24 +0000 (19:17 -0500)]
resolved: TLSA records

8 years agoresolved: add alignment to base64
Zbigniew Jędrzejewski-Szmek [Mon, 4 Aug 2014 22:59:31 +0000 (18:59 -0400)]
resolved: add alignment to base64

We try to fit the lengthy key data into available space. If the other
fields take less than half of the available columns, we use align everything
in the remaining columns. Otherwise, we put everything after a newline,
indented with 8 spaces.

This is similar to dig and other tools do.

$ COLUMNS=78 ./systemd-resolve -t any .
. IN SOA   a.root-servers.net nstld.verisign-grs.com 2016012701 1800 900 604800 86400
. IN RRSIG SOA RSASHA256 0 86400 20160206170000 20160127160000 54549
        S1uhUoBAReAFi5wH/KczVDgwLb+B9Zp57dSYj9aX4XxBhKuzccIducpg0wWXhjCRAWuzY
        fQ/J2anm4+C4BLUTdlytPIemd42SUffQk2WGuuukI8e67nkrNF3WFtoeXQ4OchsyO24t2
        rxi682Zo9ViqmXZ+MSsjWKt1jdem4noaY=
. IN NS    h.root-servers.net
. IN NS    k.root-servers.net
. IN NS    e.root-servers.net
. IN NS    c.root-servers.net
. IN NS    b.root-servers.net
. IN NS    g.root-servers.net
. IN NS    d.root-servers.net
. IN NS    f.root-servers.net
. IN NS    i.root-servers.net
. IN NS    j.root-servers.net
. IN NS    m.root-servers.net
. IN NS    a.root-servers.net
. IN NS    l.root-servers.net
. IN RRSIG NS RSASHA256 0 518400 20160206170000 20160127160000 54549
        rxhmTVKUgs72G3VzL+1JRuD0nGLIrPM+ISfmUx0eYUH5wZD5XMu2X+8PfkAsEQT1dziPs
        ac+zK1YZPbNgr3yGI5H/wEbK8S7DmlvO+/I9WKTLp/Zxn3yncvnTOdjFMZxkAqHbjVOm+
        BFz7RjQuvCQlEJX4PQBFphgEnkiOnmMdI=
. IN NSEC  aaa ( NS SOA RRSIG NSEC DNSKEY )
. IN RRSIG NSEC RSASHA256 0 86400 20160206170000 20160127160000 54549
        HY49/nGkUJJP1zLmH33MIKnkNH33jQ7bsAHE9itEjvC4wfAzgq8+Oh9fjYav1R1GDeJ2Z
        HOu3Z2uDRif10R8RsmZbxyZXJs7eHui9KcAMot1U4uKCCooC/5GImf+oUDbvaraUCMQRU
        D3mUzoa0BGWfxgZEDqZ55raVFT/olEgG8=
. IN DNSKEY 257 3 RSASHA256 AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0
                            O8gcCjFFVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0
                            NfnfL2MTJRkxoXbfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL4
                            96M/QZxkjf5/Efucp2gaDX6RS6CXpoY68LsvPVjR0ZSwzz1ap
                            AzvN9dlzEheX7ICJBBtuA6G3LQpzW5hOA2hzCTMjJPJ8LbqF6
                            dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relSQageu+ipAdTTJ2
                            5AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulqQxA+Uk1
                            ihz0=
. IN DNSKEY 256 3 RSASHA256 AwEAAbr/RV0stAWYbmKOldjShp4AOQGOyY3ATI1NUpP4X1qBs
                            6lsXpc+1ABgv6zkg02IktjZrHnmD0HsElu3wqXMrT5KL1W7Sp
                            mg0Pou9WZ8QttdTKXwrVXrASsaGI2z/pLBSnK8EdzqUrTVxY4
                            TEGZtxV519isM06CCMihxTn5cfFBF
. IN RRSIG DNSKEY RSASHA256 0 172800 20160204235959 20160121000000 19036
        XYewrVdYKRDfZptAATwT+W4zng04riExV36+z04kok09W0RmOtDlQrlrwHLlD2iN/zYpg
        EqGgDF5T2xlrQdNpn+PFHhypHM7NQAgLTrwmiw6mGbV0bsZN3rhFxHwW7QVUFAvo9eNVu
        INrjm+sArwxq3DnPkmA+3K4ikKD2iiT/jT91VYr9SHFqXXURccLjI+nmaE7m31hXcirX/
        r5i3J+B4Fx4415IavSD72r7cmruocnCVjcp+ZAUKeMyW+RwigzevLz3oEcCZ4nrTpGLEj
        wFaVePYoP+rfdmfLfTdmkkm4APRJa2My3XOdGFlgNS1pW1pH4az5LapLE2vMO7p1aQ==

-- Information acquired via protocol DNS in 14.4ms.
-- Data is authenticated: no

8 years agoman: force space in cmdsynopsis
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2016 21:25:48 +0000 (16:25 -0500)]
man: force space in cmdsynopsis

Docbook renders the man page as "[OPTIONS]--type" without it.

8 years agoresolved: emit full path to file we failed to write
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2016 21:15:05 +0000 (16:15 -0500)]
resolved: emit full path to file we failed to write

Otherwise it's unclear if it's /etc/resolv.conf or some
other file that is meant.

8 years agonspawn: make sure --link-journal=host may be used twice in a row
Lennart Poettering [Thu, 28 Jan 2016 19:24:28 +0000 (20:24 +0100)]
nspawn: make sure --link-journal=host may be used twice in a row

Fixes #2186

This fixes fall-out from 574edc90066c3faeadcf4666928ed9b0ac409c75.

8 years agonspawn: make journal linking non-fatal in try and auto modes
Lennart Poettering [Thu, 28 Jan 2016 19:15:49 +0000 (20:15 +0100)]
nspawn: make journal linking non-fatal in try and auto modes

Fixes #2091

8 years agosystemctl: rename "reload-or-try-restart" verb to "try-reload-or-restart"
Lennart Poettering [Thu, 28 Jan 2016 17:57:04 +0000 (18:57 +0100)]
systemctl: rename "reload-or-try-restart" verb to "try-reload-or-restart"

But also keep the old name as (undocumented) compatibility around.

The reload-or-try-restart was documented to be a NOP if the unit is not running, since the previous commits this is
also implemented. The old name suggests that the "try" logic only applies to restarting. Fix this, by moving the "try-"
to the front, to indicate that the whole option is a NOP if the service isn't running.

8 years agosystemctl: improve message when a job fails with a JOB_INVALID state
Lennart Poettering [Thu, 28 Jan 2016 17:53:34 +0000 (18:53 +0100)]
systemctl: improve message when a job fails with a JOB_INVALID state

This result can only happen if the job was a reload job for an inactive unit. Make the error message actually say that.

8 years agocore: when propagating reload jobs, downgrade them to try-reload
Lennart Poettering [Thu, 28 Jan 2016 17:51:42 +0000 (18:51 +0100)]
core: when propagating reload jobs, downgrade them to try-reload

Otherwise we might end up generating jobs that fail immediately.

This follows the same logic that restart propagation follows.

8 years agocore: when determining system state, don't bother with JOB_TRY_RESTART
Lennart Poettering [Thu, 28 Jan 2016 17:49:59 +0000 (18:49 +0100)]
core: when determining system state, don't bother with JOB_TRY_RESTART

When we determine the current system state we check whether units like emergency.target are running or a job that
results in them being run is queued. However, this is not the case for JOB_TRY_RESTART, since that's a NOP if the unit
has not been running before. Hence, don't bother with checking for that job type.

8 years agocore: make sure "systemctl reload-or-try-restart is actually a noop if a unit is...
Lennart Poettering [Thu, 28 Jan 2016 17:48:42 +0000 (18:48 +0100)]
core: make sure "systemctl reload-or-try-restart is actually a noop if a unit is not running

This makes sure we follow the same basic logic for try-restart if we have a try-reload.

Fixes #688

8 years agoman: stop documenting legacy RedHatisms
Lennart Poettering [Thu, 28 Jan 2016 17:46:24 +0000 (18:46 +0100)]
man: stop documenting legacy RedHatisms

We generally document only the supported verbs, but not the compatibility verbs we also support, in order to keep the
documentation minimal.

8 years agoMerge pull request #2463 from poettering/machined-tty-fix
Daniel Mack [Thu, 28 Jan 2016 16:37:06 +0000 (17:37 +0100)]
Merge pull request #2463 from poettering/machined-tty-fix

Fixes for the service TTY reset logic and other stuff

8 years agobasic: getauxval(AT_RANDOM) is apparently not necessarily aligned
Lennart Poettering [Thu, 28 Jan 2016 16:00:38 +0000 (17:00 +0100)]
basic: getauxval(AT_RANDOM) is apparently not necessarily aligned

Let's make sure we read it in a way compatible with non-aligned memory.

Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812928

8 years agosystemctl: don't make up unit states, and don't eat up errors to eagerly
Lennart Poettering [Thu, 28 Jan 2016 15:43:23 +0000 (16:43 +0100)]
systemctl: don't make up unit states, and don't eat up errors to eagerly

When checking a unit's state, don't ignore errors too eagerly, but generate proper error messages. Also, don't
synthesize an "unknown" state on error, but let the operation file. If a unit file isn't loaded treat this as
"inactive" as that's effectively what it means.

8 years agosystemctl: don't mangle unit names in check_unit_generic()
Lennart Poettering [Thu, 28 Jan 2016 15:33:31 +0000 (16:33 +0100)]
systemctl: don't mangle unit names in check_unit_generic()

As it turns out all callers of check_unit_generic() already mangle unit names, or get the unit names directly from PID
1 (and hence arein normalized form anyway), hence there's no point in mangling then...

8 years agoshared: meanor clean-ups for logs-show.c
Lennart Poettering [Thu, 28 Jan 2016 15:28:01 +0000 (16:28 +0100)]
shared: meanor clean-ups for logs-show.c

Some minor simplifications. Shouldn't change codepaths.

8 years agocore: don't reset /dev/console if stdin/stdout/stderr as passed as fd in a transient...
Lennart Poettering [Thu, 28 Jan 2016 15:25:39 +0000 (16:25 +0100)]
core: don't reset /dev/console if stdin/stdout/stderr as passed as fd in a transient service

Otherwise we might end resetting /dev/console all the time when a transient service starts or stops.

Fixes #2377
Fixes #2198
Fixes #2061

8 years agodoc: improved wording in some places
Jan Engelhardt [Mon, 26 Oct 2015 15:10:17 +0000 (16:10 +0100)]
doc: improved wording in some places

Avoid "mountpoint mounted" (word repetition),
"queriable" (no match in m-w.com and dict.cc).

8 years agoman: try to repair some nonsensical paragraph
Jan Engelhardt [Thu, 5 Nov 2015 11:55:25 +0000 (12:55 +0100)]
man: try to repair some nonsensical paragraph

8 years agoman: top-align cell text for large tables
Jan Engelhardt [Mon, 2 Nov 2015 09:47:42 +0000 (10:47 +0100)]
man: top-align cell text for large tables

8 years agoman: avoid double virtualization
Jan Engelhardt [Mon, 2 Nov 2015 09:36:56 +0000 (10:36 +0100)]
man: avoid double virtualization

"VM virtualization" <=> "virtual machine virtualization", and double
virtualization is just incorrect in this context.

8 years agoMerge pull request #2455 from keszybz/man-pages
Daniel Mack [Thu, 28 Jan 2016 09:06:57 +0000 (10:06 +0100)]
Merge pull request #2455 from keszybz/man-pages

man: fix reference to an external man page

8 years agoman: fix references to a few external man pages
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jan 2016 22:56:42 +0000 (17:56 -0500)]
man: fix references to a few external man pages

Noticed in pull request #2067.

8 years agoMerge pull request #2454 from splantefeve/master
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2016 22:25:37 +0000 (17:25 -0500)]
Merge pull request #2454 from splantefeve/master

.gitignore: add test-ask-password-api

8 years ago.gitignore: add test-ask-password-api
Sylvain Plantefève [Wed, 27 Jan 2016 21:56:31 +0000 (22:56 +0100)]
.gitignore: add test-ask-password-api

8 years agoMerge branch 'pr/980'
Daniel Mack [Wed, 27 Jan 2016 16:57:49 +0000 (17:57 +0100)]
Merge branch 'pr/980'

8 years agoman: make systemctl is-enabled description match enable.
Andrei Borzenkov [Mon, 17 Aug 2015 17:28:56 +0000 (20:28 +0300)]
man: make systemctl is-enabled description match enable.

systemctl is-enabled is not limited to wants.d - it also checks for
requires.d and alias links.

8 years agoCONTRIBUTING.md: Minor typo fix
Lennart Poettering [Wed, 27 Jan 2016 15:53:11 +0000 (16:53 +0100)]
CONTRIBUTING.md: Minor typo fix

8 years agoMerge pull request #2451 from zonque/pr-2162-rebased
Lennart Poettering [Wed, 27 Jan 2016 13:25:47 +0000 (14:25 +0100)]
Merge pull request #2451 from zonque/pr-2162-rebased

utf8.[ch] et al: use char32_t and char16_t instead of int, int32_t, i…

8 years agoutf8.[ch] et al: use char32_t and char16_t instead of int, int32_t, int16_t
Shawn Landden [Sun, 13 Dec 2015 22:26:43 +0000 (14:26 -0800)]
utf8.[ch] et al: use char32_t and char16_t instead of int, int32_t, int16_t

rework C11 utf8.[ch] to use char32_t instead of uint32_t when referring
to unicode chars, to make things more expressive.

[
 @zonque:
  * rebased to current master
  * use AC_CHECK_DECLS to detect availibility of char{16,32}_t
  * make utf8_encoded_to_unichar() return int
]

8 years agoMerge pull request #2445 from poettering/various-fixes
Daniel Mack [Wed, 27 Jan 2016 12:35:18 +0000 (13:35 +0100)]
Merge pull request #2445 from poettering/various-fixes

A number of fixes

8 years agonss-resolve: also fall back to nss-dns if dbus doesn't work
Lennart Poettering [Tue, 26 Jan 2016 22:40:59 +0000 (23:40 +0100)]
nss-resolve: also fall back to nss-dns if dbus doesn't work

Fixes #1692

8 years agonss: block various signals while running NSS lookups
Lennart Poettering [Tue, 26 Jan 2016 21:34:46 +0000 (22:34 +0100)]
nss: block various signals while running NSS lookups

Let's make sure our poll() calls don't get interrupted where they shouldn't (SIGALRM, ...), but allow them to be
interrupted where they should (SIGINT, ...).

Fixes #1965

8 years agoman: document slices.target
Lennart Poettering [Tue, 26 Jan 2016 19:36:54 +0000 (20:36 +0100)]
man: document slices.target

Fixes: #2438

8 years agobasic: don't append suffixes to unit name glob expressions
Lennart Poettering [Tue, 26 Jan 2016 19:25:10 +0000 (20:25 +0100)]
basic: don't append suffixes to unit name glob expressions

When the user specifies "foo*" as unit name glob expression, we shouldn't turn this into "foo*.service". Hence: only
append a suffix if the specified string isn't a glob expression.

Fixes: #2397

8 years agoman: document that unit file globbing only operates on primary unit names
Lennart Poettering [Tue, 26 Jan 2016 18:50:04 +0000 (19:50 +0100)]
man: document that unit file globbing only operates on primary unit names

See: #2397

8 years agosystemctl: piece-meal strv extension is expensive
Lennart Poettering [Tue, 26 Jan 2016 18:49:08 +0000 (19:49 +0100)]
systemctl: piece-meal strv extension is expensive

If we have many entries to add to an strv we really should try to be smarter than constantly realloc()ing the strv
array. Instead, grow it exponentially.

8 years agotests: don't abbreviate function names needlessly
Lennart Poettering [Tue, 26 Jan 2016 18:48:29 +0000 (19:48 +0100)]
tests: don't abbreviate function names needlessly

THis is otherwise really hard to read...

8 years agomachined: add early checks for unrealistically large image/pool sizes
Lennart Poettering [Tue, 26 Jan 2016 18:02:12 +0000 (19:02 +0100)]
machined: add early checks for unrealistically large image/pool sizes

8 years agomachined: when the pool limit is set to infinity don't resize backing loopback file
Lennart Poettering [Tue, 26 Jan 2016 18:00:56 +0000 (19:00 +0100)]
machined: when the pool limit is set to infinity don't resize backing loopback file

An unlimited quota makes a lot of sense, but we really should try to propagate this onto the loopback file size, since
an infinitely sized file makes no sense.

Fixes: #2314 #2253

8 years agoMerge pull request #1975 from ssahani/vxlan2
Tom Gundersen [Wed, 27 Jan 2016 00:17:52 +0000 (01:17 +0100)]
Merge pull request #1975 from ssahani/vxlan2

networkd: Add support to configure VXLAN Port

8 years agoMerge pull request #2446 from keszybz/ask-password
Lennart Poettering [Tue, 26 Jan 2016 22:42:38 +0000 (23:42 +0100)]
Merge pull request #2446 from keszybz/ask-password

Ask password unicode fix

8 years agoask-password-api: only emit a star on valid unicode codepoint
Zbigniew Jędrzejewski-Szmek [Tue, 26 Jan 2016 22:05:38 +0000 (17:05 -0500)]
ask-password-api: only emit a star on valid unicode codepoint

https://bugzilla.redhat.com/show_bug.cgi?id=1301984

8 years agotest-ask-password-api: add a manual test for password reading
Zbigniew Jędrzejewski-Szmek [Tue, 26 Jan 2016 14:02:31 +0000 (09:02 -0500)]
test-ask-password-api: add a manual test for password reading

8 years agoMerge pull request #2306 from walyong/exec_v01
Lennart Poettering [Tue, 26 Jan 2016 20:52:30 +0000 (21:52 +0100)]
Merge pull request #2306 from walyong/exec_v01

[v1] core: resolve specifier in config_parse_exec()

8 years agoMerge pull request #2444 from phomes/resolve-compare-function
Lennart Poettering [Tue, 26 Jan 2016 19:39:33 +0000 (20:39 +0100)]
Merge pull request #2444 from phomes/resolve-compare-function

resolve: fix compare function for EtcHostItem

8 years agoresolve: fix compare function for EtcHostItem
Thomas Hindoe Paaboel Andersen [Tue, 26 Jan 2016 19:13:34 +0000 (20:13 +0100)]
resolve: fix compare function for EtcHostItem

From dd0bc0f1

8 years agoMerge pull request #2442 from samukallio/nss-resolve-fix-aliases
Lennart Poettering [Tue, 26 Jan 2016 19:27:25 +0000 (20:27 +0100)]
Merge pull request #2442 from samukallio/nss-resolve-fix-aliases

nss-resolve: fix gethostbyaddr h_aliases

8 years agonss-resolve: fix gethostbyaddr h_aliases
Samu Kallio [Tue, 26 Jan 2016 17:26:48 +0000 (19:26 +0200)]
nss-resolve: fix gethostbyaddr h_aliases

Fix the comparison to include the first alias, which will
otherwise be left as a bogus pointer.

8 years agoMerge pull request #2440 from poettering/journal-fix
Tom Gundersen [Tue, 26 Jan 2016 17:16:48 +0000 (18:16 +0100)]
Merge pull request #2440 from poettering/journal-fix

journald: minor fixes

8 years agoMerge pull request #2437 from poettering/dnssec19
Tom Gundersen [Tue, 26 Jan 2016 17:07:19 +0000 (18:07 +0100)]
Merge pull request #2437 from poettering/dnssec19

nineteenth dnssec patch

8 years agoMerge pull request #2433 from dobyrch/master
Lennart Poettering [Tue, 26 Jan 2016 15:14:11 +0000 (16:14 +0100)]
Merge pull request #2433 from dobyrch/master

zsh-completion: Escape results for `journalctl --unit`

8 years agoMerge pull request #2441 from msekletar/killing-spree-excluded-log-v3
Lennart Poettering [Tue, 26 Jan 2016 13:50:43 +0000 (14:50 +0100)]
Merge pull request #2441 from msekletar/killing-spree-excluded-log-v3

shutdown: complain if process excluded from killing spree runs of the same rootfs as PID1 (v3)

8 years agojournald: add a couple of static asserts checking logging constants
Lennart Poettering [Tue, 26 Jan 2016 12:48:57 +0000 (13:48 +0100)]
journald: add a couple of static asserts checking logging constants

Whenever we include a log level or facility in a journal string field, make sure the compiler checks for us that that's
actually the right thing to do.

8 years agojournald: fix LOG_AUTH facility in audit code
Lennart Poettering [Tue, 26 Jan 2016 12:48:32 +0000 (13:48 +0100)]
journald: fix LOG_AUTH facility in audit code

Fixes: #2304

8 years agoman: document that logind's RemoveIPC= option excepts all system users
Lennart Poettering [Tue, 26 Jan 2016 12:42:04 +0000 (13:42 +0100)]
man: document that logind's RemoveIPC= option excepts all system users

Fixes #2324.

8 years agoupdate TODO
Lennart Poettering [Tue, 26 Jan 2016 12:37:42 +0000 (13:37 +0100)]
update TODO

This gets rid of the private DNSSEC TODO and moves it in the main TODO dump site, as the DNSSEC implementation is
pretty complete now, and the remaining bits are low-priority.

8 years agoresolved: prorize rtnl and sd-network event sources
Lennart Poettering [Tue, 26 Jan 2016 12:36:33 +0000 (13:36 +0100)]
resolved: prorize rtnl and sd-network event sources

Lets make sure we always take notice of network changes before answering client requests.

This way, calls like SetLinkDNS() become race-free as the specified interface index is guarantee to have been processed
if it exists before we make changes to it.

8 years agoresolved: fix the rcode to SUCCESS if we find at least one matching RR in a DNS response
Lennart Poettering [Tue, 26 Jan 2016 12:22:12 +0000 (13:22 +0100)]
resolved: fix the rcode to SUCCESS if we find at least one matching RR in a DNS response

If we encounter NXDOMAIN, but find at least one matching RR in a response, then patch it to become SUCCESS. This should
clean up handling of CNAME/DNAMEs, and makes sure broken servers and those conforming to RFC 6604 are treated the same
way. The new behaviour opposes the logic suggested in RFC 6604, but given that some servers don't implement it
correctly, and given that in some ways the CNAME/DNAME chains will be incomplete anyway, and given that DNSSEC
generally only allows us to prove the first element of a CNAME/DNAME chain, this should simplify things for us.

8 years agoCONTRIBUTING: fix markdown layout
Lennart Poettering [Mon, 25 Jan 2016 22:48:32 +0000 (23:48 +0100)]
CONTRIBUTING: fix markdown layout

8 years agoresolved: allow configuration of routing domains in Domains=
Lennart Poettering [Mon, 25 Jan 2016 22:40:02 +0000 (23:40 +0100)]
resolved: allow configuration of routing domains in Domains=

8 years agoresolved: teach resolved the difference between "routing" and "search" domains
Lennart Poettering [Mon, 25 Jan 2016 22:19:49 +0000 (23:19 +0100)]
resolved: teach resolved the difference between "routing" and "search" domains

Following the changes to expose the "routing" and "search" domain concepts in networkd, actually make resolved use
them. It will now use routing domains exclusively for making DNS routing decisions, and use search domains additionally
for extending single-label names.

8 years agoutil: introduce fputs_with_space() and make use of it at various places
Lennart Poettering [Mon, 25 Jan 2016 21:42:36 +0000 (22:42 +0100)]
util: introduce fputs_with_space() and make use of it at various places

The call combines outputing a string with prefixing it with a space, optionally. This is useful to shorten the logic
for outputing lists of strings, that are space separated.

8 years agonetworkd: optinally use DHCP lease domain info for routing only
Lennart Poettering [Mon, 25 Jan 2016 21:27:01 +0000 (22:27 +0100)]
networkd: optinally use DHCP lease domain info for routing only

This changes the UseDomains= setting of .network files to take an optional third value "route", in addition to the
boolean values. If set, the passed domain information is used for routing rules only, but not for the search path
logic.

8 years agonetworkd: rename a few Network object properties to be more like the configuration...
Lennart Poettering [Mon, 25 Jan 2016 20:47:02 +0000 (21:47 +0100)]
networkd: rename a few Network object properties to be more like the configuration settings

All booleans called dhcp_xyz are now called ".dhcp_use_xyz", to match their respective configuration file settings. This
should clarify things a bit, in particular as there is a DHCP hostname that was previously called just ".hostname"
because ".dhcp_hostname" was already existing as a bool. Since this confusion is removed now because the bool is called
".dhcp_use_hostname", the string field is now renamed to ".dhcp_hostname".

8 years agoshared: normalize the root domain to "." rather than ""
Lennart Poettering [Mon, 25 Jan 2016 20:32:14 +0000 (21:32 +0100)]
shared: normalize the root domain to "." rather than ""

Let's make sure the root domain is normalized to ".", rather than then empty string, so that there's actually something
to see on screen. Normally, we don't append a trailing dot to normalized domain names, but do so in the one exception
of the root domain, taking inspiration from UNIX file system paths.

8 years agodhcp: make host/domain name validity checks stricter
Lennart Poettering [Mon, 25 Jan 2016 19:48:07 +0000 (20:48 +0100)]
dhcp: make host/domain name validity checks stricter

Also don't permit host/domain names that reference the root domain, and unify the codepaths for this.

8 years agonetworkd: when filtering out duplicate domain names use DNS comparison
Lennart Poettering [Mon, 25 Jan 2016 19:33:47 +0000 (20:33 +0100)]
networkd: when filtering out duplicate domain names use DNS comparison

When we collect the domain names of the various links and other sources in one ordered set, make sure to use proper DNS
name comparison to filter out duplicates.

8 years agonetworkd: use an OrderedSet instead of Set to collect link domains
Lennart Poettering [Mon, 25 Jan 2016 19:31:11 +0000 (20:31 +0100)]
networkd: use an OrderedSet instead of Set to collect link domains

For the search domain logic the order is highly relevant, hence make sure when collecting the various search domains to
add them to an ordered set, so that the order between search domains of a specific link is retained.