Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Hoog
lynis
tests_system_proc
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tests_system_proc of Package lynis
#!/bin/sh ################################################################################# # # Author: Thomas Biege <thomas@suse.de> # # Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are # welcome to redistribute it under the terms of the GNU General Public License. # See LICENSE file for usage of this software. # ################################################################################# # # Checking for processes running as 'nobody' # ################################################################################# # # TODO: # ################################################################################ # InsertSection "Memory and processes" # ################################################################################# # # Test : PROC-3625 # Description : Processes running as 'nobody' Register --test-no PROC-3625 --weight L --network NO --description "Processes running as 'nobody'." if [ ${SKIPTEST} -eq 0 ]; then Display --indent 2 --text "- Starting look-up of 'nobody' processes..." logtext "Test: Checking for processes running as 'nobody'" TMP=$(mktemp /tmp/lynis.XXXXXX) TMP2=$(mktemp /tmp/lynis.XXXXXX) ps -eo uname,pid,comm | tr -s " " | sed "s/ /:/g" > $TMP HPMAX=$(wc -l $TMP | cut -d' ' -f1) grep '^nobody' $TMP > $TMP2 HP=$HPMAX for i in $(cat $TMP2) do HP=$((HP - 1)) PID=$(echo $i | cut -d: -f2) PNAME=$(echo $i | cut -d: -f3) Display --indent 4 --text "${PNAME} [PID ${PID}] runs as user 'nobody'" --result WARNING --color RED done # echo "AddHP $HP $HPMAX" AddHP $HP $HPMAX rm -f $TMP $TMP2 fi # ################################################################################# # wait_for_keypress # #================================================================================
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor