Systemd/src
Lennart Poettering e5b4220341 shared: rework switch_root() code
Let's follow symlinks before invoking mount() on arbitrary paths, so that we
won't get confused if directories are prepared with absolute symlinks.

Use FOREACH_STRING() instead of NULSTR_FOREACH() as it is more readable.

Don't use snprintf() for concatenating strings, let chase_symlinks() to that.

Replace homegrown mount check with path_is_mount_point(). Also, change the
behaviour when we encounter this: instead of unmounting the old mount point,
simply leave it around and don't replace it, so that initrds can mount stuff
there with different settings than we would apply. This is in-line with how we
handle automatic mounts in nspawn for example.

Use umount_recursive() instead of a simple umount2() for unmounting the old
root, so that we actually cover really all mounts, not just the top-level one.
2016-12-21 19:09:29 +01:00
..
ac-power
activate tree-wide: set SA_RESTART for signal handlers we install 2016-12-01 12:41:17 +01:00
analyze analyze: fix build without seccomp 2016-11-10 10:12:31 +01:00
ask-password
backlight tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
basic util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
binfmt
boot bootctl: fix typo (#4897) 2016-12-16 15:41:31 +01:00
cgls tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
cgroups-agent
cgtop tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
core util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
coredump coredumpctl: let gdb handle the SIGINT signal (#4901) 2016-12-17 09:49:17 -05:00
cryptsetup util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
dbus1-generator
debug-generator util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
delta tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) 2016-12-09 10:04:30 +01:00
detect-virt detect-virt: add --private-users switch to check if a userns is active 2016-10-26 20:12:51 -04:00
dissect dissect: optionally, only look for GPT partition tables, nothing else 2016-12-20 20:00:09 +01:00
escape tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
firstboot util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
fsck util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
fstab-generator util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
getty-generator
gpt-auto-generator qutoacheck,gpt-auto-generator: trivial coding style improvements 2016-12-21 19:09:28 +01:00
hibernate-resume util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
hostname networkd: allow networkd to set the timezone in timedated 2016-11-23 16:32:06 +01:00
hwdb hwdb: emit warning when matches are specified at the very end of file 2016-12-11 18:01:26 -05:00
import nspawn: add fallback top normal copy/reflink when we cannot btrfs snapshot 2016-11-22 13:35:09 +01:00
initctl Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
journal journald: don't flush to /var/log/journal before we get asked to 2016-12-21 19:09:29 +01:00
journal-remote python: adjust imports, indentation, unused variables following pylint advice 2016-12-01 18:55:23 -05:00
kernel-install kernel-install: use exit instead of return (#4565) 2016-11-04 08:58:41 -04:00
libsystemd Add sd_is_socket_sockaddr (#4885) 2016-12-14 11:51:26 +01:00
libsystemd-network network: fix const qualifier (#4849) 2016-12-07 16:42:17 -05:00
libudev libudev: set errno if udev_new() fails 2016-12-07 18:38:40 +01:00
locale tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
login pam: include pam_keyinit.so in our PAM fragments 2016-12-13 20:59:36 +01:00
machine dissect: optionally, only look for GPT partition tables, nothing else 2016-12-20 20:00:09 +01:00
machine-id-setup machine-id-setup: `--print --commit` respects the --root option 2016-12-13 13:03:13 +00:00
modules-load util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
mount tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
network networkd-ndisc: handle missing mtu gracefully (#4913) 2016-12-19 15:34:07 +01:00
notify Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
nspawn nspawn: restore --volatile=yes support 2016-12-21 19:09:28 +01:00
nss-myhostname
nss-mymachines nss-mymachines: avoid connecting to dbus from inside dbus-daemon 2016-08-19 00:52:00 +02:00
nss-resolve nss-resolve: be a bit more careful with returning NSS_STATUS_NOTFOUND 2016-10-24 19:04:43 +02:00
nss-systemd nss-systemd: remove useless define 2016-10-22 18:39:08 -04:00
path
quotacheck qutoacheck,gpt-auto-generator: trivial coding style improvements 2016-12-21 19:09:28 +01:00
random-seed
rc-local-generator tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
remount-fs tree-wide: always invoke setmntent() with "re" mode 2016-12-20 20:00:09 +01:00
reply-password
resolve core: introduce parse_ip_port (#4825) 2016-12-06 12:21:45 +01:00
rfkill tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
run Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
shared shared: rework switch_root() code 2016-12-21 19:09:29 +01:00
sleep
socket-proxy socket-proxyd: Introduced dynamic connection limit via an option. (#4749) 2016-11-28 18:25:11 +01:00
stdio-bridge
sysctl sysctl: minor simplification 2016-11-02 11:39:48 -06:00
system-update-generator Use SPECIAL_DEFAULT_TARGET consistently 2016-12-17 17:26:59 -05:00
systemctl systemctl: do not segfault when we cannot find template unit (#4915) 2016-12-20 11:09:59 +01:00
systemd Add sd_is_socket_sockaddr (#4885) 2016-12-14 11:51:26 +01:00
sysusers Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
sysv-generator sysv-generator: properly translate sysv facilities 2016-12-14 18:29:30 +01:00
test util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
timedate Add enable_disable() helper 2016-07-31 22:48:22 -04:00
timesync timesyncd: clear ADJ_MAXERROR to keep STA_UNSYNC cleared after jump adjust (#4626) 2016-11-11 18:50:46 +01:00
tmpfiles tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) 2016-12-09 10:04:30 +01:00
tty-ask-password-agent core: when determining whether a process exit status is clean, consider whether it is a command or a daemon 2016-10-10 22:57:01 +02:00
udev util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
update-done update-done: minor clean-ups 2016-10-24 17:29:51 +02:00
update-utmp Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
user-sessions
vconsole Merge pull request #4448 from msoltyspl/vcfix 2016-10-26 20:55:18 -04:00
.gitignore
Makefile