The errno value was not set, causing wrong return notifications and failing to have udev label things correctly. See https://bugzilla.redhat.com/show_bug.cgi?id=909826#c24 and see https://bugs.gentoo.org/show_bug.cgi?id=462626 Signed-off-by: Sven Vermeulen <sven.vermeulen@xxxxxxxxx> --- libselinux/src/label_file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c index 5f697f3..9b0d6b0 100644 --- a/libselinux/src/label_file.c +++ b/libselinux/src/label_file.c @@ -649,6 +649,8 @@ static struct selabel_lookup_rec *lookup(struct selabel_handle *rec, break; } else if (rc == PCRE_ERROR_NOMATCH) continue; + + errno = ENOENT; /* else it's an error */ goto finish; } @@ -660,6 +662,7 @@ static struct selabel_lookup_rec *lookup(struct selabel_handle *rec, goto finish; } + errno = 0; ret = &spec_arr[i].lr; finish: -- 1.8.1.5 -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with the words "unsubscribe selinux" without quotes as the message.