mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-06-07 16:52:39 -04:00
test that wc
is functional
https://github.com/Kicksecure/security-misc/pull/305#issuecomment-2892378246
This commit is contained in:
parent
5930e27052
commit
353b6e83c5
2 changed files with 20 additions and 0 deletions
|
@ -7,5 +7,15 @@ set -x
|
||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
if ! printf '%s\n' | wc -l >/dev/null ; then
|
||||||
|
printf "\
|
||||||
|
$0: ERROR: command 'wc' test failed! Do not ignore this!
|
||||||
|
|
||||||
|
'wc' can core dump. Example:
|
||||||
|
zsh: illegal hardware instruction (core dumped) wc -l
|
||||||
|
https://github.com/rspamd/rspamd/issues/5137" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
wc -L "/var/lib/apt/lists/"*InRelease
|
wc -L "/var/lib/apt/lists/"*InRelease
|
||||||
wc -L "/var/lib/apt/lists/"*InRelease | awk '$1 > 1024 {print; exit 1}'
|
wc -L "/var/lib/apt/lists/"*InRelease | awk '$1 > 1024 {print; exit 1}'
|
||||||
|
|
|
@ -35,6 +35,16 @@ ERROR: Please report this bug." >&2
|
||||||
|
|
||||||
trap error_handler ERR
|
trap error_handler ERR
|
||||||
|
|
||||||
|
if ! printf '%s\n' | wc -l >/dev/null ; then
|
||||||
|
printf "\
|
||||||
|
$0: ERROR: command 'wc' test failed! Do not ignore this!
|
||||||
|
|
||||||
|
'wc' can core dump. Example:
|
||||||
|
zsh: illegal hardware instruction (core dumped) wc -l
|
||||||
|
https://github.com/rspamd/rspamd/issues/5137" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
## Named constants.
|
## Named constants.
|
||||||
pam_faillock_state_dir="/var/lib/security-misc/faillock"
|
pam_faillock_state_dir="/var/lib/security-misc/faillock"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue