mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 23:53:51 +02:00
checksec: fix formatting issue
This commit is contained in:
parent
e54ba6b0e3
commit
464c53b243
2 changed files with 51 additions and 1 deletions
50
srcpkgs/checksec/patches/fix-formating.patch
Normal file
50
srcpkgs/checksec/patches/fix-formating.patch
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
--- checksec.orig 2019-07-24 11:58:00.684761937 +0200
|
||||||
|
+++ checksec 2019-07-24 11:57:40.744760376 +0200
|
||||||
|
@@ -1568,11 +1568,11 @@ chk_proc_all () {
|
||||||
|
(( currpid++ ))
|
||||||
|
name=$(head -1 "${N}"/status | cut -b 7-)
|
||||||
|
if [[ $format == "cli" ]]; then
|
||||||
|
- printf "%16s" "${N}ame"
|
||||||
|
+ printf "%16s" "${name}"
|
||||||
|
printf "%7d " "${N}"
|
||||||
|
else
|
||||||
|
echo_message "" "${N}," " <proc pid='${N}'" " \"${N}\": { "
|
||||||
|
- echo_message "" "${N}ame," " name='${N}ame'" "\"name\":\"${N}ame\","
|
||||||
|
+ echo_message "" "${name}," " name='${name}'" "\"name\":\"${name}\","
|
||||||
|
fi
|
||||||
|
proccheck "${N}"
|
||||||
|
if [[ "${lastpid}" == "${currpid}" ]]; then
|
||||||
|
@@ -1616,11 +1616,11 @@ chk_proc () {
|
||||||
|
if [[ -d "${N}" ]] ; then
|
||||||
|
name=$(head -1 "${N}"/status | cut -b 7-)
|
||||||
|
if [[ $format == "cli" ]]; then
|
||||||
|
- printf "%16s" "${N}ame"
|
||||||
|
+ printf "%16s" "${name}"
|
||||||
|
printf "%7d " "${N}"
|
||||||
|
else
|
||||||
|
echo_message "" "${N}," "<proc pid='${N}'" " \"${N}\": {"
|
||||||
|
- echo_message "" "${N}ame," " name='${N}ame'" "\"name\":\"${N}ame\","
|
||||||
|
+ echo_message "" "${name}," " name='${name}'" "\"name\":\"${name}\","
|
||||||
|
fi
|
||||||
|
if [[ ! -r "${N}/exe" ]] ; then
|
||||||
|
if ! (root_privs) ; then
|
||||||
|
@@ -1664,10 +1664,10 @@ chk_proc_libs () {
|
||||||
|
if [[ -d "${N}" ]] ; then
|
||||||
|
name=$(head -1 "${N}/status" | cut -b 7-)
|
||||||
|
if [[ "${format}" == "cli" ]]; then
|
||||||
|
- printf "%16s" "${N}ame"
|
||||||
|
+ printf "%16s" "${name}"
|
||||||
|
printf "%7d " "${N}"
|
||||||
|
else
|
||||||
|
- echo_message "" "${N}ame," "<proc name='${N}ame'" "{ \"proc\": { \"name\":\"${N}ame\", "
|
||||||
|
+ echo_message "" "${name}," "<proc name='${name}'" "{ \"proc\": { \"name\":\"${name}\", "
|
||||||
|
echo_message "" "${N}," " pid='${N}'" "\"pid\":\"${N}\","
|
||||||
|
fi
|
||||||
|
# read permissions?
|
||||||
|
@@ -1906,4 +1906,4 @@ for variable in CHK_DIR CHK_FILE CHK_FOR
|
||||||
|
done
|
||||||
|
|
||||||
|
# call the function
|
||||||
|
-${CHK_FUNCTION}
|
||||||
|
\ No newline at end of file
|
||||||
|
+${CHK_FUNCTION}
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'checksec'
|
# Template file for 'checksec'
|
||||||
pkgname=checksec
|
pkgname=checksec
|
||||||
version=2.0.0
|
version=2.0.0
|
||||||
revision=1
|
revision=2
|
||||||
archs=noarch
|
archs=noarch
|
||||||
wrksrc="checksec.sh-${version}"
|
wrksrc="checksec.sh-${version}"
|
||||||
depends="binutils"
|
depends="binutils"
|
||||||
|
|
Loading…
Add table
Reference in a new issue