You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
906 B
29 lines
906 B
7 years ago
|
From 14eaa63230a16a32f49db74d4b0d78247874ccdd Mon Sep 17 00:00:00 2001
|
||
|
From: Didier Roche <didrocks@ubuntu.com>
|
||
|
Date: Wed, 13 Jan 2016 12:49:57 +0100
|
||
|
Subject: [PATCH] Avoid /tmp being mounted as tmpfs without the user's will
|
||
|
|
||
|
Ensure PrivateTmp doesn't require tmpfs through tmp.mount, but rather
|
||
|
adds an After relationship.
|
||
|
|
||
|
rhel-only
|
||
|
|
||
|
Resolves: #1298109
|
||
|
---
|
||
|
src/core/unit.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/core/unit.c b/src/core/unit.c
|
||
|
index ae47a2876..4fb2fd300 100644
|
||
|
--- a/src/core/unit.c
|
||
|
+++ b/src/core/unit.c
|
||
|
@@ -807,7 +807,7 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) {
|
||
|
return 0;
|
||
|
|
||
|
if (c->private_tmp) {
|
||
|
- r = unit_require_mounts_for(u, "/tmp");
|
||
|
+ r = unit_add_dependency_by_name(u, UNIT_AFTER, "tmp.mount", NULL, true);
|
||
|
if (r < 0)
|
||
|
return r;
|
||
|
|