diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index b370cbc463a..522d2a910de 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -6917,8 +6917,8 @@ check_file_secrecy(int fd, const char *fname) warnx("%s: owner not root or current user", fname); return (-1); } - if (st.st_mode & (S_IRWXG | S_IRWXO)) { - warnx("%s: group/world readable/writeable", fname); + if (st.st_mode & (S_IWGRP | S_IXGRP | S_IRWXO)) { + warnx("%s: group writable or world read/writable", fname); return (-1); } return (0);