X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fmount.c;h=2b19f497f33bc77bb5129b278b0ae75aa64df654;hp=209e19c175d127a07f15b30547d7ddfd6b36c5d3;hb=c8f4d7642b743c79328e10e8fb2d9b58e9f6b999;hpb=cb39ed3fdeb102a921e862a23b90607b5242f94e diff --git a/src/mount.c b/src/mount.c index 209e19c17..2b19f497f 100644 --- a/src/mount.c +++ b/src/mount.c @@ -65,7 +65,11 @@ static void mount_init(Unit *u) { m->directory_mode = 0755; exec_context_init(&m->exec_context); - m->exec_context.std_output = EXEC_OUTPUT_KMSG; + + /* The stdio/kmsg bridge socket is on /, in order to avoid a + * dep loop, don't use kmsg logging for -.mount */ + if (!unit_has_name(u, "-.mount")) + m->exec_context.std_output = EXEC_OUTPUT_KMSG; /* We need to make sure that /bin/mount is always called in * the same process group as us, so that the autofs kernel @@ -76,6 +80,8 @@ static void mount_init(Unit *u) { m->timer_watch.type = WATCH_INVALID; m->control_command_id = _MOUNT_EXEC_COMMAND_INVALID; + + m->meta.ignore_on_isolate = true; } static void mount_unwatch_control_pid(Mount *m) { @@ -476,6 +482,11 @@ static int mount_verify(Mount *m) { return -EINVAL; } + if (mount_point_is_api(m->where) || mount_point_ignore(m->where)) { + log_error("Cannot create mount unit for API file system %s. Refusing.", m->where); + return -EINVAL; + } + if (m->meta.fragment_path && !m->parameters_fragment.what) { log_error("%s's What setting is missing. Refusing.", m->meta.id); return -EBADMSG; @@ -785,6 +796,7 @@ static void mount_enter_signal(Mount *m, MountState state, bool success) { wait_for_exit = true; set_free(pid_set); + pid_set = NULL; } } @@ -1299,9 +1311,7 @@ static int mount_add_one( /* Ignore API mount points. They should never be referenced in * dependencies ever. */ - if (mount_point_is_api(where)) - return 0; - if (mount_point_ignore(where)) + if (mount_point_is_api(where) || mount_point_ignore(where)) return 0; if (streq(fstype, "autofs")) @@ -1755,7 +1765,6 @@ const UnitVTable mount_vtable = { .no_alias = true, .no_instances = true, - .no_isolate = true, .show_status = true, .init = mount_init,