chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strv: detect non-assignments in env blocks properly in env_append()
[elogind.git]
/
src
/
mount.c
diff --git
a/src/mount.c
b/src/mount.c
index 2d8542d9dfd330795feaf67bf5a5da470b52916a..2b19f497f33bc77bb5129b278b0ae75aa64df654 100644
(file)
--- 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->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
/* 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->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) {
}
static void mount_unwatch_control_pid(Mount *m) {
@@
-476,6
+482,11
@@
static int mount_verify(Mount *m) {
return -EINVAL;
}
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;
if (m->meta.fragment_path && !m->parameters_fragment.what) {
log_error("%s's What setting is missing. Refusing.", m->meta.id);
return -EBADMSG;
@@
-1300,9
+1311,7
@@
static int mount_add_one(
/* Ignore API mount points. They should never be referenced in
* dependencies ever. */
/* 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"))
return 0;
if (streq(fstype, "autofs"))
@@
-1756,7
+1765,6
@@
const UnitVTable mount_vtable = {
.no_alias = true,
.no_instances = true,
.no_alias = true,
.no_instances = true,
- .no_isolate = true,
.show_status = true,
.init = mount_init,
.show_status = true,
.init = mount_init,