mirror of
https://github.com/opnsense/core.git
synced 2026-05-28 04:34:51 -04:00
Scripts: do one wildcard expansion on final ACL lookup
This commit is contained in:
parent
447b471b37
commit
effe597d33
1 changed files with 8 additions and 4 deletions
|
|
@ -74,10 +74,14 @@ for WIDGET in ${WIDGETS}; do
|
|||
fi
|
||||
|
||||
for ENDPOINT in ${ENDPOINTS}; do
|
||||
if ! grep -q "<pattern>${ENDPOINT#"/"}</pattern>" ${ACLS}; then
|
||||
echo "Unknown ACL for ${WIDGET}:"
|
||||
echo ${ENDPOINT}
|
||||
exit 1
|
||||
PATTERN=${ENDPOINT#/}
|
||||
if ! grep -q "<pattern>${PATTERN}</pattern>" ${ACLS}; then
|
||||
PATTERN=${PATTERN%/*}
|
||||
if ! grep -q "<pattern>${PATTERN}/\*</pattern>" ${ACLS}; then
|
||||
echo "Unknown ACL for ${WIDGET}:"
|
||||
echo ${ENDPOINT}
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
|
|
|||
Loading…
Reference in a new issue