/usr/share/yasat/plugins/ssl.test is in yasat 526-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | #!/bin/sh
################################################################################
# #
# Copyright (C) 2008-2012 LABBE Corentin <corentin.labbe@geomatys.fr>
#
# YASAT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# YASAT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with YASAT. If not, see <http://www.gnu.org/licenses/>.
# #
################################################################################
#Red Hat have PKI under /etc/pki
SSL_REP="/etc/ssl"
Title "Check SSL"
if [ ! -e "$SSL_REP" ] ; then
if [ -e '/etc/pki' ] ; then
SSL_REP='/etc/pki'
else
return 1;
fi
fi
Display --indent 2 --text "$SSL_REP" --result FOUND --color BLUE
RESULTAT=`find $SSL_REP ! -user root -exec ls {} \;`
if [ ! -z "$RESULTAT" ] ; then
Display --indent 2 --text "owner of $SSL_REP " --result WARNING --color RED
echo " $RESULTAT"
else
Display --indent 2 --text "owner of $SSL_REP " --result OK --color GREEN
fi
#RESULTAT=`find $SSL_REP ! -type l ! -group $ROOTGROUP -exec ls {} \;`
#if [ ! -z "$RESULTAT" ]
#then
# Display --indent 2 --text "group of $SSL_REP " --result WARNING --color RED
# echo " $RESULTAT"
#else
# Display --indent 2 --text "group of $SSL_REP " --result OK --color GREEN
#fi
if [ -d $SSL_REP/private ] ; then
TMP_RESULT="${TEMPYASATDIR}/ssl_private.tmp"
check_directory_others "$SSL_REP/private" "$TMP_RESULT" 2 SSL_BAD_PRIVATE_RIGHT
# RESULTAT=`find $SSL_REP/private ! -type l -perm $ORWX -exec ls {} \;`
#if [ ! -z "$RESULTAT" ]
#then
# Display --indent 2 --text "Rights of $SSL_REP/private " --result WARNING --color RED --advice SSL_BAD_PRIVATE_RIGHT
# echo " $RESULTAT"
#else
# Display --indent 2 --text "Rights of $SSL_REP/private " --result OK --color GREEN
#fi
fi
return 0;
|