summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-26 19:36:25 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-26 19:36:25 +0100
commit08ff5529dfd4fd2588d6fc9e194cc732795a85e6 (patch)
treea14db166fb4c0f780ecc6648cc14fefe874c7ab5 /src/machine
parent8937e7b68940d0fa0d0aab90eb7425fa7dccebc9 (diff)
machined: make image read-only check indepenednt on own privs
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/machine/image.c b/src/machine/image.c
index 1574adf30b..8a119e5db7 100644
--- a/src/machine/image.c
+++ b/src/machine/image.c
@@ -112,7 +112,7 @@ static int image_make(
read_only =
(path && path_startswith(path, "/usr")) ||
- faccessat(dfd, filename, W_OK, AT_EACCESS) < 0;
+ (faccessat(dfd, filename, W_OK, AT_EACCESS) < 0 && errno == EROFS);
if (S_ISDIR(st.st_mode)) {