chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
resolved: set LLMNR TCP and UDP TTLs to the values suggested by the RFC
[elogind.git]
/
src
/
core
/
namespace.c
diff --git
a/src/core/namespace.c
b/src/core/namespace.c
index d1513ce2ddea54da93b4a556cdca11e22f14081b..fe9537787185c6755f9778593ae5aa393d760e7a 100644
(file)
--- a/
src/core/namespace.c
+++ b/
src/core/namespace.c
@@
-69,6
+69,7
@@
static int append_mounts(BindMount **p, char **strv, MountMode mode) {
STRV_FOREACH(i, strv) {
(*p)->ignore = false;
STRV_FOREACH(i, strv) {
(*p)->ignore = false;
+ (*p)->done = false;
if ((mode == INACCESSIBLE || mode == READONLY || mode == READWRITE) && (*i)[0] == '-') {
(*p)->ignore = true;
if ((mode == INACCESSIBLE || mode == READONLY || mode == READWRITE) && (*i)[0] == '-') {
(*p)->ignore = true;
@@
-123,8
+124,7
@@
static void drop_duplicates(BindMount *m, unsigned *n) {
if (previous && path_equal(f->path, previous->path))
continue;
if (previous && path_equal(f->path, previous->path))
continue;
- t->path = f->path;
- t->mode = f->mode;
+ *t = *f;
previous = t;
previous = t;
@@
-333,7
+333,7
@@
static int make_read_only(BindMount *m) {
if (IN_SET(m->mode, INACCESSIBLE, READONLY))
r = bind_remount_recursive(m->path, true);
if (IN_SET(m->mode, INACCESSIBLE, READONLY))
r = bind_remount_recursive(m->path, true);
- else if (
m->mode == READWRITE
)
+ else if (
IN_SET(m->mode, READWRITE, PRIVATE_TMP, PRIVATE_VAR_TMP, PRIVATE_DEV)
)
r = bind_remount_recursive(m->path, false);
else
r = 0;
r = bind_remount_recursive(m->path, false);
else
r = 0;
@@
-375,7
+375,7
@@
int setup_namespace(
(protect_system == PROTECT_SYSTEM_FULL ? 1 : 0);
if (n > 0) {
(protect_system == PROTECT_SYSTEM_FULL ? 1 : 0);
if (n > 0) {
- m = mounts = (BindMount *) alloca(n * sizeof(BindMount));
+ m = mounts = (BindMount *) alloca
0
(n * sizeof(BindMount));
r = append_mounts(&m, read_write_dirs, READWRITE);
if (r < 0)
return r;
r = append_mounts(&m, read_write_dirs, READWRITE);
if (r < 0)
return r;