Closed spdfnet closed 2 years ago
@spdfnet are you running this as root?
The default path for system binaries should be /sbin/ and /usr/sbin/. The linux filesystem hierarchy standard declares those 2 locations so those should be included if your user is root. https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s16.html
if /sbin and /usr/sbin are not included in your default root path, something may not be correct.
Can you run with the --debug flag and provide the output?
Some more context:
Fedora 35 uses: checksec-2.4.0-3.fc35.noarch
F36: checksec-2.5.0-2.fc36.noarch
Spotted the issue with user 'root':
# checksec --debug
WARNING: 'sysctl' not found! It's required for most checks.
WARNING: Not all necessary commands found. Some tests might not work!
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
# type sysctl
sysctl is /usr/sbin/sysctl
And by 'cleaning the env', I mean this line:
[ "$(env | /bin/sed -r -e '/^(PWD|SHLVL|_)=/d')" ] && exec -c "$0" "$@"
-> which messes with the $PATH with root.
Not sure what really causes it, I also failed to understand the differences between versions :)
fixed in #193
After cleaning the ENV,
# echo $PATH
returns just this for root:Whereas sysctl is in sbin
# whereis sysctl
:This PR fixes the following: