From 7a182f10343796eab92a8256e347c11b4be78ea7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 7 Jan 2020 19:22:59 +0900 Subject: [PATCH] udev: do not use exact match of file permission This partially reverts 25de7aa7b90c23d33ea50ada1e50c5834a414237. Fixes #14473. --- src/udev/udev-rules.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index 6168b332d3b..b9b350d1ef7 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -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: { -- 2.47.3