]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: do not use exact match of file permission
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 7 Jan 2020 10:22:59 +0000 (19:22 +0900)
committerLennart Poettering <lennart@poettering.net>
Tue, 7 Jan 2020 14:16:52 +0000 (15:16 +0100)
This partially reverts 25de7aa7b90c23d33ea50ada1e50c5834a414237.

Fixes #14473.

src/udev/udev-rules.c

index 6168b332d3b23f8801dbc2db4952d72329c5716e..b9b350d1ef7a4f8064a7a7bd1e6b796d4bfaff7a 100644 (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: {