mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 09:21:26 +03:00
machined: make image read-only check indepenednt on own privs
This commit is contained in:
parent
8937e7b689
commit
08ff5529df
@ -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)) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user