Unix Technical Forum

patch: notice changes to installed packages in /etc/security

This is a discussion on patch: notice changes to installed packages in /etc/security within the mailing.openbsd.tech forums, part of the OpenBSD category; --> any interest in this? Index: etc/security ================================================== ================= RCS file: /cvs/src/etc/security,v retrieving revision 1.78 diff -u -p -r1.78 security ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 09:33 AM
Stuart Henderson
 
Posts: n/a
Default patch: notice changes to installed packages in /etc/security

any interest in this?

Index: etc/security
================================================== =================
RCS file: /cvs/src/etc/security,v
retrieving revision 1.78
diff -u -p -r1.78 security
--- etc/security 22 Aug 2007 12:03:26 -0000 1.78
+++ etc/security 18 Oct 2007 11:03:51 -0000
@@ -732,3 +732,24 @@ for d in `df -ln | sed -n 's:^/dev/\([a-
fi
rm -f $file
done
+
+# Backup the list of installed packages and produce diffs when it changes.
+file=/var/backups/pkglist
+CUR=$file.current
+BACK=$file.backup
+if pkg_info > $file 2>&1 ; then
+ if [ -s $CUR ] ; then
+ diff -u $CUR $file > $OUTPUT
+ if [ -s $OUTPUT ] ; then
+ echo "\n======\nInstalled package changes (-OLD +NEW)\n======"
+ cat $OUTPUT
+ cp -p $CUR $BACK
+ cp -p $file $CUR
+ chown root:wheel $CUR $BACK
+ fi
+ else
+ cp -p $file $CUR
+ chown root:wheel $CUR
+ fi
+fi
+rm -f $file

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:51 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com