summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #11460 from yuwata/fix-11458Lennart Poettering2019-01-261-1/+5
|\ | | | | network: update address when static address was already configured by DHCP
| * network: update address when static address was already configured by DHCPYu Watanabe2019-01-171-1/+5
| | | | | | | | Fixes #11458.
* | Merge pull request #11562 from yuwata/fix-11558Lennart Poettering2019-01-261-3/+7
|\ \ | | | | | | core/mount: do not add Before=local-fs.target or remote-fs.target if nofail mount option is set
| * | core/mount: do not add Before=local-fs.target or remote-fs.target if nofail ↵Yu Watanabe2019-01-261-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | mount option is set Follow-up for d54bab90e64f70c1ecf9b0683a98adb8485ed09e. Fixes #11558.
* | | Merge pull request #11466 from keszybz/fix-loop-remountsLennart Poettering2019-01-261-27/+32
|\ \ \ | | | | | | | | pid1: fix cleanup of stale implicit deps based on /proc/self/mountinfo
| * | | pid1: fix cleanup of stale implicit deps based on /proc/self/mountinfoZbigniew Jędrzejewski-Szmek2019-01-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was introduced in a37422045fbb68ad68f734e5dc00e0a5b1759773: we have a unit which has a fragment, and when we'd update it based on /proc/self/mountinfo, we'd say that e.g. What=/dev/loop8 has origin-fragment. This commit changes two things: - origin-fragment is changed to origin-mountinfo-implicit - when we stop a unit, mountinfo information is flushed and all deps based on it are dropped. The second step is important, because when we restart the unit, we want to notice that we have "fresh" mountinfo information. We could keep the old info around and solve this in a different way, but keeping stale information seems inelegant. Fixes #11342.
| * | | core/mount: move static function earlier in fileZbigniew Jędrzejewski-Szmek2019-01-181-26/+26
| | | | | | | | | | | | | | | | No functional change.
* | | | Merge pull request #11530 from keszybz/journal-cache-trimmingLennart Poettering2019-01-2610-17/+99
|\ \ \ \ | | | | | | | | | | Journal cache trimming
| * | | | journald: periodically drop cache for all dead PIDsZbigniew Jędrzejewski-Szmek2019-01-262-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In normal use, this allow us to drop dead entries from the cache and reduces the cache size so that we don't evict entries unnecessarily. The time limit is there mostly to serve as a guard against malicious logging from many different PIDs.
| * | | | journal: limit the number of entries in the cache based on available memoryZbigniew Jędrzejewski-Szmek2019-01-261-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is far from perfect, but should give mostly reasonable values. My assumption is that if somebody has a few hundred MB of memory, they are unlikely to have thousands of processes logging. A hundred would already be a lot. So let's scale the cache size propritionally to the total memory size, with clamping on both ends. The formula gives 64 cache entries for each GB of RAM.
| * | | | basic/prioq: add prioq_peek_item()Zbigniew Jędrzejewski-Szmek2019-01-263-5/+26
| | | | |
| * | | | procfs-util: expose functionality to query total memoryZbigniew Jędrzejewski-Szmek2019-01-225-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | procfs_memory_get_current is renamed to procfs_memory_get_used, because "current" can mean anything, including total memory, used memory, and free memory, as long as the value is up to date. No functional change.
* | | | | nspawn: ignore SIGPIPE for nspawn itselfLennart Poettering2019-01-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's not abort due to a dead stdout. Fixes: #11533
* | | | | process-util: don't use overly large buffer to store process command lineMichal Sekletar2019-01-261-4/+14
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Allocate new string as a return value and free our "scratch pad" buffer that is potentially much larger than needed (up to _SC_ARG_MAX). Fixes #11502
* | | | dhcp/trivial: fix spelling error in commentThomas Haller2019-01-251-1/+1
| | | |
* | | | Merge pull request #11547 from yuwata/network-cosmetic-fixesLennart Poettering2019-01-253-3/+2
|\ \ \ \ | | | | | | | | | | network: trivial fix and cleanup
| * | | | network: fix an error logYu Watanabe2019-01-241-1/+1
| | | | |
| * | | | network: make link_up() staticYu Watanabe2019-01-242-2/+1
| | | | |
* | | | | timesyncd: Improve sync log message. Fixes #11548.Niklas Hambüchen2019-01-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This makes it clear that the user should not expect more log messages each time the time is synchronised.
* | | | | test-bpf: check if we can mlock() before trying bpfLennart Poettering2019-01-241-0/+33
|/ / / /
* | | | Merge pull request #11536 from yuwata/fix-11529Lennart Poettering2019-01-232-4/+34
|\ \ \ \ | | | | | | | | | | sd-device-monitor: use SO_DETACH_FILTER to remove BPF program
| * | | | test: add test for sd_device_monitor_filter_remove()Yu Watanabe2019-01-231-3/+33
| | | | |
| * | | | sd-device-monitor: use SO_DETACH_FILTER to remove BPF programYu Watanabe2019-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes #11529.
* | | | | Correct more spelling errors.Chris Lamb2019-01-232-2/+2
|/ / / /
* | | | meson: make version a dependency and use it in libbasicLouis Taylor2019-01-222-8/+2
|/ / / | | | | | | | | | | | | | | | | | | This should hopefully ensure it gets generated before basic build happens. Fixes #11483.
* | | Merge pull request #11501 from yuwata/fix-9426Lennart Poettering2019-01-224-4/+16
|\ \ \ | | | | | | | | sd-device: do not save e.g., DEVPATH or INTERFACE properties to udev database
| * | | core/device: fix log messageYu Watanabe2019-01-221-1/+1
| | | |
| * | | sd-device: do not save e.g., DEVPATH or INTERFACE properties to udev databaseYu Watanabe2019-01-223-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, device_copy_properties() copies all properties to both sd_device::properties and ::properties_db. Thus, on move uevent, also tentative properties, e.g. DEVPATH or INTERFACE, are stored to ::properties_db, and saved to udev database. This makes such tentative properties be copied to only ::properties, and thus not saved to udev database. Fixes #9426.
* | | | Fixes #11128Taro Yamada2019-01-221-2/+8
| | | |
* | | | Merge pull request #11448 from poettering/rlimit-pid1-fixoZbigniew Jędrzejewski-Szmek2019-01-223-27/+103
|\ \ \ \ | | | | | | | | | | RLIMIT_MEMLOCK fixes
| * | | | execute: make sure to call into PAM after initializing resource limitsLennart Poettering2019-01-181-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want that pam_limits takes precedence over our settings, after all. Fixes: #11386
| * | | | fd-util: rework how we determine highest possible fdLennart Poettering2019-01-181-11/+26
| | | | |
| * | | | main: when generating the resource limit to pass to children, take ↵Lennart Poettering2019-01-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FD_SETSIZE into consideration When we synthesize a "struct rlimit" structure to pass on for RLIMIT_NOFILE to our children, let's explicitly make sure that the soft limit is not above FD_SETSIZE, for compat reason with select(). Note this only applies when we derive the "struct rlimit" from what we inherited. If the user configures something explicitly it always takes precedence.
| * | | | main: don't bump resource limits if they are higher than we need them anywayLennart Poettering2019-01-181-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | This matters in particular in the case of --user, since there we lack the privs to bump the limits up again later on when invoking children.
| * | | | main: add commenting, clean up handling of saved resource limitsLennart Poettering2019-01-181-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | This doesn't really change behaviour, but adds comments and uses more symbolic names for everything, to make this more readable.
| * | | | main: when bumping RLIMIT_MEMLOCK, save the previous value to pass to childrenLennart Poettering2019-01-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Let's make sure that the bumping of RLIMIT_MEMLOCK does not leak into our children.
* | | | | resolved: preferably route single-label lookups to unicast DNS scopes with ↵Lennart Poettering2019-01-221-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | search domains (#11485) Fixes: #11391
* | | | | udevadm info: make --export-prefix imply --exportYu Watanabe2019-01-221-0/+1
| |/ / / |/| | | | | | | | | | | Setting --export without --export-prefix is meaningless.
* | | | wait-online: do not fail if we receive invalid messagesYu Watanabe2019-01-211-13/+18
| | | | | | | | | | | | | | | | Fixes #11486.
* | | | network: unset Network::manager when loading .network file failsYu Watanabe2019-01-211-23/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, LIST_REMOVE() in network_free() fails. This fixes the following assertion: ``` systemd-networkd[2595]: Bus bus-api-network: changing state UNSET → OPENING systemd-networkd[2595]: Bus bus-api-network: changing state OPENING → AUTHENTICATING systemd-networkd[2595]: timestamp of '/etc/systemd/network' changed systemd-networkd[2595]: /etc/systemd/network/10-hoge.network:1: Invalid section header '[Network]Address=192.168.0.1' systemd-networkd[2595]: /etc/systemd/network/10-hoge.network:1: Failed to parse file: Bad message systemd-networkd[2595]: Assertion '*_head == _item' failed at ../../home/watanabe/git/systemd/src/network/networkd-network.c:378, function network_free(). Aborting. valgrind[2595]: ==2595== valgrind[2595]: ==2595== Process terminating with default action of signal 6 (SIGABRT): dumping core valgrind[2595]: ==2595== at 0x4BCA53F: raise (in /usr/lib64/libc-2.28.so) valgrind[2595]: ==2595== by 0x4BB4894: abort (in /usr/lib64/libc-2.28.so) valgrind[2595]: ==2595== by 0x4955F09: log_assert_failed_realm (log.c:795) valgrind[2595]: ==2595== by 0x417101: network_free (networkd-network.c:378) valgrind[2595]: ==2595== by 0x415E99: network_freep (networkd-network.h:282) valgrind[2595]: ==2595== by 0x416AB2: network_load_one (networkd-network.c:101) valgrind[2595]: ==2595== by 0x416C39: network_load (networkd-network.c:293) valgrind[2595]: ==2595== by 0x414031: manager_load_config (networkd-manager.c:1502) valgrind[2595]: ==2595== by 0x40B258: run (networkd.c:82) valgrind[2595]: ==2595== by 0x40B74A: main (networkd.c:117) valgrind[2595]: ==2595== valgrind[2595]: ==2595== HEAP SUMMARY: valgrind[2595]: ==2595== in use at exit: 32,621 bytes in 201 blocks valgrind[2595]: ==2595== total heap usage: 746 allocs, 545 frees, 241,027 bytes allocated valgrind[2595]: ==2595== valgrind[2595]: ==2595== LEAK SUMMARY: valgrind[2595]: ==2595== definitely lost: 0 bytes in 0 blocks valgrind[2595]: ==2595== indirectly lost: 0 bytes in 0 blocks valgrind[2595]: ==2595== possibly lost: 0 bytes in 0 blocks valgrind[2595]: ==2595== still reachable: 32,621 bytes in 201 blocks valgrind[2595]: ==2595== suppressed: 0 bytes in 0 blocks valgrind[2595]: ==2595== Reachable blocks (those to which a pointer was found) are not shown. valgrind[2595]: ==2595== To see them, rerun with: --leak-check=full --show-leak-kinds=all valgrind[2595]: ==2595== valgrind[2595]: ==2595== For counts of detected and suppressed errors, rerun with: -v valgrind[2595]: ==2595== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) systemd-coredump[2600]: Process 2595 (memcheck-amd64-) of user 192 dumped core. ```
* | | | test-process-util: do not assume PID 1 has UID=0Mike Gilbert2019-01-211-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Gentoo's Portage package manager uses a PID namespace for process isolation and cleanup. In this namespace, PID 1 has UID=250 (portage). Bug: https://bugs.gentoo.org/674458
* | | | Enable some more debug logging for transaction buildingJonathon Kowalski2019-01-211-13/+13
| | | |
* | | | Merge pull request #11424 from yuwata/fix-11420Lennart Poettering2019-01-181-2/+13
|\ \ \ \ | | | | | | | | | | timedate: refuse setting time when unit is in 'activating' or friends
| * | | | timedate: refuse to set time when previous request is not finishedYu Watanabe2019-01-151-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If `timedatectl set-time` is invoked right after `timedatectl set-ntp true`, then, the NTP service may not be started yet. Fixes #11420.
| * | | | timedate: treat 'activating' or 'inactivating' NTP client status as 'active'Yu Watanabe2019-01-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `timedatectl set-time` is called, NTP client may be in 'activating' or something. For safety, let's treat such states as 'active'. This also changes all unit file status except for 'masked' or 'disabled' are treated as 'enabled'.
* | | | | Merge pull request #11349 from yuwata/udevadm-control-pingZbigniew Jędrzejewski-Szmek2019-01-188-73/+104
|\ \ \ \ \ | |_|/ / / |/| | | | Add 'udevadm control --ping'
| * | | | udevd: rename control command SYNC -> PING in log messageYu Watanabe2019-01-181-1/+1
| | | | |
| * | | | udevadm: add --wait-daemon option to 'trigger' commandYu Watanabe2019-01-181-1/+36
| | | | |
| * | | | udevadm: add --ping option to 'control' commandYu Watanabe2019-01-181-12/+23
| | | | | | | | | | | | | | | | | | | | This exposes `udev_ctrl_send_ping()`.
| * | | | udev: use usec_t for timeout in udev_ctrl_send_*()Yu Watanabe2019-01-134-32/+25
| | | | |