FreeBSD Bugzilla – Attachment 230002 Details for
Bug 260264
security/crowdsec-firewall-bouncer: update to 0.0.17
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
minor bug fix
0003-silence-grep-and-command-v.patch (text/plain), 1.33 KB, created by
marco
on 2021-12-09 21:57:16 UTC
(
hide
)
Description:
minor bug fix
Filename:
MIME Type:
Creator:
marco
Created:
2021-12-09 21:57:16 UTC
Size:
1.33 KB
patch
obsolete
>From 88c34379dcdfe9f48c32fe6914c8958e0d6b826d Mon Sep 17 00:00:00 2001 >From: Marco Mariani <marco@crowdsec.net> >Date: Thu, 9 Dec 2021 22:55:00 +0100 >Subject: [PATCH 3/3] silence grep and "command -v" > >--- > security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in b/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in >index 58731d397341..ee3dcc9f7325 100755 >--- a/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in >+++ b/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in >@@ -30,10 +30,10 @@ start_precmd="${name}_precmd" > crowdsec_firewall_precmd() { > CSCLI=%%PREFIX%%/bin/cscli > orig_line="api_key: \${API_KEY}" >- if grep "^${orig_line}" "${crowdsec_firewall_config}"; then >+ if grep -q "^${orig_line}" "${crowdsec_firewall_config}"; then > SUFFIX=$(LC_CTYPE=C tr -dc A-Za-z0-9 </dev/urandom | head -c 8) > BOUNCER="cs-firewall-bouncer-${SUFFIX}" >- if command -v $CSCLI; then >+ if command -v "$CSCLI" >/dev/null; then > API_KEY=$($CSCLI bouncers add "${BOUNCER}" -o raw) > if [ -n "$API_KEY" ]; then > sed -i "" "s/^${orig_line}/api_key: ${API_KEY} # ${BOUNCER}/" "${crowdsec_firewall_config}" >-- >2.32.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 260264
:
229957
| 230002