Lines Matching refs:mount
22 #include <sys/mount.h>
915 return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED, "Container does not allow propagation of mount points.");
917 /* Our goal is to install a new bind mount into the container,
922 that we can mount MS_SLAVE. (Which is necessary, since
931 if (mount(mount_slave, mount_slave, NULL, MS_BIND, NULL) < 0) {
932 r = sd_bus_error_set_errnof(error, errno, "Failed to make bind mount %s: %m", mount_slave);
938 if (mount(NULL, mount_slave, NULL, MS_SLAVE, NULL) < 0) {
943 /* Second, we mount the source directory to a directory inside
945 mount_tmp = strjoina(mount_slave, "/mount");
947 r = sd_bus_error_set_errnof(error, errno, "Failed to create temporary mount point %s: %m", mount_tmp);
953 if (mount(src, mount_tmp, NULL, MS_BIND, NULL) < 0) {
960 /* Third, we remount the new bind mount read-only if requested. */
962 if (mount(NULL, mount_tmp, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY, NULL) < 0) {
967 /* Fourth, we move the new bind mount into the propagation
979 if (mount(mount_tmp, mount_outside, NULL, MS_MOVE, NULL) < 0) {
1017 r = log_error_errno(errno, "Failed to open mount namespace of leader: %m");
1029 /* Fifth, move the mount to the right place inside */
1031 if (mount(mount_inside, dest, NULL, MS_MOVE, NULL) < 0) {
1032 r = log_error_errno(errno, "Failed to mount: %m");
1059 r = sd_bus_error_set_errnof(error, r, "Failed to mount: %m");
1211 r = log_error_errno(errno, "Failed to open mount namespace of leader: %m");