Bug 76491 - Addition into /etc/security few new functions
Summary: Addition into /etc/security few new functions
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 1.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-20 06:20 UTC by Alexandr S. Tikhonoff
Modified: 2018-05-20 23:54 UTC (History)
0 users

See Also:


Attachments
file.diff (1.47 KB, patch)
2005-01-20 06:20 UTC, Alexandr S. Tikhonoff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr S. Tikhonoff 2005-01-20 06:20:24 UTC
In this addition was realized tracing two errors. At first, there are file permission errors in important directories. At second - search crash records in system messages.
Comment 1 tikhonoff 2005-01-20 06:23:29 UTC
[PATCH]
--- securityadd	Sun Jan  9 12:31:46 2005
+++ security	Sun Jan  9 12:31:46 2005
@@ -33,6 +33,8 @@
 rc=0
 LOG=/var/log
 TMP=/var/run/_secure.$$
+stoday="/var/log/localsec.today" 		# path to today security log
+syester="/var/log/localsec.yesterday"		#path to yesterday security log
 
 separator () {
 	echo ''
@@ -232,5 +234,34 @@
 
 rm -f ${TMP}
 
+ rm $syester
+ mv $stoday $syester
+
+  echo "stoday Log for:" >> ${stoday}
+  date >> ${stoday}
+  cat /etc/passwd | grep "guest" >> ${stoday}
+  cat /etc/passwd | grep "anonymous" >> ${stoday}
+  echo "File permission errors in /bin" >> ${stoday}
+  ls -l /bin | grep "rwx  " >> ${stoday}
+  ls -l /bin | grep "rw-  " >> ${stoday}
+  echo "File permission errors in /sbin" >> ${stoday}
+  ls -l /sbin | grep "rwx  " >> ${stoday}
+  ls -l /sbin | grep "rw-  " >> ${stoday}
+  echo "File permission errors in /etc" >> ${stoday}
+  ls -l /etc | grep "rwx  " >> ${stoday}
+  ls -l /etc | grep "rw-  " >> ${stoday}
+  echo "File permission errors in /usr/bin" >> ${stoday}  
+  ls -l /usr/bin | grep "rwx  " >> ${stoday}
+  ls -l /usr/bin | grep "rw-  " >> ${stoday}
+  echo "File permission errors in /usr/sbin" >> ${stoday}  
+  ls -l /usr/sbin | grep "rwx  " >> ${stoday}
+  ls -l /usr/sbin | grep "rw-  " >> ${stoday}
+  echo "File permission errors in /root" >> ${stoday}  
+  ls -l /root | grep "rwx  " >> ${stoday}
+  ls -l /root | grep "rw-  " >> ${stoday}
+echo ""
+  echo "Crashes?" >> ${stoday}
+  last | grep "crash" >> ${stoday}  
+cat $stoday
 exit $rc
Comment 2 brooks 2005-01-20 06:32:31 UTC
Thank you for your contribution.

Unfortunatly, /etc/security has been defunct for nearly three years (it
was removed in FreeBSD-4.6).  It has been replaced by a set of scripts
in /etc/periodic/security.  A new script for that framework would be
useful, but we can't do much with this patch as is.  I'd also suggest
using find(1)'s perm option instead of parsing ls output.

-- Brooks
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2005-07-22 20:11:27 UTC
State Changed
From-To: open->suspended

Patch would need to be regenerated for current framework.  Is the 
submitter still interested in doing this?  If not, I'll leave the 
PR as suspended.
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:54:09 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"