Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
systemd-mini.1472
0003-namespace-make-sure-tmp-var-tmp-and-dev-ar...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0003-namespace-make-sure-tmp-var-tmp-and-dev-are-writable.patch of Package systemd-mini.1472
Based on 664064d60c36e1f62c7e9177e4c7498035467e07 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Thu, 3 Jul 2014 16:27:57 +0200 Subject: [PATCH] namespace: make sure /tmp, /var/tmp and /dev are writable in namespaces we set up --- src/core/namespace.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/namespace.c b/src/core/namespace.c index e977e7e..a64ca2e 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -262,10 +262,13 @@ static int make_read_only(BindMount *m) { assert(m); - if (m->mode != INACCESSIBLE && m->mode != READONLY) - return 0; + if (IN_SET(m->mode, INACCESSIBLE, READONLY)) + r = mount(NULL, m->path, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY|MS_REC, NULL); + else if (IN_SET(m->mode, READWRITE, PRIVATE_TMP, PRIVATE_VAR_TMP, PRIVATE_DEV)) + r = mount(NULL, m->path, NULL, MS_BIND|MS_REMOUNT|MS_REC, NULL); + else + r = 0; - r = mount(NULL, m->path, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY|MS_REC, NULL); if (r < 0 && !(m->ignore && errno == ENOENT)) return -errno; -- 2.6.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor