Commit graph

27817 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek b35e9974fa test-cgroup: split into functions as usual 2020-03-10 10:36:01 +01:00
Wen Yang 4ef0ac8f50 test: fix some failures in test-cgroup
Fix the following issues in test-cgroup:
1, commit 65be7e0652 ("pid1: do not reset subtree_control on
already-existing units with delegation") changed the return value
of cg_create () as follows:
"Returns 0 if the group already existed, 1 on success, negative
otherwise."
So we need to modify the test cases related to cg_create ().

2, commit efdb02375b ("core: unified cgroup hierarchy support")
changed cg_delete () to cg_rmdir (), so the test cases also need
to be adjusted a bit.

3. There is no cleanup of "test-a". If we execute test-cgroup
multiple times, we will encounter an error.

Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
2020-02-18 22:36:28 +08:00
Yu Watanabe ab1b472062
Merge pull request #14555 from poettering/table-multine
format-table: proper multi-line support
2020-01-14 06:48:57 +09:00
Lennart Poettering 0bdd282a4e killall: update reference to root storage daemon interface docs 2020-01-13 18:53:46 +01:00
Lennart Poettering 765d88698f
Merge pull request #14400 from keszybz/alias-check
Alias check rework
2020-01-13 18:03:13 +01:00
Lennart Poettering 04d8507f68
Merge pull request #14381 from keszybz/ifindex-cleanup
Resolve alternative names
2020-01-13 17:57:59 +01:00
Lennart Poettering 200427cf7c
Merge pull request #11199 from dargad/restore-pam-setcred
Restore call to pam_setcred
2020-01-13 17:44:34 +01:00
Lennart Poettering 0b9da3d9e8
Merge pull request #14293 from keur/systemctl_with_dependencies
systemctl: Add --with-dependencies switch
2020-01-13 17:42:55 +01:00
Timo Schlüßler 23b3921663 journalctl: Correctly handle combination of --reverse and --lines (fixes #1596) 2020-01-13 17:35:06 +01:00
Timo Schlüßler 3ac9cac7f7 journalctl: Correctly handle --show-cursor in combination with --until or --since and --reverse 2020-01-13 17:33:50 +01:00
Lennart Poettering 575a915a74
Merge pull request #14532 from poettering/namespace-dynamic-user-fix
Make DynamicUser=1 work in a userns container
2020-01-13 16:47:15 +01:00
Lennart Poettering fc6eb08e74 machinectl: modernize address table handling
Primarily, use the new multi-line support in table formatting.

Also, stream-line naming of the "max-addresses" options. We used three
names for the concept internall, let's just unify on the name we use for
this for external users, i.e. "max-addresses".
2020-01-13 16:38:40 +01:00
Lennart Poettering d91614e717 format-table: natively support multiline cells
This adds native support for multiline cells.
2020-01-13 16:38:28 +01:00
Lennart Poettering f6857fa601 string-util: add helper for extracting n'th line of a string 2020-01-13 16:37:42 +01:00
Lennart Poettering 8dd6491ef9 string-util: let's add helper for truncating string after a specified number of lines 2020-01-13 16:36:47 +01:00
Dariusz Gadomski c6cecb744b test: Add tests for gid list ops 2020-01-13 10:29:20 +01:00
Dariusz Gadomski afb11bf1b8 execute: Detect groups added by PAM and merge them with supplementary groups 2020-01-13 10:29:20 +01:00
Dariusz Gadomski 3bb39ea936 execute: Restore call to pam_setcred 2020-01-13 10:29:20 +01:00
Dariusz Gadomski 0c5d667932 user-util: Add helper functions for gid lists operations 2020-01-13 10:29:10 +01:00
Zbigniew Jędrzejewski-Szmek 117caf3765 networkctl: break long line 2020-01-12 11:24:35 +01:00
Zbigniew Jędrzejewski-Szmek 8571210a21 machinectl: reduce scope of iterator variables 2020-01-12 11:24:35 +01:00
Zbigniew Jędrzejewski-Szmek 957d9df388 resolvectl: minor optimizations to allocate less 2020-01-12 11:24:35 +01:00
Zbigniew Jędrzejewski-Szmek d308bb99d2 Resolve alternative ifnames wherever we would resolve an interface name
To keep the names manageable, "ifname_or_ifindex" is replaced by "interface".
2020-01-12 11:24:35 +01:00
Zbigniew Jędrzejewski-Szmek fc2ea97ad0 util-lib: add function to resolve "alternative" names
Calls to if_nametoindex() are expected to use resolve_ifname() instead.
2020-01-12 10:54:31 +01:00
Zbigniew Jędrzejewski-Szmek 5c3fa98db6 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.
2020-01-11 12:07:28 +01:00
Zbigniew Jędrzejewski-Szmek 955bb7fac3 basic/socket-util: indent for clarity 2020-01-11 12:07:28 +01:00
Zbigniew Jędrzejewski-Szmek bad7cecc0a sd-netlink: do not require rtnl pointer to be passed 2020-01-11 12:07:28 +01:00
Zbigniew Jędrzejewski-Szmek 231d9de1e3 networkctl: define a helper for interface name resolution 2020-01-11 12:07:28 +01:00
Zbigniew Jędrzejewski-Szmek 9030b50a7b timedatectl: drop ifindex output parameter too 2020-01-11 12:07:28 +01:00
Zbigniew Jędrzejewski-Szmek 597da51bae 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.
2020-01-11 12:06:08 +01:00
rhn bcc0fe635d nspawn: Correct "container" to "host" MAC setting message 2020-01-11 12:21:18 +09:00
Lennart Poettering cd6cf81b3f
Merge pull request #14533 from poettering/swap-prio-fixes
Fix Priority= parsing in .swap units
2020-01-10 17:06:16 +01:00
Lennart Poettering a5292dfdf7
Merge pull request #14508 from poettering/namespace-ro-fix
core: be nicer to read-only images
2020-01-10 17:03:01 +01:00
Lennart Poettering 4504f59fbd
Merge pull request #14538 from yuwata/xyzctl-full
use table_set_width(table, 0) if --full is specified
2020-01-10 16:40:31 +01:00
Zbigniew Jędrzejewski-Szmek 1bf1558552 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.
2020-01-10 14:31:01 +01:00
Zbigniew Jędrzejewski-Szmek 3f57bc2267 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.
2020-01-10 14:27:04 +01:00
Zbigniew Jędrzejewski-Szmek 9a4f9e69e1 shared/unit-file: expose function to check .wants/.requires symlink validity
No functional change.
2020-01-10 12:20:18 +01:00
Yu Watanabe 12845a91b5 machinectl: do not truncate addresses when --full is specified 2020-01-10 19:19:15 +09:00
Yu Watanabe bd17fa8cd8 tree-wide: use table_log_add_error() 2020-01-10 18:28:30 +09:00
Yu Watanabe 964a7745de portablectl: optimize table creation 2020-01-10 18:28:23 +09:00
Yu Watanabe 679c7c7a67 machinectl: optimize table creation 2020-01-10 18:28:17 +09:00
Yu Watanabe 9c46b437fc analyze: optimize table creation by using table_add_many() 2020-01-10 18:28:09 +09:00
Yu Watanabe d8aedafb57 format-table: add table_log_add_error() 2020-01-10 18:23:20 +09:00
Anita Zhang 0e05be8405 initctl: (void)ify epoll_ctl()
CID 996298
2020-01-10 10:06:09 +01:00
Anita Zhang e127d90210
Merge pull request #14534 from poettering/cgroup-sibling-fix
core: fix re-realization of cgroup siblings
2020-01-09 23:57:39 -08:00
Kevin Kuehler e9c387c829 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
2020-01-09 22:52:04 -08:00
Yu Watanabe 98d886be79
Merge pull request #13927 from ddstreet/ll_no
networkd: set addr_gen_mode and check for tentative ipv6ll before dro…
2020-01-10 15:44:44 +09:00
Yu Watanabe a65e34ccb0 machinectl: do not ellipsize table when --full is specified 2020-01-10 12:24:51 +09:00
Yu Watanabe b683b82fe7 busctl: introduce --full command line option 2020-01-10 12:19:47 +09:00
Yu Watanabe a42d949080 networkctl: set table width 0 when --full is specified 2020-01-10 12:12:00 +09:00