Skip to content

Commit

Permalink
corrected unary
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Davis committed Oct 20, 2015
1 parent 0435348 commit d533fb3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions checksec
Original file line number Diff line number Diff line change
Expand Up @@ -535,25 +535,25 @@ kernelcheck() {

echo_message " Vanilla Kernel ASLR: " "" "" ""
randomize_va=$(sysctl -b kernel.randomize_va_space)
if [ $randomize_va == 2 ]; then
if [ x$randomize_va == x2 ]; then
echo_message "\033[32mFull\033[m\n" "Full," " randomize_va_space='full'" '"randomize_va_space":"full",'
elif [ $randomize_va == 1 ]; then
elif [ x$randomize_va == x1 ]; then
echo_message "\033[33mPartial\033[m\n" "Partial," " randomize_va_space='partial'" '"randomize_va_space":"partial",'
else
echo_message "\033[31mNone\033[m\n" "None," " randomize_va_space='none'" '"randomize_va_space":"none",'
fi

echo_message " Protected symlinks: " "" "" ""
symlink=$(sysctl -b fs.protected_symlinks)
if [ $symlink == 1 ]; then
if [ x$symlink == x1 ]; then
echo_message "\033[32mEnabled\033[m\n" "Enabled," " protect_symlinks='yes'" '"protect_symlinks":"yes",'
else
echo_message "\033[31mDisabled\033[m\n" "Disabled," " protect_symlinks='no'" '"protect_symlinks":"no",'
fi

echo_message " Protected hardlinks: " "" "" ""
hardlink=$(sysctl -b fs.protected_hardlinks)
if [ $hardlink == 1 ]; then
if [ x$hardlink == x1 ]; then
echo_message "\033[32mEnabled\033[m\n" "Enabled," " protect_hardlinks='yes'" '"protect_hardlinks":"yes",'
else
echo_message "\033[31mDisabled\033[m\n" "Disabled," " protect_hardlinks='no'" '"protect_hardlinks":"no",'
Expand Down

0 comments on commit d533fb3

Please sign in to comment.