]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 years agokillall: update reference to root storage daemon interface docs 14557/head
Lennart Poettering [Mon, 13 Jan 2020 17:53:46 +0000 (18:53 +0100)] 
killall: update reference to root storage daemon interface docs

5 years agodocs: convert root storage daemon doc to markdown
Lennart Poettering [Mon, 13 Jan 2020 17:33:18 +0000 (18:33 +0100)] 
docs: convert root storage daemon doc to markdown

Import from:

https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/

5 years agoMerge pull request #14400 from keszybz/alias-check
Lennart Poettering [Mon, 13 Jan 2020 17:03:13 +0000 (18:03 +0100)] 
Merge pull request #14400 from keszybz/alias-check

Alias check rework

5 years agoMerge pull request #14381 from keszybz/ifindex-cleanup
Lennart Poettering [Mon, 13 Jan 2020 16:57:59 +0000 (17:57 +0100)] 
Merge pull request #14381 from keszybz/ifindex-cleanup

Resolve alternative names

5 years agoMerge pull request #11199 from dargad/restore-pam-setcred
Lennart Poettering [Mon, 13 Jan 2020 16:44:34 +0000 (17:44 +0100)] 
Merge pull request #11199 from dargad/restore-pam-setcred

Restore call to pam_setcred

5 years agoMerge pull request #14293 from keur/systemctl_with_dependencies
Lennart Poettering [Mon, 13 Jan 2020 16:42:55 +0000 (17:42 +0100)] 
Merge pull request #14293 from keur/systemctl_with_dependencies

systemctl: Add --with-dependencies switch

5 years agohwdb: Entry for Lenovo Ideapad 310S-14ISK Alps Touchpad
Zeyu DONG [Fri, 10 Jan 2020 12:11:48 +0000 (20:11 +0800)] 
hwdb: Entry for Lenovo Ideapad 310S-14ISK Alps Touchpad

Add the resolution and range information for Lenovo Ideapad 310S-14ISK Alps touchpad. It provides information for the test case of libinput for Alps devices.

5 years agojournalctl: Correctly handle combination of --reverse and --lines (fixes #1596)
Timo Schlüßler [Mon, 13 Jan 2020 09:26:58 +0000 (09:26 +0000)] 
journalctl: Correctly handle combination of --reverse and --lines (fixes #1596)

5 years agojournalctl: Correctly handle --show-cursor in combination with --until or --since...
Timo Schlüßler [Mon, 13 Jan 2020 09:09:45 +0000 (09:09 +0000)] 
journalctl: Correctly handle --show-cursor in combination with --until or --since and --reverse

5 years agoMerge pull request #14532 from poettering/namespace-dynamic-user-fix
Lennart Poettering [Mon, 13 Jan 2020 15:47:15 +0000 (16:47 +0100)] 
Merge pull request #14532 from poettering/namespace-dynamic-user-fix

Make DynamicUser=1 work in a userns container

5 years agoMerge pull request #14553 from poettering/man-mkdir
Zbigniew Jędrzejewski-Szmek [Mon, 13 Jan 2020 14:35:54 +0000 (15:35 +0100)] 
Merge pull request #14553 from poettering/man-mkdir

man: small man page fixes

5 years agoMerge pull request #14549 from keszybz/portability-and-stability
Lennart Poettering [Mon, 13 Jan 2020 10:45:48 +0000 (11:45 +0100)] 
Merge pull request #14549 from keszybz/portability-and-stability

Portability and stability

5 years agoman: we support bind mounting regular files too 14553/head
Lennart Poettering [Mon, 13 Jan 2020 10:23:14 +0000 (11:23 +0100)] 
man: we support bind mounting regular files too

Let's be precise here: we accept non-directories here too, even though
we create things as directories if we find the Where= not to exist.

5 years agoman: document that we mkdir() on What= in .mount units too
Lennart Poettering [Mon, 13 Jan 2020 10:22:11 +0000 (11:22 +0100)] 
man: document that we mkdir() on What= in .mount units too

As suggested here:

https://lists.freedesktop.org/archives/systemd-devel/2020-January/043914.html

5 years agotest: Add tests for gid list ops 11199/head
Dariusz Gadomski [Wed, 8 Jan 2020 15:25:15 +0000 (16:25 +0100)] 
test: Add tests for gid list ops

5 years agoexecute: Detect groups added by PAM and merge them with supplementary groups
Dariusz Gadomski [Wed, 8 Jan 2020 15:24:45 +0000 (16:24 +0100)] 
execute: Detect groups added by PAM and merge them with supplementary groups

5 years agoexecute: Restore call to pam_setcred
Dariusz Gadomski [Wed, 8 Jan 2020 15:24:11 +0000 (16:24 +0100)] 
execute: Restore call to pam_setcred

5 years agouser-util: Add helper functions for gid lists operations
Dariusz Gadomski [Wed, 8 Jan 2020 15:22:29 +0000 (16:22 +0100)] 
user-util: Add helper functions for gid lists operations

5 years agodocs: say that various cli progs are independent of pid1 14549/head
Zbigniew Jędrzejewski-Szmek [Sun, 12 Jan 2020 18:03:32 +0000 (19:03 +0100)] 
docs: say that various cli progs are independent of pid1

5 years agodocs: say that dbus api is stable (but list various caveats)
Zbigniew Jędrzejewski-Szmek [Sun, 12 Jan 2020 17:32:40 +0000 (18:32 +0100)] 
docs: say that dbus api is stable (but list various caveats)

I removed the part about sysv compat, because that has already been removed and
we don't make any use of conditional dbus interfaces afaict.

5 years agodocs: say that all documented programs in $PATH are stable
Zbigniew Jędrzejewski-Szmek [Sun, 12 Jan 2020 17:17:50 +0000 (18:17 +0100)] 
docs: say that all documented programs in $PATH are stable

5 years agodocs: import "interface stability promise"
Zbigniew Jędrzejewski-Szmek [Sat, 11 Jan 2020 18:34:29 +0000 (19:34 +0100)] 
docs: import "interface stability promise"

In the wiki, this was a separate page. I don't think this split is useful,
since the information about what is stable and what not seems randomly split
between the two pages.

Links are adjusted for our own pages. Some external links to gentoo and other
projects seem to be broken, but it's a chore to fix them.

5 years agonetworkctl: break long line 14381/head
Zbigniew Jędrzejewski-Szmek [Sat, 11 Jan 2020 11:36:21 +0000 (12:36 +0100)] 
networkctl: break long line

5 years agomachinectl: reduce scope of iterator variables
Zbigniew Jędrzejewski-Szmek [Sat, 11 Jan 2020 11:33:24 +0000 (12:33 +0100)] 
machinectl: reduce scope of iterator variables

5 years agoresolvectl: minor optimizations to allocate less
Zbigniew Jędrzejewski-Szmek [Sat, 11 Jan 2020 10:37:26 +0000 (11:37 +0100)] 
resolvectl: minor optimizations to allocate less

5 years agoResolve alternative ifnames wherever we would resolve an interface name
Zbigniew Jędrzejewski-Szmek [Sat, 11 Jan 2020 10:21:01 +0000 (11:21 +0100)] 
Resolve alternative ifnames wherever we would resolve an interface name

To keep the names manageable, "ifname_or_ifindex" is replaced by "interface".

5 years agoutil-lib: add function to resolve "alternative" names
Zbigniew Jędrzejewski-Szmek [Fri, 10 Jan 2020 20:18:31 +0000 (21:18 +0100)] 
util-lib: add function to resolve "alternative" names

Calls to if_nametoindex() are expected to use resolve_ifname() instead.

5 years agoman: XxxRate= are in bps
Yu Watanabe [Sun, 12 Jan 2020 07:01:25 +0000 (16:01 +0900)] 
man: XxxRate= are in bps

5 years agodocs/stability: relax the stance on accepting patches a bit
Zbigniew Jędrzejewski-Szmek [Sat, 11 Jan 2020 18:20:35 +0000 (19:20 +0100)] 
docs/stability: relax the stance on accepting patches a bit

Instead of saying that patches for portability are not accepted, say that this
is decided case-by-case. This is what happens in practice, and we tend to
discuss each patch on its own merits.

Some sentences are reworded a bit where they sound awkward.

5 years agodocs: import stability chart from wiki
Zbigniew Jędrzejewski-Szmek [Sat, 11 Jan 2020 17:47:26 +0000 (18:47 +0100)] 
docs: import stability chart from wiki

5 years agoutil-lib: move things that parse ifnames to shared/
Zbigniew Jędrzejewski-Szmek [Fri, 10 Jan 2020 16:22:37 +0000 (17:22 +0100)] 
util-lib: move things that parse ifnames to shared/

In subsequent commits, calls to if_nametoindex() will be replaced by a wrapper
that falls back to alternative name resolution over netlink. netlink support
requires libsystemd (for sd-netlink), and we don't want to add any functions
that require netlink in basic/. So stuff that calls if_nametoindex() for user
supplied interface names, and everything that depends on that, needs to be
moved.

5 years agobasic/socket-util: indent for clarity
Zbigniew Jędrzejewski-Szmek [Fri, 10 Jan 2020 15:51:29 +0000 (16:51 +0100)] 
basic/socket-util: indent for clarity

5 years agosd-netlink: do not require rtnl pointer to be passed
Zbigniew Jędrzejewski-Szmek [Fri, 10 Jan 2020 15:32:27 +0000 (16:32 +0100)] 
sd-netlink: do not require rtnl pointer to be passed

5 years agonetworkctl: define a helper for interface name resolution
Zbigniew Jędrzejewski-Szmek [Wed, 18 Dec 2019 13:18:34 +0000 (14:18 +0100)] 
networkctl: define a helper for interface name resolution

5 years agotimedatectl: drop ifindex output parameter too
Zbigniew Jędrzejewski-Szmek [Wed, 18 Dec 2019 12:57:01 +0000 (13:57 +0100)] 
timedatectl: drop ifindex output parameter too

5 years agotree-wide: make parse_ifindex simply return the index
Zbigniew Jędrzejewski-Szmek [Wed, 18 Dec 2019 12:54:13 +0000 (13:54 +0100)] 
tree-wide: make parse_ifindex simply return the index

We don't need a seperate output parameter that is of type int.  glibc() says
that the type is "unsigned", but the kernel thinks it's "int".  And the
"alternative names" interface also uses ints. So let's standarize on ints,
since it's clearly not realisitic to have interface numbers in the upper half
of unsigned int range.

5 years agonspawn: Correct "container" to "host" MAC setting message
rhn [Fri, 10 Jan 2020 23:08:00 +0000 (23:08 +0000)] 
nspawn: Correct "container" to "host" MAC setting message

5 years agoMerge pull request #14533 from poettering/swap-prio-fixes
Lennart Poettering [Fri, 10 Jan 2020 16:06:16 +0000 (17:06 +0100)] 
Merge pull request #14533 from poettering/swap-prio-fixes

Fix Priority= parsing in .swap units

5 years agoMerge pull request #14508 from poettering/namespace-ro-fix
Lennart Poettering [Fri, 10 Jan 2020 16:03:01 +0000 (17:03 +0100)] 
Merge pull request #14508 from poettering/namespace-ro-fix

core: be nicer to read-only images

5 years agoMerge pull request #14538 from yuwata/xyzctl-full
Lennart Poettering [Fri, 10 Jan 2020 15:40:31 +0000 (16:40 +0100)] 
Merge pull request #14538 from yuwata/xyzctl-full

use table_set_width(table, 0) if --full is specified

5 years agoman: document alias rules and aliases dropin loading 14400/head
Zbigniew Jędrzejewski-Szmek [Thu, 9 Jan 2020 11:38:18 +0000 (12:38 +0100)] 
man: document alias rules and aliases dropin loading

5 years agocore,install: allow one more case of "instance propagation"
Zbigniew Jędrzejewski-Szmek [Sat, 21 Dec 2019 15:09:35 +0000 (16:09 +0100)] 
core,install: allow one more case of "instance propagation"

If we have a template unit template@.service, it should be allowed to specify a
dependency on a unit without an instance, bar@.service. When the unit is created,
the instance will be propagated into the target, so template@inst.service will
depend on bar@inst.service.

This commit changes unit_dependency_name_compatible(), which makes the manager
accept links like that, and unit_file_verify_alias(), so that the installation
function will agree to create a symlink like that, and finally the tests are
adjusted to pass.

5 years agoshared/install: rework alias check and add test
Zbigniew Jędrzejewski-Szmek [Thu, 19 Dec 2019 15:53:12 +0000 (16:53 +0100)] 
shared/install: rework alias check and add test

This mostly reuses existing checkers used by pid1, so handling of aliases
should be consistent. Hopefully, with the test it'll be clearer what it
happening.

Support for .wants/.requires "aliases" is restored. Those are still used in the
wild quite a bit, so we need to support them.

See https://github.com/systemd/systemd/pull/13119 for a discussion of aliases
with an instance that point to a different template: this is allowed.

5 years agoshared/unit-file: expose function to check .wants/.requires symlink validity
Zbigniew Jędrzejewski-Szmek [Fri, 20 Dec 2019 18:12:34 +0000 (19:12 +0100)] 
shared/unit-file: expose function to check .wants/.requires symlink validity

No functional change.

5 years agohwdb: make comment more precise
Zbigniew Jędrzejewski-Szmek [Thu, 19 Dec 2019 09:15:08 +0000 (10:15 +0100)] 
hwdb: make comment more precise

Based on https://github.com/systemd/systemd/pull/14296#issuecomment-567159538.

5 years agomachinectl: do not truncate addresses when --full is specified 14538/head
Yu Watanabe [Fri, 10 Jan 2020 10:17:26 +0000 (19:17 +0900)] 
machinectl: do not truncate addresses when --full is specified

5 years agotree-wide: use table_log_add_error()
Yu Watanabe [Fri, 10 Jan 2020 09:23:24 +0000 (18:23 +0900)] 
tree-wide: use table_log_add_error()

5 years agoportablectl: optimize table creation
Yu Watanabe [Fri, 10 Jan 2020 09:23:23 +0000 (18:23 +0900)] 
portablectl: optimize table creation

5 years agomachinectl: optimize table creation
Yu Watanabe [Fri, 10 Jan 2020 09:23:22 +0000 (18:23 +0900)] 
machinectl: optimize table creation

5 years agoanalyze: optimize table creation by using table_add_many()
Yu Watanabe [Fri, 10 Jan 2020 09:23:21 +0000 (18:23 +0900)] 
analyze: optimize table creation by using table_add_many()

5 years agoformat-table: add table_log_add_error()
Yu Watanabe [Fri, 10 Jan 2020 09:23:20 +0000 (18:23 +0900)] 
format-table: add table_log_add_error()

5 years agoinitctl: (void)ify epoll_ctl()
Anita Zhang [Fri, 10 Jan 2020 08:29:11 +0000 (00:29 -0800)] 
initctl: (void)ify epoll_ctl()
CID 996298

5 years agoMerge pull request #14534 from poettering/cgroup-sibling-fix
Anita Zhang [Fri, 10 Jan 2020 07:57:39 +0000 (23:57 -0800)] 
Merge pull request #14534 from poettering/cgroup-sibling-fix

core: fix re-realization of cgroup siblings

5 years agoman: Document systemctl --with-dependencies switch 14293/head
Kevin Kuehler [Mon, 9 Dec 2019 09:40:47 +0000 (01:40 -0800)] 
man: Document systemctl --with-dependencies switch

5 years agosystemctl: Add --with-dependencies flag
Kevin Kuehler [Sun, 8 Dec 2019 23:23:27 +0000 (15:23 -0800)] 
systemctl: Add --with-dependencies flag

Will print a unit and all of its dependencies. Works with cat, status,
list-units, and list-unit-files. This flag can also be used in conjunction
with --reverse, --before, and --after.

We also vastly simplify the list_dependencies_get_dependencies logic.
Instead of using 5 strvs and merging them into one, use one strv and
have the bus append all the map values to it.

Fixes #9273

5 years agoMerge pull request #13927 from ddstreet/ll_no
Yu Watanabe [Fri, 10 Jan 2020 06:44:44 +0000 (15:44 +0900)] 
Merge pull request #13927 from ddstreet/ll_no

networkd: set addr_gen_mode and check for tentative ipv6ll before dro…

5 years agobash-completion: do not ellipsize machine name
Yu Watanabe [Fri, 10 Jan 2020 03:29:02 +0000 (12:29 +0900)] 
bash-completion: do not ellipsize machine name

5 years agomachinectl: do not ellipsize table when --full is specified
Yu Watanabe [Fri, 10 Jan 2020 03:24:51 +0000 (12:24 +0900)] 
machinectl: do not ellipsize table when --full is specified

5 years agobash-completion: busctrl: support --full command line option
Yu Watanabe [Fri, 10 Jan 2020 03:22:08 +0000 (12:22 +0900)] 
bash-completion: busctrl: support --full command line option

5 years agobusctl: introduce --full command line option
Yu Watanabe [Fri, 10 Jan 2020 03:19:47 +0000 (12:19 +0900)] 
busctl: introduce --full command line option

5 years agobash-completion: networkctl: do not show ellipsized link name
Yu Watanabe [Fri, 10 Jan 2020 03:13:12 +0000 (12:13 +0900)] 
bash-completion: networkctl: do not show ellipsized link name

5 years agonetworkctl: set table width 0 when --full is specified
Yu Watanabe [Fri, 10 Jan 2020 03:12:00 +0000 (12:12 +0900)] 
networkctl: set table width 0 when --full is specified

5 years agosystemd-mount: add --full command line option
Yu Watanabe [Fri, 10 Jan 2020 03:07:28 +0000 (12:07 +0900)] 
systemd-mount: add --full command line option

5 years agoformat-table: allow forcing arbitrary width tables
Lennart Poettering [Thu, 9 Jan 2020 17:24:00 +0000 (18:24 +0100)] 
format-table: allow forcing arbitrary width tables

Useful for implementing systemctl's --full.

See #14470

5 years agoMerge pull request #14527 from poettering/socket-state-fix
Anita Zhang [Fri, 10 Jan 2020 01:10:48 +0000 (17:10 -0800)] 
Merge pull request #14527 from poettering/socket-state-fix

core: propagate service state to socket in more load states

5 years agotest-network: simplify wait_online() by calling wait_operstate() 13927/head
Dan Streetman [Wed, 8 Jan 2020 12:32:19 +0000 (07:32 -0500)] 
test-network: simplify wait_online() by calling wait_operstate()

The wait_operstate() function now rechecks the condition for a timeout,
so the wait_online() function can simply call it to check for the
setup_state.

5 years agotest-network: convert wait_operstate() to recheck condition for timeout seconds
Dan Streetman [Wed, 8 Jan 2020 12:28:29 +0000 (07:28 -0500)] 
test-network: convert wait_operstate() to recheck condition for timeout seconds

Failing after a single check leads to extra sleeps scattered through
test cases, and can also lead to false failures.  Instead perform a
recheck for a number of seconds until the state matches, and fail only
if the timeout is exceeded.

This allows removing all the manual sleeps in the testcases.

5 years agotest-network: rename check_operstate() to wait_operstate()
Dan Streetman [Wed, 8 Jan 2020 12:25:16 +0000 (07:25 -0500)] 
test-network: rename check_operstate() to wait_operstate()

Rename only, no functional change; this makes following patches easier
to read.

5 years agonetwork: drop foreign config after addr_gen_mode has been set
Dan Streetman [Mon, 6 Jan 2020 21:35:28 +0000 (16:35 -0500)] 
network: drop foreign config after addr_gen_mode has been set

Interfaces may come up at any time, even during our initialization of
them, for various reasons; e.g. the kernel will raise VLAN when its
parent is raised; or we will raise an interface if configured with
BindCarrier and its associated interfaces come up.

When LinkLocalAddressing has been disabled for ipv6, we disable
addr_gen_mode in the kernel, so it will not automatically create a
ipv6ll address when the interface is raised.  However, we currently
drop all foreign addresses before disabling addr_gen_mode.

If the link has been up for a long time, then its kernel-created ipv6ll
address will be correctly dropped.  If the link is down, and stays
down until we raise it after finishing configuration, the addr_gen_mode
setting will be disabled when the interface is raised and the kernel
will not create any ipv6ll address.

However, if the interface is raised after dropping foreign config,
but before we have disabled addr_gen_mode, the kernel will create a
ipv6ll tentative address that will eventually finish DAD and become a
working ipv6ll address, even though we have been configured to disable
ipv6ll.

Moving our call to drop foreign addresses to after we have successfully
set addr_gen_mode closes this window; after we disable addr_gen_mode,
we can safely remove foreign ipv6ll addresses (including tentative ones)
and be sure that the kernel will not create any more.

Fixes: #13882.
5 years agonetwork: if ipv6ll is disabled, enumerate tentative ipv6 addrs before dropping foreig...
Dan Streetman [Sat, 4 Jan 2020 23:41:18 +0000 (18:41 -0500)] 
network: if ipv6ll is disabled, enumerate tentative ipv6 addrs before dropping foreign addrs

The kernel will create an ipv6ll tentative address immediately when an
interface is raised if addr_gen_mode is not disabled; and, the kernel does
not notify netlink listeners about any tentative addresses.  So it's
possible for an interface to contain tentative ipv6 link-local address(es)
that networkd doesn't know about when all foreign addresses are dropped.

In this case, networkd is later notified about the new ipv6ll address(es)
after they finish DAD and are no longer tentative; but since that's after
networkd has already dropped foreign addresses, they are incorrectly left
on the interface.

5 years agonetwork: add link->setting_genmode flag
Dan Streetman [Thu, 19 Dec 2019 18:17:45 +0000 (13:17 -0500)] 
network: add link->setting_genmode flag

Similar to the link->setting_mtu flag, this delays continued configuration
until after the genmode has been successfully set; this is important
because we do not want networkd to raise the interface before the genmode
has been set, as if we're disabling the genmode, raising the interface
before we have successfully disabled the genmode will result in the kernel
creating a ipv6ll address, even though we don't want that.

5 years agonetwork: rename linux_configure_after_setting_mtu() to linux_configure_continue()
Dan Streetman [Thu, 19 Dec 2019 18:14:42 +0000 (13:14 -0500)] 
network: rename linux_configure_after_setting_mtu() to linux_configure_continue()

This is a simple rename to make the function name more generic;
the next commit expands its usage to more than only the mtu handler.

5 years agoman: describe "symlink" and "systemctl link" explicitly in UNIT FILE LOAD PATH
HATAYAMA Daisuke [Wed, 18 Dec 2019 03:01:42 +0000 (22:01 -0500)] 
man: describe "symlink" and "systemctl link" explicitly in UNIT FILE LOAD PATH

There are sometimes users who put unit files in a location that is inaccessible
when systemd starts although they are not found and thus not started because
the corresponding mount units have not activated yet.

There is already a warning for such issue in man 8 systemctl:

     link PATH...
         ...<snip>...
         The file system where
         the linked unit files are located must be accessible
         when systemd is started (e.g. anything underneath /home
         or /var is not allowed, unless those directories are
         located on the root file system).

However, it looks that it's difficult to find the warning because introductory
users typically doesn't know systemctl link.

Although there is a description in UNIT FILE LOAD PATH pointing to systemctl
link, symlink is now not explicitly mentioned there and thus users doesn't
easily get aware of they should read it.

To deal with this, let's describe "symlink" and "systemctl link" more
explicitly in UNIT FILE LOAD PATH.

5 years agocore: fix re-realization of cgroup siblings 14534/head
Lennart Poettering [Thu, 9 Jan 2020 16:30:31 +0000 (17:30 +0100)] 
core: fix re-realization of cgroup siblings

This is a fix-up for eef85c4a3f8054d29383a176f6cebd1ef3a15b9a which
broke this.

Tracked down by @w-simon

Fixes: #14453
5 years agocore: set error value correctly 14533/head
Lennart Poettering [Thu, 9 Jan 2020 16:04:25 +0000 (17:04 +0100)] 
core: set error value correctly

5 years agocore: use unit-based logging instead of generic logging where appropriate
Lennart Poettering [Thu, 9 Jan 2020 16:03:57 +0000 (17:03 +0100)] 
core: use unit-based logging instead of generic logging where appropriate

5 years agocore: initialize priority_set when parsing swap unit files
Lennart Poettering [Thu, 9 Jan 2020 16:02:56 +0000 (17:02 +0100)] 
core: initialize priority_set when parsing swap unit files

Fixes: #14524
5 years agocore: no need to initialize swap structure fields if all zeroes anyway
Lennart Poettering [Thu, 9 Jan 2020 16:01:46 +0000 (17:01 +0100)] 
core: no need to initialize swap structure fields if all zeroes anyway

5 years agocore: expose swap priority value via dbus only if it is set
Lennart Poettering [Thu, 9 Jan 2020 16:01:14 +0000 (17:01 +0100)] 
core: expose swap priority value via dbus only if it is set

5 years agoMerge pull request #14525 from yuwata/mount-use-format-table
Lennart Poettering [Thu, 9 Jan 2020 14:47:24 +0000 (15:47 +0100)] 
Merge pull request #14525 from yuwata/mount-use-format-table

systemd-mount: use format-table.[ch]

5 years agobash-completion: networkctl: support --full and --lines
Yu Watanabe [Thu, 9 Jan 2020 11:21:28 +0000 (20:21 +0900)] 
bash-completion: networkctl: support --full and --lines

5 years agocore: be more restrictive on the dependency types we allow to be created transiently
Lennart Poettering [Thu, 9 Jan 2020 11:01:45 +0000 (12:01 +0100)] 
core: be more restrictive on the dependency types we allow to be created transiently

We should allow the ones that the [Unit] section of regular unit files
may accet, but no other, in particular not the internal deps we
synthesize as reverse of explicitly configured ones, such was WantedBy=.

Fixes: #14251
5 years agotimedatectl: use format-table.[ch]
Yu Watanabe [Thu, 9 Jan 2020 06:41:21 +0000 (15:41 +0900)] 
timedatectl: use format-table.[ch]

5 years agocore: make sure we use the correct mount flag when re-mounting bind mounts 14532/head
Lennart Poettering [Thu, 9 Jan 2020 14:06:06 +0000 (15:06 +0100)] 
core: make sure we use the correct mount flag when re-mounting bind mounts

When in a userns environment we cannot take away per-mount point flags
set on a mount point that was passed to us. Hence we need to be careful
to always check the actual mount flags in place and manipulate only
those flags of them that we actually want to change and not reset more
as side-effect.

We mostly got this right already in
bind_remount_recursive_with_mountinfo(), but didn't in the simpler
bind_remount_one_with_mountinfo(). Catch up.

(The old code assumed that the MountEntry.flags field contained the
right flag settings, but it actually doesn't for new mounts we just
established as for those mount() establishes the initial flags for us,
and we have to read them back to figure out which ones the kernel
picked.)

Fixes: #13622
5 years agomount-util: line break overly long function prototypes
Lennart Poettering [Thu, 9 Jan 2020 14:05:55 +0000 (15:05 +0100)] 
mount-util: line break overly long function prototypes

5 years agomount-util: clean up get_mount_flags()
Lennart Poettering [Thu, 9 Jan 2020 13:59:41 +0000 (14:59 +0100)] 
mount-util: clean up get_mount_flags()

This cleans up the function in multiple ways:

- change order of parameters to follow our usualy system of putting
  return parameters last
- rename return parameter "ret" as we usually do
- don't initialize local variables we override immediately anyway
- downgrade log messages to LOG_DEBUG (since we don't log about any
  other errors here above LOG_DEBUG, as this is mostly an "API"-style
  function)
- handle that mnt_fs_get_vfs_options() may return NULL (according to
  docs)
- manually map the ST_xyz to MS_xyz flags on statvfs(), because while
  they are mostly the same, they aren't entirely the same, MS_RELATIME and
  ST_RELATIME are defined differently (sad!)

5 years agomount-util: don't mask away MS_RDONLY twice
Lennart Poettering [Thu, 9 Jan 2020 13:55:15 +0000 (14:55 +0100)] 
mount-util: don't mask away MS_RDONLY twice

We have the flags mask for that, and if callers really wanted us to mask
this away, then they should pass the correct mask.

5 years agomount-util: rename cleaned → simplified, because that's what we actually did here
Lennart Poettering [Thu, 9 Jan 2020 13:53:36 +0000 (14:53 +0100)] 
mount-util: rename cleaned → simplified, because that's what we actually did here

5 years agosystemd-mount: add --no-legend command line option 14525/head
Yu Watanabe [Thu, 9 Jan 2020 05:49:11 +0000 (14:49 +0900)] 
systemd-mount: add --no-legend command line option

5 years agosystemd-mount: use format-table.[ch]
Yu Watanabe [Thu, 9 Jan 2020 05:39:35 +0000 (14:39 +0900)] 
systemd-mount: use format-table.[ch]

5 years agoformat-table: introduce TABLE_PATH
Yu Watanabe [Thu, 9 Jan 2020 11:14:30 +0000 (20:14 +0900)] 
format-table: introduce TABLE_PATH

5 years agocore: propagate service state to socket in more load states 14527/head
Lennart Poettering [Thu, 9 Jan 2020 10:51:40 +0000 (11:51 +0100)] 
core: propagate service state to socket in more load states

It makes sense to filter state changes for some load states that
shouldn't happen, but the common cases should be accepted, because they
might happen during runtime when "systemctl daemon-reload" is issued and
unit files changed state in between. Otherwise we lose events.

Fixes: #4708
5 years agoudev: don't import parent ID_FS_ data on partitions
Thomas Schmitt [Mon, 6 Jan 2020 07:10:32 +0000 (15:10 +0800)] 
udev: don't import parent ID_FS_ data on partitions

When probing partitions, we inherit important information from the parent
disk device such as ID_MODEL, and usage of such properties is seen to
be acceptable and well established.

However, we need to exclude filesystem information from the properties
that get inherited. Information about the device content should not be
passed on in this way.

For example, Linux distro install media commonly uses an ISO filesystem
plus a partition table. The ISO filesystem is detected on the main disk
device, but we should not pass down those details to the partitions,
some or all of which may be pointing at storage areas completely distinct
from the ISO filesystem.

This is particularly problematic when adding new partitions on media
set up in this way (since the new partitions are then reported to contain
the parent device's ISO filesystem), or when dealing with more unusual
hybrid ISO layouts. The inaccuracy of information here inversely affects
users of blkid and udev's persistent storage symlinks.

Exclude ID_FS_* properties from the inheritance chain to avoid these
problems.

Fixes: #14408
5 years agocore: when we cannot open an image file for write, try read-only 14508/head
Lennart Poettering [Tue, 7 Jan 2020 15:56:05 +0000 (16:56 +0100)] 
core: when we cannot open an image file for write, try read-only

Closes: #14442
5 years agonamespace: tweak checks whether we can mount image read-only
Lennart Poettering [Tue, 7 Jan 2020 15:25:11 +0000 (16:25 +0100)] 
namespace: tweak checks whether we can mount image read-only

So far we set up a loopback file read-only iff ProtectSystem= and
ProtectHome= both where set to values that mark these dirs read-only.
Let's extend that and also be happy if /home and the root dir are marked
read-only by some other means.

Fixes: #14442
5 years agoinstall: use path_strv_contains() where appropriate
Lennart Poettering [Tue, 7 Jan 2020 15:42:25 +0000 (16:42 +0100)] 
install: use path_strv_contains() where appropriate

5 years agopath-util: express PATH_IN_SET() through path_strv_contains()
Lennart Poettering [Wed, 8 Jan 2020 11:23:57 +0000 (12:23 +0100)] 
path-util: express PATH_IN_SET() through path_strv_contains()

5 years agopath-util: introduce path_strv_contains() helper
Lennart Poettering [Tue, 7 Jan 2020 15:24:33 +0000 (16:24 +0100)] 
path-util: introduce path_strv_contains() helper

it's like strv_contains() but uses path_equal() rather than streq() to
compare strings.

5 years agoMerge pull request #14523 from keszybz/refactorings
Yu Watanabe [Thu, 9 Jan 2020 03:50:11 +0000 (12:50 +0900)] 
Merge pull request #14523 from keszybz/refactorings

Refactorings inspired by recent pull requests

5 years agosd-event: use _cleanup_ in one more place 14523/head
Zbigniew Jędrzejewski-Szmek [Wed, 8 Jan 2020 15:22:23 +0000 (16:22 +0100)] 
sd-event: use _cleanup_ in one more place