Commit Graph

30753 Commits

Author SHA1 Message Date
longersson fc696d52b9 Docs: Fix spelling and capitalization (#7408) 2017-11-21 14:37:16 +01:00
jobol 37ac2744cc core/exec: Restore SmackProcessLabel setting (#7378)
Smack LSM needs the capability CAP_MAC_ADMIN to allow
setting of the current Smack exec label. Consequently,
dropping capabilities must be done after changing the
current exec label.

This is only related to Smack LSM. But for clarity and
regularity, all setting of security context moved before
dropping capabilities.

See Issue 7108
2017-11-21 12:01:13 +01:00
Lennart Poettering 54c552eae6
Merge pull request #7335 from poettering/dissect-meta-info
beef up image dissection, to gather image metadata
2017-11-21 11:58:31 +01:00
Lennart Poettering 0b0c55fafd
Merge pull request #7363 from poettering/success-action
Generalize FailureAction=, and add SuccessAction=
2017-11-21 11:57:42 +01:00
Susant Sahani 8ad93cacf0 networkd: cleanup do not call link_enter_set_routes after label is set. (#6935)
Remove link_enter_set_routes after label is set.
2017-11-21 11:54:14 +01:00
Susant Sahani 762e2659b9 networkd: support incoming/outgoing device for rule matching (#7223)
Closes #7210
2017-11-21 11:51:50 +01:00
Shawn Landden 172378e01b shared: silence gcc warning (#7402)
[346/1860] Compiling C object 'src/shared/systemd-shared-235@sha/firewall-util.c.o'.
../src/shared/firewall-util.c: In function ‘entry_fill_basics’:
../src/shared/firewall-util.c:81:79: warning: logical ‘and’ of equal expressions [-Wlogical-op]
[543/1860] Compiling C object 'src/shared/systemd-shared-235@sta/firewall-util.c.o'.
../src/shared/firewall-util.c: In function ‘entry_fill_basics’:
../src/shared/firewall-util.c:81:79: warning: logical ‘and’ of equal expressions [-Wlogical-op]
2017-11-21 08:24:12 +01:00
Shawn Landden 23d37367ed NEWS: fix minor error (#7399) 2017-11-21 11:05:57 +09:00
lukas d8bd96ab54 hwdb: Add ACCEL_MOUNT_MATRIX for the Acer Aspire Switch 10 convertible
SW5-012 (#7394)
2017-11-20 20:26:38 +01:00
Zbigniew Jędrzejewski-Szmek 7624e721c8 test: fall back to /boot if bootctl -p fails (#7397)
It doesn't really matter why.
2017-11-20 20:08:11 +01:00
Susant Sahani 444b017046 networkd: configure link even if no routes have been received by dhcp (#6886)
Fixes #3752

 networkctl
IDX LINK             TYPE               OPERATIONAL SETUP
  1 lo               loopback           carrier     unmanaged
  2 eth0             ether              no-carrier  configuring
  5 host             ether              routable    configured <==========

5 links listed.
2017-11-20 19:23:34 +01:00
Lennart Poettering 8c6f6a2f91
Merge pull request #6910 from ssahani/issue-6359
networkd: For IPv6 addresses do not treat IFA_F_DEPRECATED as not ready. (Fix #6359)
2017-11-20 19:21:36 +01:00
Lennart Poettering 4ff971ac08
Merge pull request #6918 from ssahani/issue-5625
networkd: ndisc - do not stop ndisc client incase of conf error.
2017-11-20 19:20:23 +01:00
Susant Sahani e87e2b78f7 networkd: address - support for /31 IPv4 addresses (rfc3021) (#6938)
When configuring a network address with /31 using networkd, a /31 without a
broadcast specified should be present.

 A /31 which has neither a network nor a broadcast address. See
https://tools.ietf.org/html/rfc3021

Fixes #4038
2017-11-20 19:16:01 +01:00
Susant Sahani a63e5daaa3 networkd: Do not send requests to create netdevs if they exists. (#6973)
If the netdev already exists we should not send requests to
kernel to create them.

fixes #5448
2017-11-20 18:58:06 +01:00
Susant Sahani 8a9b3a23fd networkd: Set RoutingPolicyRule in link_configure (#7235)
The RoutingPolicyRules are not added when we are calling from set_address
the link->message++ and link->message-- never reaches to zero in the callback function
resulting routes are never gets added.

Closes #7200
2017-11-20 17:50:48 +01:00
Lennart Poettering 6ca7d231ed machinectl: show (some) of the new image metadata bits in "status-image" output
Let's hook it all up, and show the image metadata among the rest of the
output.
2017-11-20 16:43:15 +01:00
Lennart Poettering cf30a8c1ed machined: port machined's bus APIs to use new image metadata API
Let's rework the D-Bus APIs GetImageOSRelease() to use the new internal
metadata API, to query what it needs to know. Augment it with
GetImageHostname(), GetImageMachineID(), GetImageMachineInfo(), that
expose the other new APIS.
2017-11-20 16:43:15 +01:00
Lennart Poettering c7664c071e machine-image: add a generic API to determine metadata of any image
This adds an internal API that permits querying metadata from any type
of image, including both subvol/dir images, and raw/block images. In the
latter case we use the new dissection API we just added.
2017-11-20 16:43:15 +01:00
Lennart Poettering a1edd22e67 dissect: update dissect tool to show image metadata
Pretty straight-forward: just use the new metadata dissection API to
figure out what an image contains.
2017-11-20 16:43:15 +01:00
Lennart Poettering 3b92550417 dissect: add an API that can read various metadata bits out of a dissected image
We focus on four kinds of metadata:

1. /etc/hostname
2. /etc/machine-id
3. /etc/machine-info
4. /etc/os-release or /usr/lib/os-release

This makes dissected images nicely self-contained as we can figure out
what they are just by dissecting them.
2017-11-20 16:43:15 +01:00
Lennart Poettering b302a50d85 strv: introduce strv_free_and_replace()
it's like free_and_replace() but uses strv_free()
2017-11-20 16:43:15 +01:00
Lennart Poettering 7c78959fc2 signal-util: use a slightly less likely to conflict variable name instead of 't' 2017-11-20 16:43:15 +01:00
Lennart Poettering f35cb39ed6 hostname-util: rework read_hostname_config() a bit
First of all, let's rename it to read_etc_hostname(), to make clearer
what kind of configuration it actually reads: the file format defined in
/etc/hostname and nothing else.

Secondly: let's port this to use read_line(), i.e. the new way to read
lines from a file in a safe, bounded way.

Thirdly: let's strip leading/trailing whitespace from what we are
reading. Given that we are already pretty lenient what we read (comments
and empty lines), let's be permissive regarding whitespace too.

Fourthly: let's actually validate the hostname when reading it. So far
we tried to make it valid, but that's not always possible (for example,
we can't make an empty hostname valid, ever).
2017-11-20 16:43:15 +01:00
Lennart Poettering 9a92a97a94 update TODO 2017-11-20 16:37:22 +01:00
Lennart Poettering 24aab7936c test: add testcase for FailureAction=/SuccessAction=
it also ensures that rebooting once gets us back up. Yay!
2017-11-20 16:37:22 +01:00
Lennart Poettering e7dfbb4e74 core: introduce SuccessAction= as unit file property
SuccessAction= is similar to FailureAction= but declares what to do on
success of a unit, rather than on failure. This is useful for running
commands in qemu/nspawn images, that shall power down on completion. We
frequently see "ExecStopPost=/usr/bin/systemctl poweroff" or so in unit
files like this. Offer a simple, more declarative alternative for this.

While we are at it, hook up failure action with unit_dump() and
transient units too.
2017-11-20 16:37:22 +01:00
Lennart Poettering 53c35a766f core: generalize FailureAction= move it from service to unit
All kinds of units can fail, hence it makes sense to offer this as
generic concept for all unit types.
2017-11-20 16:37:22 +01:00
Zbigniew Jędrzejewski-Szmek 9990ea0e59
Merge pull request #7375 from poettering/readme-updates
some README updates
2017-11-20 14:46:02 +01:00
Zbigniew Jędrzejewski-Szmek 5d9adb5b60 man: fix description of --force in halt(8) (#7392)
https://bugzilla.redhat.com/show_bug.cgi?id=1449751
2017-11-20 14:27:46 +01:00
Lennart Poettering 4ff183d419
Merge pull request #7154 from keszybz/bootspec
List bootspec entries in bootctl and use the default for kexec
2017-11-20 13:06:33 +01:00
Lennart Poettering df8ca63396
Merge pull request #7387 from yuwata/fix-7370
core: load() should fail when the corresponding unit file does not exist
2017-11-20 12:51:40 +01:00
Lennart Poettering 2422bd21c8 README,sysusers: complete and order list of default udev groups we need
Let's make sure the list of default udev groups we need are ordered in
README and in the sysusers.d snippet, and both are complete.
2017-11-20 12:34:28 +01:00
Lennart Poettering 9e93f6f092 README: slightly update the section about split /usr
It's fine if /usr is actually on a separate fs. What matters is that it
is mounted early enough. Say so.
2017-11-20 12:34:28 +01:00
Lennart Poettering 01c8938e54 README: document that prefix *must* be /usr and nss-systemd is not an option
See: #7374
2017-11-20 12:30:57 +01:00
Zbigniew Jędrzejewski-Szmek 18c8db140f meson: add -Wimplicit-fallthrough=3 to compilation options (#7393)
At some point before gcc-7 was released, -Wimplicit-fallthrough=3 was included
in -Wextra. The documentation for gcc-7.2.1-2.fc27.x86_64 still says that, but
empirical testing shows that it's not. The documentation also misstates that
-Wimplicit-fallthrough is equivalent to -Wimplicit-fallthrough=3.

Let's add -Wimplicit-fallthrough=3 explicitly to get the warnings if we regress.

Prompted by #7389.
2017-11-20 12:14:47 +01:00
Zbigniew Jędrzejewski-Szmek f9753b0c79
Merge pull request #7373 from poettering/analyze-calendar
add nifty little "systemd-analyze calendar" command
2017-11-20 11:25:55 +01:00
Lennart Poettering 021723c63e systemctl: elapsation → elapse 2017-11-20 10:57:41 +01:00
Lennart Poettering 4154ce8a85 update TODO 2017-11-20 10:57:41 +01:00
Lennart Poettering 6d86f4bd11 analyze: add new "calendar" command
This little new command can parse, validate, normalize calendar events,
and calculate when they will elapse next. This should be useful for
anyone writing calendar events and who'd like to validate the expression
before running them as timer units.
2017-11-20 10:57:41 +01:00
John Lin e79eabdb1b man: Requires= stops this unit when dependencies get deactivated (#7391)
Fixes: #7372
2017-11-20 10:55:52 +01:00
Lennart Poettering 9a9a4f10e9 util: add new helper in_utc_timezone()
As the name suggests it checks whether we are running in an UTC
timezone.
2017-11-20 10:53:26 +01:00
Lennart Poettering 7c123d49fc calendarspec: rework destructor to return its own type
Let's make it more alike most of our other destructors.
2017-11-20 10:34:43 +01:00
Zbigniew Jędrzejewski-Szmek 86ea8d70fc
meson: bump required meson version to 0.41 (#7385)
We need data_dirs argument for i18n.merge_file, added in 0.40.1-11-g82492f5d76.
2017-11-20 08:08:43 +01:00
Yu Watanabe 3000f85014 core/swap: load() should fail when neither of corresponding unit file nor /proc/swap entry does not exist
It is not necessary to label as loaded to a swap unit when neither of
corresponding unit file nor entry in /proc/swap does not exist.
This makes swap_load() to fail such a case.

Partially fixes #7370.
2017-11-20 09:35:35 +09:00
Yu Watanabe 4a78b63780 core/automount: load() should fail when the unit file does not exist
It is not necessary to label as loaded to automount unit when its unit
file does not exist. So, let's make automount_load() to fail when the
unit file does not exist.

Partially fixes #7370.
2017-11-20 09:35:30 +09:00
Lennart Poettering 0e74bad141
Merge pull request #7376 from keszybz/simplify-root-options
Simplify root configuration options
2017-11-19 19:50:03 +01:00
Lennart Poettering 0133d5553a
Merge pull request #7198 from poettering/stdin-stdout
Add StandardInput=data, StandardInput=file:... and more
2017-11-19 19:49:11 +01:00
Lennart Poettering 0b252fc0be
Merge pull request #7379 from yuwata/follow-up-7309
networkd: small fixes
2017-11-19 19:47:24 +01:00
Lennart Poettering 3219f05c1d
Merge pull request #7386 from keszybz/spdx
Add some missing license headers and add SPDX identifiers
2017-11-19 19:46:52 +01:00