machined: make image read-only check indepenednt on own privs

This commit is contained in:
Lennart Poettering
2014-12-26 19:36:25 +01:00
parent 8937e7b689
commit 08ff5529df
+1 -1
View File
@@ -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)) {