mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-01-22 15:10:20 +07:00
selinux: selabel_lookup_raw can return ENOENT and be a non failure mode.
This commit is contained in:
parent
a33c48d83c
commit
080ffcb4a1
@ -186,7 +186,7 @@ int label_context_set(const char *path, mode_t mode) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
r = selabel_lookup_raw(label_hnd, &filecon, path, mode);
|
r = selabel_lookup_raw(label_hnd, &filecon, path, mode);
|
||||||
if (r < 0)
|
if (r < 0 && errno != ENOENT)
|
||||||
r = -errno;
|
r = -errno;
|
||||||
else if (r == 0) {
|
else if (r == 0) {
|
||||||
r = setfscreatecon(filecon);
|
r = setfscreatecon(filecon);
|
||||||
|
Loading…
Reference in New Issue
Block a user