chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
machined: make image read-only check indepenednt on own privs
[elogind.git]
/
src
/
machine
/
image.c
diff --git
a/src/machine/image.c
b/src/machine/image.c
index 1574adf30b1531dac024bded9a5784e8499679e1..8a119e5db71abea5b315507b1523d8a5eab6ad71 100644
(file)
--- 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")) ||
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)) {
if (S_ISDIR(st.st_mode)) {