From: Lennart Poettering Date: Fri, 26 Dec 2014 18:36:25 +0000 (+0100) Subject: machined: make image read-only check indepenednt on own privs X-Git-Tag: v219~797 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=08ff5529dfd4fd2588d6fc9e194cc732795a85e6;hp=8937e7b68940d0fa0d0aab90eb7425fa7dccebc9;ds=sidebyside machined: make image read-only check indepenednt on own privs --- diff --git a/src/machine/image.c b/src/machine/image.c index 1574adf30..8a119e5db 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)) {