udev: do not use exact match of file permission

This partially reverts 25de7aa7b9.

Fixes #14473.
This commit is contained in:
Yu Watanabe 2020-01-07 19:22:59 +09:00 committed by Lennart Poettering
parent 983ffdb0bf
commit 7a182f1034
1 changed files with 1 additions and 1 deletions

View File

@ -1654,7 +1654,7 @@ static int udev_rule_apply_token_to_event(
if (mode == MODE_INVALID)
return token->op == OP_MATCH;
match = (((statbuf.st_mode ^ mode) & 07777) == 0);
match = (statbuf.st_mode & mode) > 0;
return token->op == (match ? OP_MATCH : OP_NOMATCH);
}
case TK_M_PROGRAM: {