Blame SOURCES/0265-Avoid-tmp-being-mounted-as-tmpfs-without-the-user-s-.patch
|
|
923a60 |
From 14eaa63230a16a32f49db74d4b0d78247874ccdd Mon Sep 17 00:00:00 2001
|
|
|
923a60 |
From: Didier Roche <didrocks@ubuntu.com>
|
|
|
923a60 |
Date: Wed, 13 Jan 2016 12:49:57 +0100
|
|
|
923a60 |
Subject: [PATCH] Avoid /tmp being mounted as tmpfs without the user's will
|
|
|
923a60 |
|
|
|
923a60 |
Ensure PrivateTmp doesn't require tmpfs through tmp.mount, but rather
|
|
|
923a60 |
adds an After relationship.
|
|
|
923a60 |
|
|
|
923a60 |
rhel-only
|
|
|
923a60 |
|
|
|
923a60 |
Resolves: #1298109
|
|
|
923a60 |
---
|
|
|
923a60 |
src/core/unit.c | 2 +-
|
|
|
923a60 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
923a60 |
|
|
|
923a60 |
diff --git a/src/core/unit.c b/src/core/unit.c
|
|
|
923a60 |
index ae47a28765..4fb2fd3001 100644
|
|
|
923a60 |
--- a/src/core/unit.c
|
|
|
923a60 |
+++ b/src/core/unit.c
|
|
|
923a60 |
@@ -807,7 +807,7 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) {
|
|
|
923a60 |
return 0;
|
|
|
923a60 |
|
|
|
923a60 |
if (c->private_tmp) {
|
|
|
923a60 |
- r = unit_require_mounts_for(u, "/tmp");
|
|
|
923a60 |
+ r = unit_add_dependency_by_name(u, UNIT_AFTER, "tmp.mount", NULL, true);
|
|
|
923a60 |
if (r < 0)
|
|
|
923a60 |
return r;
|
|
|
923a60 |
|