Lennart Poettering [Thu, 25 Feb 2016 00:13:57 +0000 (01:13 +0100)]
core: add a separate unit directory for transient units
Previously, transient units were created below the normal runtime directory
/run/systemd/system. With this change they are created in a special transient
directory /run/systemd/transient, which only contains data for transient units.
This clarifies the life-cycle of transient units, and makes clear they are
distinct from user-provided runtime units. In particular, users may now
extend transient units via /run/systemd/system, without systemd interfering
with the life-cycle of these files.
This change also adds code so that when a transient unit exits only the
drop-ins in this new directory are removed, but nothing else.
Fixes: #2139
Lennart Poettering [Wed, 24 Feb 2016 23:54:31 +0000 (00:54 +0100)]
path-lookup: add configured unit paths back into search path
After all, for test builds they might differ from /etc/systemd/{user|system},
hence they should be included.
Lennart Poettering [Wed, 24 Feb 2016 23:30:32 +0000 (00:30 +0100)]
core: reuse manager_get_runtime_prefix() at more places
Lennart Poettering [Wed, 24 Feb 2016 23:16:51 +0000 (00:16 +0100)]
install: add root directory to LookupPaths structure
We use the root directory parameter while putting together the LookupPaths
structure, hence let's also store it in the structure as-is. That way we can
drop a parameter from half of the functions in install.c
Also, let's move the validation of the root paths into lookup_paths_init() so
that we can drop even more code from install.c
Lennart Poettering [Wed, 24 Feb 2016 20:47:54 +0000 (21:47 +0100)]
install: change in_search_path() to take a LookupPaths structure
Similar to the other calls that operate on the collected path data.
Lennart Poettering [Wed, 24 Feb 2016 20:45:19 +0000 (21:45 +0100)]
install: rename unit_file_is_generated() → path_is_generator()
This way the funciton name matches nicely our other calls path_is_config() and
path_is_runtime().
Lennart Poettering [Wed, 24 Feb 2016 20:43:09 +0000 (21:43 +0100)]
install: be more accurate when checking whether something is runtime configuration
Let's actually check the runtime config dir, instead of just /run.
Lennart Poettering [Wed, 24 Feb 2016 20:37:42 +0000 (21:37 +0100)]
network: hashmap_put() can fail
Let's properly handle hashmap_put() failing.
Lennart Poettering [Wed, 24 Feb 2016 20:36:09 +0000 (21:36 +0100)]
core: introduce MANAGER_IS_RELOADING() macro
This replaces the old function call manager_is_reloading_or_reexecuting() which
was used only at very few places. Use the new macro wherever we check whether
we are reloading. This should hopefully make things a bit more readable, given
the nature of Manager:n_reloading being a counter.
Lennart Poettering [Wed, 24 Feb 2016 20:24:23 +0000 (21:24 +0100)]
core: remove ManagerRunningAs enum
Previously, we had two enums ManagerRunningAs and UnitFileScope, that were
mostly identical and converted from one to the other all the time. The latter
had one more value UNIT_FILE_GLOBAL however.
Let's simplify things, and remove ManagerRunningAs and replace it by
UnitFileScope everywhere, thus making the translation unnecessary. Introduce
two new macros MANAGER_IS_SYSTEM() and MANAGER_IS_USER() to simplify checking
if we are running in one or the user context.
Lennart Poettering [Wed, 24 Feb 2016 17:17:42 +0000 (18:17 +0100)]
systemctl: port systemctl over to the new LookupPaths configuration directory fields
Lennart Poettering [Wed, 24 Feb 2016 16:52:45 +0000 (17:52 +0100)]
install: make use of configuration directory paths in LookupPaths
Now that the LookupPaths structure contains the directory paths, let's make use
of that everywhere instead of duplicating the logic.
Lennart Poettering [Wed, 24 Feb 2016 16:18:42 +0000 (17:18 +0100)]
core: add configuration directories to LookupPaths
Let's add a seperate fields for the directories where we place runtime and
persistent configuration, so that we can use this in install.c (to be added in
a later commit), and we store path information in the same place everywhere.
Lennart Poettering [Wed, 24 Feb 2016 15:02:48 +0000 (16:02 +0100)]
core: when enabling a generated unit file, return a clean error
Let's be precise when the user tries to invoke an "enable" operation on a
generated unit file.
Lennart Poettering [Wed, 24 Feb 2016 14:44:46 +0000 (15:44 +0100)]
core: add a new unit file state "generated"
Now that we store the generator directories in LookupPaths we can use this to
intrdouce a new unit file state called "generated", for units in these
directories.
Fixes: #2348
Lennart Poettering [Wed, 24 Feb 2016 14:31:33 +0000 (15:31 +0100)]
core: rework generator dir logic, move the dirs into LookupPaths structure
A long time ago – when generators where first introduced – the directories for
them were randomly created via mkdtemp(). This was changed later so that they
use fixed name directories now. Let's make use of this, and add the genrator
dirs to the LookupPaths structure and into the unit file search path maintained
in it. This has the benefit that the generator dirs are now normal part of the
search path for all tools, and thus are shown in "systemctl list-unit-files"
too.
Lennart Poettering [Wed, 24 Feb 2016 13:08:53 +0000 (14:08 +0100)]
man: minor nspawn doc fixes
Lennart Poettering [Tue, 23 Feb 2016 19:38:53 +0000 (20:38 +0100)]
core: drop SysV paths from path-lookup logic
We don't need it anymore, give that sysv-generator can determine the path on
its own now.
Lennart Poettering [Tue, 23 Feb 2016 19:37:37 +0000 (20:37 +0100)]
sysv-generator: don't use LookupPath logic for determining SysV paths
The sysv-generator is the only user of the SysV paths these days, let's make it
figure out the right paths on its own.
(In a subsequent commit we can then drop the same logic from LookupPath).
Lennart Poettering [Tue, 23 Feb 2016 19:29:06 +0000 (20:29 +0100)]
import: drop unused definition
Lennart Poettering [Tue, 12 Apr 2016 09:34:44 +0000 (11:34 +0200)]
Merge pull request #3016 from martinpitt/systemctl-enable
Install: correctly report symlink creations
Zbigniew Jędrzejewski-Szmek [Tue, 12 Apr 2016 09:10:57 +0000 (05:10 -0400)]
Do not report masked units as changed (#2921)
* core/unit: extract checking of stat paths into helper function
The same code was repeated three times.
* core: treat masked files as "unchanged"
systemctl prints the "unit file changed on disk" warning
for a masked unit. I think it's better to print nothing in that
case.
When a masked unit is loaded, set mtime as 0. When checking
if a unit with mtime of 0 needs reload, check that the mask
is still in place.
* test-dnssec: fix build without gcrypt
Also reorder the test functions to follow the way they are called
from main().
Lukáš Nykrýn [Tue, 12 Apr 2016 05:44:28 +0000 (07:44 +0200)]
rules: set SYSTEMD_READY=0 on DM_UDEV_DISABLE_OTHER_RULES_FLAG=1 only with ADD event (#2747)
The "SYSTEMD_READY=0" will cause automatic unmount
of mountpoint that is on top of such DM device
if this is used with multipath which sets
DM_UDEV_DISABLE_OTHER_RULES_FLAG in case
we have a CHANGE event thatcomes after DM multipath
device reload when one of the paths is down or up.
See https://bugzilla.redhat.com/show_bug.cgi?id=
1312011
Evgeny Vereshchagin [Mon, 11 Apr 2016 19:31:57 +0000 (22:31 +0300)]
tests: port udev-test to log_*_errno (#3015)
SYSTEMD_LOG_LEVEL=debug test/udev-test.pl is working now
Also, fixes CID
1354602
Martin Pitt [Mon, 11 Apr 2016 19:03:29 +0000 (21:03 +0200)]
Install: correctly report symlink creations
All callers of create_symlink(), such as install_info_symlink_wants(), expect
that to return > 0 if it actually did something, and then return that number.
unit_file_enable() uses that to determine if any action was done
(carries_install_info != 0) and if not, show a "The unit files have no
[Install] section" warning.
Return 1 instead of 0 in the two code paths of create_symlink() when the link
was created or replaced with a new value.
This fixes getting a bogus "No [Install] section" warning when enabling a unit
with full path, like "systemctl enable /some/path/myunit.service".
Lennart Poettering [Mon, 11 Apr 2016 15:27:11 +0000 (17:27 +0200)]
Merge pull request #3014 from msekletar/nspawn-empty-machine-id-v3
nspawn: always setup machine id (v3)
Michal Sekletar [Fri, 8 Apr 2016 11:22:54 +0000 (13:22 +0200)]
nspawn: always setup machine id
We check /etc/machine-id of the container and if it is already populated
we use value from there, possibly ignoring value of --uuid option from
the command line. When dealing with R/O image we setup transient machine
id.
Once we determined machine id of the container, we use this value for
registration with systemd-machined and we also export it via
container_uuid environment variable.
As registration with systemd-machined is done by the main nspawn process
we communicate container machine id established by setup_machine_id from
outer child to the main process by unix domain socket. Similarly to PID
of inner child.
Lennart Poettering [Mon, 11 Apr 2016 14:07:16 +0000 (16:07 +0200)]
Merge pull request #3012 from martinpitt/hwdb
hwdb updates
Ronny Chevalier [Mon, 11 Apr 2016 12:51:51 +0000 (13:51 +0100)]
Merge pull request #3011 from evverx/dont-silently-skip-test-namespace
tests: don't silently skip `test-namespace`
Martin Pitt [Mon, 11 Apr 2016 09:19:27 +0000 (11:19 +0200)]
Merge pull request #2996 from keszybz/coverity-fixes
Coverity fixes
Martin Pitt [Mon, 11 Apr 2016 09:17:07 +0000 (11:17 +0200)]
keymap: Add HP ProBook 640 G2
Fixes #2997
Martin Pitt [Mon, 11 Apr 2016 08:42:51 +0000 (10:42 +0200)]
hwdb: Add SteelSeries Sensei Raw mouse
Fixes #3009
Evgeny Vereshchagin [Sun, 10 Apr 2016 23:41:04 +0000 (23:41 +0000)]
tests: don't silently skip `test-namespace`
Zbigniew Jędrzejewski-Szmek [Sun, 10 Apr 2016 21:21:18 +0000 (17:21 -0400)]
Merge pull request #3008 from evverx/udev-test-ignore-some-mount-errors
tests: ignore some mount errors in test-udev
Evgeny Vereshchagin [Sun, 10 Apr 2016 19:29:17 +0000 (19:29 +0000)]
tests: ignore some mount errors in test-udev
Fixes:
$ sudo make distcheck
...
FAIL: test/udev-test.pl
...
$ vi systemd-229/_build/sub/test/udev-test.pl.log
...
failed to mount empty
/home/ubuntu/systemd/systemd-229/_inst/lib/udev/rules.d No such file or directory
...
failed to mount empty
/home/ubuntu/systemd/systemd-229/_inst/lib/udev/rules.d No such file or directory
...
414 errors occurred
Martin Pitt [Sun, 10 Apr 2016 07:50:44 +0000 (09:50 +0200)]
Merge pull request #3002 from robertwec/master
hwdb: Add MODECOM MC-WM4 and Sharkoon Shark Force
Martin Pitt [Sun, 10 Apr 2016 07:48:52 +0000 (09:48 +0200)]
Merge pull request #3004 from tsmock/master
hwdb/70-mouse.hwdb: Add Dynex Wired Mouse (DX-WMSE2)
Taylor Smock [Sat, 9 Apr 2016 23:37:48 +0000 (17:37 -0600)]
hwdb/70-mouse.hwdb: Add Dynex Wired Mouse (DX-WMSE2)
Robert Węcławski [Sat, 9 Apr 2016 22:53:23 +0000 (00:53 +0200)]
hwdb: Add MODECOM MC-WM4 and Sharkoon Shark Force
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:09:17 +0000 (21:09 -0400)]
core/service: only search for pid if loading from file failed
CID #
1237511.
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:09:11 +0000 (21:09 -0400)]
core/service: drop return value that is always ignored anyway
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:09:09 +0000 (21:09 -0400)]
shutdown: use (void)
NULL cgroup is handled below.
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:09:06 +0000 (21:09 -0400)]
nspawn: ignore failure to chdir
CID #
1322380.
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:54 +0000 (21:08 -0400)]
journal: assert gcry_mpi_scan succeeded
It might be nicer to propagate the error to the caller, but that'd
be a bigger refactoring. This shouldn't really fail, so just add
an assert.
CID #
1349697.
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:42 +0000 (21:08 -0400)]
sd-resolve: ignore error in pthread_join()
CID #
1338424.
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:29 +0000 (21:08 -0400)]
basic/util: check return value of dup2 in fork_agent()
CID #
1304689.
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:23 +0000 (21:08 -0400)]
import: use (void) more
CID #
1299018-9.
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:21 +0000 (21:08 -0400)]
udevadm: assert return value
This mirrors what we do in now().
CID #
1351755.
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:18 +0000 (21:08 -0400)]
udevd: use (void) to silence coverity
CID #
1351429.
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:15 +0000 (21:08 -0400)]
resolved: handle oom properly
CID #
1349699-
1349700.
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:02 +0000 (21:08 -0400)]
network: check return value
CID #
1349698.
Lennart Poettering [Fri, 8 Apr 2016 17:08:52 +0000 (19:08 +0200)]
Merge pull request #2990 from evverx/sys-depends-on-sys-tar-xz
build-sys: test/sys depends on test/sys.tar.xz
Evgeny Vereshchagin [Fri, 8 Apr 2016 13:53:03 +0000 (13:53 +0000)]
build-sys: test/sys depends on test/sys.tar.xz
Fixes:
$ ls -ld test/sys
drwxr-xr-x. 12 vagrant vagrant 4096 Jan 6 2012 test/sys
$ git pull
Updating
d4337c1..
710a885
Fast-forward
...
test/sys.tar.xz | Bin 261380 -> 165116 bytes
test/udev-test.pl | 67 ++++++++++++-----
$ sudo make check TESTS=test/udev-test.pl
...
FAIL: test/udev-test.pl
$ rm -r test/sys
$ make test/sys
$ sudo make check TESTS=test/udev-test.pl
...
PASS: test/udev-test.pl
Martin Pitt [Fri, 8 Apr 2016 06:31:33 +0000 (08:31 +0200)]
Merge pull request #2985 from keszybz/lldp-assert
Replace if with assert_cc in lldp code and a build-sys tweak
Zbigniew Jędrzejewski-Szmek [Fri, 8 Apr 2016 00:19:19 +0000 (20:19 -0400)]
Merge pull request #2943 from vinaykul/systemd_duid_review_fixes
DHCP DUID parsing fix, logging fix, man-page fix
Zbigniew Jędrzejewski-Szmek [Fri, 8 Apr 2016 00:04:27 +0000 (20:04 -0400)]
Merge pull request #2987 from CyberShadow/pull-
20160407-234344
core: downgrade warning about duplicate device names again
Vladimir Panteleev [Thu, 7 Apr 2016 23:48:29 +0000 (23:48 +0000)]
core: downgrade warning about duplicate device names again
Pull request #2412 seemed to have unintentionally reverted
5259bcf6a638d8d489db1ddefd55327aa15f3e51, thus reintroducing
https://bugs.freedesktop.org/show_bug.cgi?id=90386.
This commit reverts that part of the commit, changing the
log level to debug again.
Zbigniew Jędrzejewski-Szmek [Thu, 7 Apr 2016 18:29:07 +0000 (14:29 -0400)]
lldp: replace if with assert_cc
LLDP_TX_HOLD or one of the other variables might be changed in the future
resulting in a silent error here if the if was just removed.
Replacement for #2983.
Zbigniew Jędrzejewski-Szmek [Mon, 4 Apr 2016 14:42:58 +0000 (10:42 -0400)]
build-sys: force generation of triggers.systemd file
We don't want to actually install it anywhere, because it
is only usable copied or %included directly into a spec file,
and must be available before %prep is run. But still, it's
useful to generate it automatically so it's easier to copy
and it doesn't go stale.
Martin Pitt [Thu, 7 Apr 2016 15:01:12 +0000 (17:01 +0200)]
Merge pull request #2981 from keszybz/test-nss
build-sys: move test-nss to manual_tests
Zbigniew Jędrzejewski-Szmek [Thu, 7 Apr 2016 13:02:12 +0000 (09:02 -0400)]
build-sys: move test-nss to manual_tests
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 23:45:24 +0000 (19:45 -0400)]
Merge pull request #2976 from martinpitt/udev-test-tags
Add tags tests to udev-test.pl
Martin Pitt [Wed, 6 Apr 2016 21:50:39 +0000 (23:50 +0200)]
sd-device: Allocate enough room for tags string
Fix commit 1d88a2: We need to allocate another byte for building the "tags"
string, as we append an extra ':' and still need the NUL terminator.
Martin Pitt [Wed, 6 Apr 2016 21:18:06 +0000 (23:18 +0200)]
test: udev: Check tags
Add two more tests:
- Add a single tag, match on it, don't match on another.
- Add 10.000 tags to a device, ensure that udev survives this.
(Reproduces crash fixed by commit
1d88a271a)
Martin Pitt [Wed, 6 Apr 2016 21:17:46 +0000 (23:17 +0200)]
test: udev: check exit code of test-udev
We expect test-udev to succeed. Verify that its exit code is zero, particularly
to spot crashes (e. g. a segfault would be error code 139).
Lennart Poettering [Wed, 6 Apr 2016 16:36:22 +0000 (18:36 +0200)]
Merge pull request #2972 from lnykryn/curl
configure.ac: bump curl dependency to 7.32.0
Lukas Nykryn [Wed, 6 Apr 2016 13:03:31 +0000 (15:03 +0200)]
configure.ac: bump curl dependency to 7.32.0
We are using CURLOPT_XFERINFOFUNCTION which was added in 7.32.0.
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 11:58:05 +0000 (07:58 -0400)]
Merge pull request #2970 from msekletar/machine-id-prefix-roota
machine-id-setup: simplify by using prefix_roota
Martin Pitt [Wed, 6 Apr 2016 10:57:54 +0000 (12:57 +0200)]
Merge pull request #2971 from torstehu/fix-typo
man: fix spelling mistakes
Torstein Husebø [Wed, 6 Apr 2016 10:37:01 +0000 (12:37 +0200)]
man: fix spelling mistakes
Martin Pitt [Wed, 6 Apr 2016 09:51:38 +0000 (11:51 +0200)]
Merge pull request #2969 from evverx/udev-test-dont-rely-on-underlying-fs-2
tests: don't rely on the underlying fs in test-udev (v2)
Lennart Poettering [Wed, 6 Apr 2016 08:50:46 +0000 (10:50 +0200)]
Merge pull request #2968 from keszybz/journal-upload-watchdog-update-master
Journal upload watchdog update master
Lennart Poettering [Wed, 6 Apr 2016 08:49:52 +0000 (10:49 +0200)]
Merge pull request #2944 from keszybz/man-coredump-sysctl
Man coredump sysctl
Lennart Poettering [Wed, 6 Apr 2016 08:48:55 +0000 (10:48 +0200)]
Merge pull request #2947 from keszybz/test-nss
Add a test for nss modules and some related fixes
Lennart Poettering [Wed, 6 Apr 2016 08:47:37 +0000 (10:47 +0200)]
Merge pull request #2962 from keszybz/value-option
Add `--value` option to systemctl and loginctl to only print values
Lennart Poettering [Wed, 6 Apr 2016 08:46:47 +0000 (10:46 +0200)]
Merge pull request #2961 from evverx/fix-activate-sigchld
activate: improve SIGCHLD handler
Michal Sekletar [Wed, 6 Apr 2016 07:20:34 +0000 (09:20 +0200)]
machine-id-setup: simplify by using prefix_roota
Evgeny Vereshchagin [Wed, 6 Apr 2016 03:04:27 +0000 (03:04 +0000)]
tests: don't rely on the underlying fs in test-udev (v2)
* This reverts commit
646048b40a7b62c4e9bc59024ef6133613cda01b.
Let's test really big numbers again
* Don't be so brutal: use rmdir instead of rm -rf
As suggested https://github.com/systemd/systemd/pull/2966#issuecomment-
205751680
Zbigniew Jędrzejewski-Szmek [Tue, 15 Mar 2016 04:50:25 +0000 (00:50 -0400)]
nss-myhostname: remove dead test of variable that was not set
Zbigniew Jędrzejewski-Szmek [Fri, 4 Mar 2016 15:50:45 +0000 (10:50 -0500)]
test-nss: test the resolution of various names
nss-dns is also "tested". It should be almost always available,
and provides a reference for comparison.
Zbigniew Jędrzejewski-Szmek [Fri, 4 Mar 2016 16:28:04 +0000 (11:28 -0500)]
string-table: split long definitions
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 03:03:46 +0000 (23:03 -0400)]
machinectl: indentation fix
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 02:44:42 +0000 (22:44 -0400)]
machinectl: add --value option
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 01:09:20 +0000 (21:09 -0400)]
Merge pull request #2964 from martinpitt/cgroup-doc-links
man: update links to kernel.org cgroup documentation
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 01:00:10 +0000 (21:00 -0400)]
man: also mention systemd-coredump@.service and systemd-coredump.socket
Added in
3c171f0b1e.
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 00:36:01 +0000 (20:36 -0400)]
Merge pull request #2966 from evverx/udev-test-dont-rely-on-underlying-fs
tests: don't rely on underlying fs in udev-test, use tmpfs instead
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 00:27:48 +0000 (20:27 -0400)]
journal-upload: make watchdog state non-static
Also parse watchdog config when creating the Uploader object.
Klearchos Chaloulos [Tue, 5 Apr 2016 10:47:04 +0000 (13:47 +0300)]
journal-upload: Update watchdog while in curl_easy_perform
It is observed that a combination of high log throughput, low I/O speed on journal remote side and many nodes uploading simultaneously caused the journal-upload process to dump core because of watchdog starvation. This is caused because journal-upload stays in curl_easy_perform(), because it cannot upload fast enough to reach the end of the journal. Currently journal-upload will return from curl_easy_perform() only when the end of the journal is reached. Therefore a check is added in journal_input_callback(), which will update the watchdog if the elapsed time since the start of the uploading process is greater than WATCHDOG_USEC/2.
Evgeny Vereshchagin [Tue, 5 Apr 2016 00:27:15 +0000 (00:27 +0000)]
activate: improve SIGCHLD handler
* Don't lose children exit codes
* Don't receive notification when child processes stop
Eliminates annoying "Child died"-messages:
$ ./systemd-socket-activate -l 2000 --inetd -a cat
^Z
[1]+ Stopped ./systemd-socket-activate -l 2000 --inetd -a cat
$ bg %1
[1]+ ./systemd-socket-activate -l 2000 --inetd -a cat &
Child 15657 died with code 20
$ ps u 15657
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
ubuntu 15657 0.0 0.0 4540 680 pts/2 S 00:34 0:00 cat
* Don't fail to reap some zombie children
Fixes
$ ./systemd-socket-activate -l 2000 --inetd -a cat &
$ for i in {1..1000}; do echo a | nc localhost 2000 & done
$ ps f
...
18235 pts/2 Ss 0:01 -bash
15849 pts/2 S 0:00 \_ ./systemd-socket-activate -l 2000 --inetd
-a cat
16081 pts/2 Z 0:00 | \_ [cat] <defunct>
16381 pts/2 Z 0:00 | \_ [cat] <defunct>
and many more zombies
...
Martin Pitt [Tue, 5 Apr 2016 13:28:47 +0000 (15:28 +0200)]
man: fix cgroup attributes for device throttling
Lennart Poettering [Tue, 5 Apr 2016 10:41:36 +0000 (12:41 +0200)]
Merge pull request #2965 from martinpitt/systemctl-polkit
systemctl: don't start polkit agent when running as root
Evgeny Vereshchagin [Tue, 5 Apr 2016 06:13:41 +0000 (06:13 +0000)]
tests: don't rely on underlying fs in udev-test, use tmpfs instead
Fixes: #457
Martin Pitt [Tue, 5 Apr 2016 08:30:45 +0000 (10:30 +0200)]
polkit: don't start polkit agent when running as root
On the server side we already bypass the polkit checks if the caller is root
(see the sd_bus_query_sender_privilege() call in bus_verify_polkit_async()). So
there is no reason to invoke polkit when running
systemctl/machinectl/loginctl/timedatectl as root.
Fixes #2748
Lennart Poettering [Tue, 5 Apr 2016 09:27:16 +0000 (11:27 +0200)]
Merge pull request #2955 from martinpitt/master
sd-device: fix crash if a device has many tags
Martin Pitt [Tue, 5 Apr 2016 08:48:06 +0000 (10:48 +0200)]
man: update links to cgroup documentation
This recently moved from /cgroups/ to /cgroup-v1/.
Fixes #2958
Martin Pitt [Mon, 4 Apr 2016 09:09:00 +0000 (11:09 +0200)]
sd-device: fix crash if a device has many tags or devlinks
strjoina() is unsafe to be used in an unbounded loop as alloca() has no error
reporting. Thus devices with a large number of tags or devlinks trigger a
segfault in device_properties_prepare() due to overflowing the stack.
Rewrite the building of the "tags" and "devlinks" strings using
GREEDY_REALLOC() and strpcpy() to work with arbitrarily long strings. This also
avoids re-copying the entire string in each loop iteration.
Before this commit we always appended one final ":" to "tags". Change this to
start with an iniital ":" and for each tag append instead of prepend a ":".
This unifies what happens for the first and all subsequent tags so that we can
use a for loop.
Fixes #2954
Vinay Kulkarni [Tue, 5 Apr 2016 04:05:45 +0000 (21:05 -0700)]
Drop description of 'Type' field from docs.
Vinay Kulkarni [Mon, 4 Apr 2016 22:13:06 +0000 (15:13 -0700)]
Address code-review items for pull-request #2890
1. Replace strtol with unhexchar, verified with valid and invalid DUID strings.
2. Fix logging to use log_syntax instead of log_error.
3. On error reading DUID, ignore read and preserve previous state.
4. Fix man-pages to use markup, remove options not yet implemented.
5. Remove spurious header line in new files.
Zbigniew Jędrzejewski-Szmek [Thu, 17 Mar 2016 16:48:02 +0000 (12:48 -0400)]
loginctl: add --value option
Zbigniew Jędrzejewski-Szmek [Sun, 2 Aug 2015 18:22:10 +0000 (14:22 -0400)]
systemctl: add --value option
With this option, systemctl will only print the rhs in show:
$ systemctl show -p Wants,After systemd-journald --value
systemd-journald.socket ...
systemd-journald-dev-log.socket ...
This is useful in scripts, because the need to call awk or similar
is removed.