mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
discover-image: extend r/o check on images via path
If we have no path, let's check the parent's path.
This commit is contained in:
parent
77b40b4f60
commit
641714cb30
@ -356,6 +356,7 @@ static int image_make(
|
||||
|
||||
read_only =
|
||||
(path && path_startswith(path, "/usr")) ||
|
||||
(parent && path_startswith(parent, "/usr")) ||
|
||||
(faccessat(dfd, filename, W_OK, AT_EACCESS) < 0 && errno == EROFS);
|
||||
|
||||
if (S_ISDIR(st->st_mode)) {
|
||||
|
Loading…
Reference in New Issue
Block a user