summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-25 15:51:37 +0200
committerDjalal Harouni <tixxdz@opendz.org>2016-09-25 10:42:18 +0200
commit160cfdbed3eb23b6bc3c17613685b756f23be4a1 (patch)
tree49e057f4719051a04b757ebb4abb479780251cd9
parent6b7c9f8bce4679c89f3b89cacfd4932c0aeadad4 (diff)
namespace: add some debug logging when enforcing InaccessiblePaths=
-rw-r--r--src/core/namespace.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/namespace.c b/src/core/namespace.c
index b0dab9459e..e08d7459c5 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -345,7 +345,6 @@ static int apply_mount(
const char *what;
int r;
- struct stat target;
assert(m);
@@ -353,7 +352,8 @@ static int apply_mount(
switch (m->mode) {
- case INACCESSIBLE:
+ case INACCESSIBLE: {
+ struct stat target;
/* First, get rid of everything that is below if there
* is anything... Then, overmount it with an
@@ -363,7 +363,7 @@ static int apply_mount(
if (lstat(m->path, &target) < 0) {
if (m->ignore && errno == ENOENT)
return 0;
- return -errno;
+ return log_debug_errno(errno, "Failed to lstat() %s to determine what to mount over it: %m", m->path);
}
what = mode_to_inaccessible_node(target.st_mode);
@@ -372,6 +372,7 @@ static int apply_mount(
return -ELOOP;
}
break;
+ }
case READONLY:
case READWRITE: