Suppress common device files

Sat, 17 Jan 2009 12:30:45 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 17 Jan 2009 12:30:45 +0100
changeset 6
7f2c6e5ffee5
parent 5
fe3130d22800
child 7
2c71590b2373

Suppress common device files

security.d/chk_dev file | annotate | diff | comparison | revisions
--- a/security.d/chk_dev	Wed Jan 14 21:12:35 2009 +0100
+++ b/security.d/chk_dev	Sat Jan 17 12:30:45 2009 +0100
@@ -1,9 +1,7 @@
 #!/bin/bash
 #
-# $Id$
-#
 #############################################################################
-# Copyright (C) 2006-2007
+# Copyright (C) 2006-2009
 #   
 # Michiel Broek               <mbse@mbse.eu>
 # Beekmansbos 10
@@ -53,13 +51,13 @@
 
 if [ ! -f $CURR ]; then
     # No database, install new database
-    find / \( -type b -o -type c \) -print0 2>/dev/null | xargs -0 /bin/ls -ldq --full-time | sort -k10 | egrep -v ptmx > $CURR
+    find / \( -type b -o -type c \) -print0 2>/dev/null | xargs -0 /bin/ls -ldq --full-time | sort -k10 | egrep -v ptmx | egrep -v pts | egrep -v usb > $CURR
     exit
 fi
 
 # Database is present, create temp database
 #
-find / \( -type b -o -type c \) -print0 2>/dev/null | xargs -0 /bin/ls -ldq --full-time | sort -k10 | egrep -v ptmx > $TMP1
+find / \( -type b -o -type c \) -print0 2>/dev/null | xargs -0 /bin/ls -ldq --full-time | sort -k10 | egrep -v ptmx | egrep -v pts | egrep -v usb > $TMP1
 changed=0
 
 diff -b $TMP1 $CURR > $TMP2

mercurial