OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: security diff format
From: Marco S Hyman (marcsnafu.org)
Date: Wed Dec 13 2000 - 13:45:10 CST


One of the functions of /etc/security shows changes to files listed
in /etc/changelist using diff. Is there any reason why the default
diff format is used? I find the unidiff format to be easier to read.

Suggested change:

Index: security
===================================================================
RCS file: /cvs/src/etc/security,v
retrieving revision 1.41
diff -u -p -u -r1.41 security
--- security 2000/10/20 16:27:16 1.41
+++ security 2000/12/13 19:35:40
-644,9 +644,9 if [ -s /etc/changelist ] ; then
                 BACK=/var/backups/$(_fnchg "$file").backup
                 if [ -s $file -a ! -d $file ] ; then
                         if [ -s $CUR ] ; then
- diff $CUR $file > $OUTPUT
+ diff -u $CUR $file > $OUTPUT
                                 if [ -s $OUTPUT ] ; then
- echo "\n======\n${file} diffs (OLD < > NEW)\n======"
+ echo "\n======\n${file} diffs (-OLD +NEW)\n======"
                                         cat $OUTPUT
                                         cp -p $CUR $BACK
                                         cp -p $file $CUR