summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
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-06Merge pull request #2970 from msekletar/machine-id-prefix-rootaZbigniew Jędrzejewski-Szmek
machine-id-setup: simplify by using prefix_roota
2016-04-06machine-id-setup: simplify by using prefix_rootaMichal Sekletar
2016-04-02rpm triggers: add note about minimum supported versionZbigniew Jędrzejewski-Szmek
2016-03-31core: treat masked files as "unchanged"Zbigniew Jędrzejewski-Szmek
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.
2016-03-31core/unit: extract checking of stat paths into helper functionZbigniew Jędrzejewski-Szmek
The same code was repeated three times.
2016-03-30core: improve error message when starting template without instanceLukas Nykryn
2016-03-29Merge pull request #2903 from keszybz/cgroup2-v3Zbigniew Jędrzejewski-Szmek
core: cgroup2 support
2016-03-29core: ShutdownWatchdogSec=infinity disables the watchdog logic tooEvgeny Vereshchagin
This is a follow-up for 947292eef
2016-03-28core: RuntimeWatchdogSec=infinity disables the watchdog logicEvgeny Vereshchagin
2016-03-26core: update invoke_sigchld_event() to handle NULL ->sigchld_event()Tejun Heo
After receiving SIGCHLD, one of the ways manager_dispatch_sigchld() maps the now zombie $PID to its unit is through manager_get_unit_by_pid_cgroup() which reads /proc/$PID/cgroup and looks up the unit associated with the cgroup path. On non-unified cgroup hierarchies, a process is immediately migrated to the root cgroup on death and the cgroup lookup would always have returned the unit associated with it, making it rather pointless but safe. On unified hierarchy, a zombie remains associated with the cgroup that it was associated with at the time of death and thus manager_get_unit_by_pid_cgroup() will look up the unit properly. However, by the time manager_dispatch_sigchld() is running, the original cgroup may have become empty and it and its associated unit might already have been removed. If the cgroup path doesn't yield a match, manager_dispatch_sigchld() keeps pruning the leaf component. This means that the function may return a slice unit for a pid and as a slice doesn't have ->sigchld_event() handler, calling invoke_sigchld_event() on it causes a segfault. This patch updates invoke_sigchld_event() so that it skips calling if the handler is not set.
2016-03-26core: update populated event handling in unified hierarchyTejun Heo
Earlier during the development of unified hierarchy, the populated event was reported through by the dedicated "cgroup.populated" file; however, the interface was updated so that it's reported through the "populated" field of "cgroup.events" file. Update populated event handling logic accordingly.
2016-03-26cgroup2: use new fstype for unified hierarchyAlban Crequy
Since Linux v4.4-rc1, __DEVEL__sane_behavior does not exist anymore and is replaced by a new fstype "cgroup2". With this patch, systemd no longer supports the old (unstable) way of doing unified hierarchy with __DEVEL__sane_behavior and systemd now requires Linux v4.4 for unified hierarchy. Non-unified hierarchy is still the default and is unchanged by this patch. https://github.com/torvalds/linux/commit/67e9c74b8a873408c27ac9a8e4c1d1c8d72c93ff
2016-03-24core: fix "stoppping" typoMartin Pitt
2016-03-23core: Fix path for opening ffs endpoint ep0Georgia Brikis
usbffs_address_create() expects an absolute path to the file that is supposed to be opened. The path specified only leads to the directory containing the endpoint ep0 not the endpoint itself. This commit adds the endpoints name to the path.
2016-03-21Merge pull request #2760 from ronnychevalier/rc/core_no_new_privileges_seccompv3Daniel Mack
core: set NoNewPrivileges for seccomp if we don't have CAP_SYS_ADMIN
2016-03-17Merge pull request #2854 from keszybz/log-colorsDaniel Mack
systemd: obey systemd.log_color config
2016-03-17systemd: obey systemd.log_color configZbigniew Jędrzejewski-Szmek
Fixes #2845.
2016-03-16core: look for instance when processing template nameMichal Sekletar
If first attempt to merge units failed and we are trying to do merge the other way around and at the same time we are working with template name, then other unit can't possibly be template, because it is not possible to have template unit running, only instances of the template. Thus we need to look for already active instance instead.
2016-03-16Merge pull request #2797 from evverx/selinux-use-rawZbigniew Jędrzejewski-Szmek
selinux: use *_raw API from libselinux
2016-03-14Merge pull request #2834 from coling/masterZbigniew Jędrzejewski-Szmek
2016-03-14device: Ensure we have sysfs path before comparing.Colin Guthrie
In some cases we do not have a udev device when setting up a unit (certainly the code gracefully handles this). However, we do then go on to compare the path via path_equal which will assert if a null value is passed in. See https://bugs.mageia.org/show_bug.cgi?id=17766 Not sure if this is the correct fix, but it avoids the crash
2016-03-10Merge pull request #2794 from jhol/dont-unmount-initramfs-mountsDaniel Mack
core/mount: Don't unmount initramfs mounts
2016-03-09Merge pull request #2793 from fbuihuu/fstab-generator-automount-optionZbigniew Jędrzejewski-Szmek
fstab-generator: fix automounts to not mount automatically
2016-03-04fstab-generator: fix automount option and don't start associated mount unit ↵Franck Bui
at boot Without this patch applied the mount unit with 'automount' option was still pulled by local-fs.target and thus was activated during the boot process which defeats the purpose of the 'automount' option: $ grep /mnt /etc/fstab /dev/vdb1 /mnt ext2 defaults,x-systemd.automount 0 0 $ reboot ... $ mount | grep mnt systemd-1 on /mnt type autofs (rw,relatime,fd=34,pgrp=1,timeout=0,minproto=5,maxproto=5,direct) /dev/vdb1 on /mnt type ext2 (rw,relatime) $ systemctl status mnt.mount | grep Active Active: active (mounted) since Thu 2016-03-03 21:36:22 CET; 42s ago With the patch applied: $ reboot ... $ mount | grep mnt systemd-1 on /mnt type autofs (rw,relatime,fd=22,pgrp=1,timeout=0,minproto=5,maxproto=5,direct) $ systemctl status mnt.mount | grep Active Active: inactive (dead) $ ls /mnt lost+found $ systemctl status mnt.mount | grep Active Active: active (mounted) since Thu 2016-03-03 21:47:32 CET; 4s ago
2016-03-04core/mount: Don't unmount initramfs mountsJoel Holdsworth
A mount within /run/initramfs is indicative that the mount was created by initramfs init and will be unmounted by initramfs shutdown. It is unlikely that such a mount point would even be unmountable by the the main system, for example in the case of the root file- system being loop-mounted from a file in a /run/initramfs mount.
2016-03-04core/failure-action: Set job-modes to replace-irreversiblyJoel Holdsworth
Up until now, the failure action has launched reboot.target and poweroff.target with a less aggressive job mode than "systemctl reboot" does. This has meant that the reboot and power- off operations can stall if there are any conflicts with the target during rebooting.
2016-03-04selinux: use *_raw API from libselinuxEvgeny Vereshchagin
This is a follow-up to 5c5433ad32
2016-03-01selinux: always try to load the full selinux dbZbigniew Jędrzejewski-Szmek
https://github.com/systemd/systemd/pull/2508#issuecomment-190901170 Maybe fixes https://bugzilla.redhat.com/show_bug.cgi?id=1308771.
2016-02-29Merge pull request #2771 from 0xAX/core-kernel-timestamp-cleanupLennart Poettering
core: use DUAL_TIMESTAMP_NULL to reset kernel_timestamp
2016-02-29core: use DUAL_TIMESTAMP_NULL to reset kernel_timestampAlexander Kuleshov
instead of direct reset of kernel_timestamp fields.
2016-02-28Merge pull request #2753 from phomes/trivial-fixes2Zbigniew Jędrzejewski-Szmek
Trivial fixes
2016-02-28core: set NoNewPrivileges for seccomp if we don't have CAP_SYS_ADMINRonny Chevalier
The manpage of seccomp specify that using seccomp with SECCOMP_SET_MODE_FILTER will return EACCES if the caller do not have CAP_SYS_ADMIN set, or if the no_new_privileges bit is not set. Hence, without NoNewPrivilege set, it is impossible to use a SystemCall* directive with a User directive set in system mode. Now, NoNewPrivileges is set if we are in user mode, or if we are in system mode and we don't have CAP_SYS_ADMIN, and SystemCall* directives are used.
2016-02-26tree-wide: indentation fixesThomas Hindoe Paaboel Andersen
2016-02-26clock-util: make clock_is_localtime() testable and add initial testsMartin Pitt
Add path argument to clock_is_localtime() and default to "/etc/adjtime" if it's NULL. This makes the function testable. Add test-clock: initial test cases for some scenarios, using a temporary file. This also checks the behaviour with a NULL (i. e. the system's /etc/adjtime) file.
2016-02-25Merge pull request #2671 from 0xAX/move-pager-open-to-one-placeZbigniew Jędrzejewski-Szmek
tree-wide: merge pager_open_if_enabled() to the pager_open()
2016-02-26tree-wide: merge pager_open_if_enabled() to the pager_open()Alexander Kuleshov
Many subsystems define own pager_open_if_enabled() function which checks '--no-pager' command line argument and open pager depends on its value. All implementations of pager_open_if_enabled() are the same. Let's merger this function with pager_open() from the shared/pager.c and remove pager_open_if_enabled() from all subsytems to prevent code duplication.
2016-02-23tree-wide: minor formatting inconsistency cleanupsVito Caputo
2016-02-22tree-wide: make ++/-- usage consistent WRT spacingVito Caputo
Throughout the tree there's spurious use of spaces separating ++ and -- operators from their respective operands. Make ++ and -- operator consistent with the majority of existing uses; discard the spaces.
2016-02-20core: exclude .slice units from "systemctl isolate"Lennart Poettering
Fixes: #1969
2016-02-18core: revert "core: resolve specifier in config_parse_exec()"Evgeny Vereshchagin
This reverts commit cb48dfca6a8bc15d9081651001a16bf51e03838a. Exec*-settings resolve specifiers twice: %%U -> config_parse_exec [cb48dfca6a8] -> %U -> service_spawn -> 0 Fixes #2637
2016-02-16Merge pull request #2623 from poettering/networkd-fixesZbigniew Jędrzejewski-Szmek
Networkd, resolved, build-sys fixes
2016-02-16core: fix assertion checkLennart Poettering
Fixes: #2632
2016-02-16main: no need to set errno manuallyAlexander Kuleshov
If we are not PID 1 and started as init, we executing systemctl with execv(). Here no need to set errno manually, because in a failure case, because the execv() anyway will set errno depends on a error.
2016-02-13service: remove unnecessary checkAlexander Kuleshov
We call dual_timestamp_serialize() only if the s->watchdog_timestamp is set. But the dual_timestamp_serialize() already checks a given dual timestamp by the call of the dual_timestamp_is_set(). So we can remove this check safely.
2016-02-13Merge pull request #2603 from poettering/drop-compat-libsZbigniew Jędrzejewski-Szmek
Some spring cleaning
2016-02-13core: drop Capabilities= settingLennart Poettering
The setting is hardly useful (since its effect is generally reduced to zero due to file system caps), and with the advent of ambient caps an actually useful replacement exists, hence let's get rid of this. I am pretty sure this was unused and our man page already recommended against its use, hence this should be a safe thing to remove.
2016-02-12core: fix indenting in dump outputLennart Poettering
Fixes: #2593
2016-02-11Remove kdbus custom endpoint supportDaniel Mack
This feature will not be used anytime soon, so remove a bit of cruft. The BusPolicy= config directive will stay around as compat noop.
2016-02-11core: use correct enumThomas Hindoe Paaboel Andersen
from e903182e5b0daa941de47a9c08c824106cec7fe0