summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-04-12Do not report masked units as changed (#2921)Zbigniew Jędrzejewski-Szmek
* 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().
2016-04-11tests: port udev-test to log_*_errno (#3015)Evgeny Vereshchagin
SYSTEMD_LOG_LEVEL=debug test/udev-test.pl is working now Also, fixes CID 1354602
2016-04-11Merge pull request #3014 from msekletar/nspawn-empty-machine-id-v3Lennart Poettering
nspawn: always setup machine id (v3)
2016-04-11nspawn: always setup machine idMichal Sekletar
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.
2016-04-11Merge pull request #3011 from evverx/dont-silently-skip-test-namespaceRonny Chevalier
tests: don't silently skip `test-namespace`
2016-04-11Merge pull request #2996 from keszybz/coverity-fixesMartin Pitt
Coverity fixes
2016-04-10tests: don't silently skip `test-namespace`Evgeny Vereshchagin
2016-04-10tests: ignore some mount errors in test-udevEvgeny Vereshchagin
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
2016-04-08core/service: only search for pid if loading from file failedZbigniew Jędrzejewski-Szmek
CID #1237511.
2016-04-08core/service: drop return value that is always ignored anywayZbigniew Jędrzejewski-Szmek
2016-04-08shutdown: use (void)Zbigniew Jędrzejewski-Szmek
NULL cgroup is handled below.
2016-04-08nspawn: ignore failure to chdirZbigniew Jędrzejewski-Szmek
CID #1322380.
2016-04-08journal: assert gcry_mpi_scan succeededZbigniew Jędrzejewski-Szmek
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.
2016-04-08sd-resolve: ignore error in pthread_join()Zbigniew Jędrzejewski-Szmek
CID #1338424.
2016-04-08basic/util: check return value of dup2 in fork_agent()Zbigniew Jędrzejewski-Szmek
CID #1304689.
2016-04-08import: use (void) moreZbigniew Jędrzejewski-Szmek
CID #1299018-9.
2016-04-08udevadm: assert return valueZbigniew Jędrzejewski-Szmek
This mirrors what we do in now(). CID #1351755.
2016-04-08udevd: use (void) to silence coverityZbigniew Jędrzejewski-Szmek
CID #1351429.
2016-04-08resolved: handle oom properlyZbigniew Jędrzejewski-Szmek
CID #1349699-1349700.
2016-04-08network: check return valueZbigniew Jędrzejewski-Szmek
CID #1349698.
2016-04-08Merge pull request #2985 from keszybz/lldp-assertMartin Pitt
Replace if with assert_cc in lldp code and a build-sys tweak
2016-04-07Merge pull request #2943 from vinaykul/systemd_duid_review_fixesZbigniew Jędrzejewski-Szmek
DHCP DUID parsing fix, logging fix, man-page fix
2016-04-07core: downgrade warning about duplicate device names againVladimir Panteleev
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.
2016-04-07lldp: replace if with assert_ccZbigniew Jędrzejewski-Szmek
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.
2016-04-06Merge pull request #2976 from martinpitt/udev-test-tagsZbigniew Jędrzejewski-Szmek
Add tags tests to udev-test.pl
2016-04-06sd-device: Allocate enough room for tags stringMartin Pitt
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.
2016-04-06Merge pull request #2970 from msekletar/machine-id-prefix-rootaZbigniew Jędrzejewski-Szmek
machine-id-setup: simplify by using prefix_roota
2016-04-06Merge pull request #2969 from evverx/udev-test-dont-rely-on-underlying-fs-2Martin Pitt
tests: don't rely on the underlying fs in test-udev (v2)
2016-04-06Merge pull request #2968 from keszybz/journal-upload-watchdog-update-masterLennart Poettering
Journal upload watchdog update master
2016-04-06Merge pull request #2944 from keszybz/man-coredump-sysctlLennart Poettering
Man coredump sysctl
2016-04-06Merge pull request #2947 from keszybz/test-nssLennart Poettering
Add a test for nss modules and some related fixes
2016-04-06Merge pull request #2962 from keszybz/value-optionLennart Poettering
Add `--value` option to systemctl and loginctl to only print values
2016-04-06Merge pull request #2961 from evverx/fix-activate-sigchldLennart Poettering
activate: improve SIGCHLD handler
2016-04-06machine-id-setup: simplify by using prefix_rootaMichal Sekletar
2016-04-06tests: don't rely on the underlying fs in test-udev (v2)Evgeny Vereshchagin
* 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
2016-04-05nss-myhostname: remove dead test of variable that was not setZbigniew Jędrzejewski-Szmek
2016-04-05test-nss: test the resolution of various namesZbigniew Jędrzejewski-Szmek
nss-dns is also "tested". It should be almost always available, and provides a reference for comparison.
2016-04-05string-table: split long definitionsZbigniew Jędrzejewski-Szmek
2016-04-05machinectl: indentation fixZbigniew Jędrzejewski-Szmek
2016-04-05machinectl: add --value optionZbigniew Jędrzejewski-Szmek
2016-04-05Merge pull request #2966 from evverx/udev-test-dont-rely-on-underlying-fsZbigniew Jędrzejewski-Szmek
tests: don't rely on underlying fs in udev-test, use tmpfs instead
2016-04-05journal-upload: make watchdog state non-staticZbigniew Jędrzejewski-Szmek
Also parse watchdog config when creating the Uploader object.
2016-04-05journal-upload: Update watchdog while in curl_easy_performKlearchos Chaloulos
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.
2016-04-05activate: improve SIGCHLD handlerEvgeny Vereshchagin
* 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 ...
2016-04-05tests: don't rely on underlying fs in udev-test, use tmpfs insteadEvgeny Vereshchagin
Fixes: #457
2016-04-05polkit: don't start polkit agent when running as rootMartin Pitt
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
2016-04-05sd-device: fix crash if a device has many tags or devlinksMartin Pitt
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
2016-04-04Address code-review items for pull-request #2890Vinay Kulkarni
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.
2016-04-04loginctl: add --value optionZbigniew Jędrzejewski-Szmek
2016-04-04systemctl: add --value optionZbigniew Jędrzejewski-Szmek
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.