#!/bin/bash

LIB64=/lib64/libkeyutils.so.1.9
LIB64_1=/lib64/libkeyutils-1.2.so.2
LIB32=/lib/libkeyutils.so.1.9
LIB32_1=/lib/libkeyutils-1.2.so.2

if [ -f $LIB64 ]; then
  echo "The server is compromised, $LIB64 found"
  exit 2
fi

if [ -f $LIB64_1 ]; then
  echo "The server is compromised, $LIB64_1 found"
  exit 2
fi


if [ -f $LIB32 ]; then
  echo "The server is compromised, $LIB32 found"
  exit 2
fi

if [ -f $LIB32_1 ]; then
  echo "The server is compromised, $LIB32_1 found"
  exit 2
fi

echo "OK: Cannot find compromised library"
exit 0
