Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add better solaris support to support script #263

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions duo_unix_support/duo_unix_support.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,28 @@ else
echo "Could not find version of Duo Unix (login_duo was not found)" > configuration.txt
fi

if [ "$OS" = "solaris" ]; then
if type ggrep &>/dev/null; then
GREP=ggrep
fi
else
GREP=grep
yizshi marked this conversation as resolved.
Show resolved Hide resolved
fi

echo "operating_system=${OS}" >> configuration.txt
echo "version=${VER}" >> configuration.txt
echo "kernel=${KERNEL}" >> configuration.txt
echo "openssl_version=${OPENSSL_VER}" >> configuration.txt
echo "ssh=$(ssh -V 2>&1)" &>> configuration.txt
echo -e "\nGathering logs and pam configs"
# Check if the user has gcc and make
if type gcc >/dev/null; then
if type gcc &>/dev/null; then
GCC_VER=$(gcc --version)
echo "gcc=$GCC_VER" | grep "gcc" >> configuration.txt
echo "gcc=$GCC_VER" | $GREP "gcc" >> configuration.txt
fi
if type make >/dev/null; then
if type make &>/dev/null; then
MAKE_VER=$(make --version)
echo "make=$MAKE_VER" | grep "make" >> configuration.txt
echo "make=$MAKE_VER" | $GREP "make" >> configuration.txt
fi

# Copy over common configurations and scrub the skey from the configs
Expand Down Expand Up @@ -176,8 +184,14 @@ COPY_FILES=(
"/var/log/messages"
"/var/log/secure"
"/var/log/syslog"
"/var/adm/messages"
"/var/adm/messages.0"
)

PAM_DUO_FILES=$($GREP -ilr "pam_duo.so" "/etc/pam.d")
# There might be duplicates but that's fine
COPY_FILES+=(${PAM_DUO_FILES[@]})

for path in "${COPY_FILES[@]}"
do
check_and_cp $path
Expand Down
Loading