From: Yu Watanabe Date: Tue, 7 Jan 2020 10:22:59 +0000 (+0900) Subject: udev: do not use exact match of file permission X-Git-Tag: v245-rc1~183 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a182f10343796eab92a8256e347c11b4be78ea7;p=thirdparty%2Fsystemd.git udev: do not use exact match of file permission This partially reverts 25de7aa7b90c23d33ea50ada1e50c5834a414237. Fixes #14473. --- 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: {