summaryrefslogtreecommitdiff
path: root/src/core/mount-setup.c
AgeCommit message (Collapse)Author
2013-04-24Small cleanupZbigniew Jędrzejewski-Szmek
2013-04-24Add set_consume which always takes ownershipZbigniew Jędrzejewski-Szmek
Freeing in error path is the common pattern with set_put().
2013-04-24Standarize on one spelling of symlink error messageZbigniew Jędrzejewski-Szmek
It's polite to print the name of the link that wasn't created, and it makes little sense to print the target.
2013-04-24systemd: fall back to mounting /sys/fs/cgroup sans xattrZbigniew Jędrzejewski-Szmek
xattrs on cgroup fs were added back in v3.6-rc3-3-g03b1cde. But we support kernels >= 2.6.39, and we should also support kernels compiled w/o xattr support, even if systemd is compiled with xattr support. Fall back to mounting without xattr support. Tested-by: Colin Walters <walters@verbum.org>
2013-04-21systemd,nspawn: use extended attributes to store metadataZbigniew Jędrzejewski-Szmek
All attributes are stored as text, since root_directory is already text, and it seems easier to have all of them in text format. Attributes are written in the trusted. namespace, because the kernel currently does not allow user. attributes on cgroups. This is a PITA, and CAP_SYS_ADMIN is required to *read* the attributes. Alas. A second pipe is opened for the child to signal the parent that the cgroup hierarchy has been set up.
2013-04-04util: make time formatting a bit smarterLennart Poettering
Instead of outputting "5h 55s 50ms 3us" we'll now output "5h 55.050003s". Also, while outputting the accuracy is configurable. Basically we now try use "dot notation" for all time values > 1min. For >= 1s we use 's' as unit, otherwise for >= 1ms we use 'ms' as unit, and finally 'us'. This should give reasonably values in most cases.
2013-03-22mount: mount all cgroup controllers in containers, tooLennart Poettering
2013-03-15core: reuse the same /tmp, /var/tmp and inaccessible dirMichal Sekletar
All Execs within the service, will get mounted the same /tmp and /var/tmp directories, if service is configured with PrivateTmp=yes. Temporary directories are cleaned up by service itself in addition to systemd-tmpfiles. Directory which is mounted as inaccessible is created at runtime in /run/systemd.
2013-03-15sd-booted: update sd_booted() check a bitLennart Poettering
Previously we were testing whether /sys/fs/cgroup/systemd/ was a mount point. This might be problematic however, when the cgroup trees are bind mounted into a container from the host (which should be absolutely valid), which might create the impression that the container was running systemd, but only the host actually is. Replace this by a check for the existance of the directory /run/systemd/system/, which should work unconditionally, since /run can never be a bind mount but *must* be a tmpfs on systemd systems, which is flushed at boots. This means that data in /run always reflects information about the current boot, and only of the local container, which makes it the perfect choice for a check like this. (As side effect this is nice to Ubuntu people who now use logind with the systemd cgroup hierarchy, where the old sd_booted() check misdetects systemd, even though they still run legacy Upstart.)
2013-03-07core: mount and initialize SmackNathaniel Chen
SMACK is the Simple Mandatory Access Control Kernel, a minimal approach to Access Control implemented as a kernel LSM. The kernel exposes the smackfs filesystem API through which access rules can be loaded. At boot time, we want to load the access rules as early as possible to ensure all early boot steps are checked by Smack. This patch mounts smackfs at the new location at /sys/fs/smackfs for kernels 3.8 and above. The /smack mountpoint is not supported. After mounting smackfs, rules are loaded from the usual location. For more information about Smack see: http://www.kernel.org/doc/Documentation/security/Smack.txt
2013-02-27mount-setup: mount pstore filesystemKay Sievers
2013-02-13build-sys: make EFI support build-time optionalLennart Poettering
2013-02-13efi: various cleanupsLennart Poettering
2013-01-21util: move is_efiboot() to efivars.cLennart Poettering
2012-11-04mount-setup: try mounting 'efivarfs' only if the system bootet with EFIKay Sievers
2012-10-30systemd: mount the EFI variable filesystemLee, Chun-Yi
Add efivarfs to the mount_table in mount-setup.c, so the EFI variable filesystem will be mounted when systemd executed. The EFI variable filesystem will merge in v3.7 or v3.8 linux kernel. Cc: Kay Sievers <kay@vrfy.org> Cc: Lennart Poettering <lennart@poettering.net> Cc: Mantas Mikulėnas <grawity@gmail.com> Cc: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Cc: Matt Fleming <matt.fleming@intel.com> Cc: Jeremy Kerr <jeremy.kerr@canonical.com> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
2012-09-18mount: don't mount securityfs in a containerLennart Poettering
2012-08-21dev-setup: make NULL as parameter for dev_setup() equivalent to ""Lennart Poettering
2012-08-21dev-setup: allow a path prefix for use in chrootsDave Reisner
With this adjustment, we can reuse this code elsewhere, such as in nspawn.
2012-08-06mount-setup: change system mount propagation to shared by defaultLennart Poettering
In order to make containers work nicely out of the box it is highly desirable to have the mount propagation mode for the root fs is set as "shared" by default so that containers receive system mounts by default. (See mount --make-shared for more information). As it is unlikely that the kernel will change the default to "shared" for this, do this early at boot-up from PID 1. Setups which prefer the default of "private" should undo this change via invoking "mount --make-private /" or a similar command after boot. In the long run /etc/fstab should take the propagation mode as a mount option like any other, so that this may be used to change the default mode. However, if fstab is not around or doesn't list / we still should default to shared as propagation mode, hence this change now.
2012-08-06continue work with error messages, log_oom()Shawn Landden
Adds messages for formally silent errors: new "Failed on cmdline argument %s: %s". Removes some specific error messages for -ENOMEM in mount-setup.c. A few specific ones have been left in other binaries.
2012-07-03mount-setup: don't complain if we try to fix the label of a dir beneath a ↵Lennart Poettering
mount but can't due to EROFS
2012-06-01missing: define MS_STRICTATIME if not defined alreadyLennart Poettering
2012-05-31mkdir: append _label to all mkdir() calls that explicitly set the selinux ↵Kay Sievers
context
2012-05-08util: split-out path-util.[ch]Kay Sievers
2012-04-22mount-setup: ignore common container bind mountsLennart Poettering
2012-04-20mount-setup: don't log with LOG_ERROR if a mount that doesn't matter failsLennart Poettering
2012-04-17udev: unify /dev static symlink setupKay Sievers
2012-04-17selinux: unify systemd and udev codeKay Sievers
2012-04-12build-sys: move *-setup out of shared to avoid selinux being pulled inLennart Poettering