diff --git a/rebuild-hosts.allow.sh b/rebuild-hosts.allow.sh index e9566a2..dd6f9df 100755 --- a/rebuild-hosts.allow.sh +++ b/rebuild-hosts.allow.sh @@ -5,12 +5,14 @@ # # Copyright (c) 2006 TundraWare Inc., Des Plaines, IL USA # All Rights Reserved -# $Id: rebuild-hosts.allow.sh,v 1.101 2006/04/29 07:54:51 tundra Exp $ + +RCSID='$Id: rebuild-hosts.allow.sh,v 1.102 2006/05/03 05:15:30 tundra Exp $' BASE="/usr/local/etc/tperimeter" EPILOGUE=${BASE}/epilogue PROLOGUE=${BASE}/prologue -STANDARD=${BASE}/allow +STDALLOW=${BASE}/allow +STDDENY=${BASE}/deny USERREQUESTS="/www/cgi-bin/tperimeter/requests" ##### @@ -18,7 +20,7 @@ # "Allow" Entries In Proper /etc/hosts.allow Format ##### -BuildAllowEntries() +BuildEntries() { if [ -d $1 ] # Only attempt this if the target directory exists then @@ -31,12 +33,12 @@ do echo -n $y" " done - echo " :ALLOW" + echo " :$2" cd .. done fi } -# End Of 'BuildAllowEntries()' +# End Of 'BuildEntries()' ##### # Rebuild /etc/hosts-allow @@ -44,6 +46,7 @@ # Timestamp it +echo "# Built By: ${RCSID}" echo "# Built On: `date`" echo "" @@ -57,7 +60,7 @@ echo "# Access Requested Via The 'tperimeter' Interface" echo "" -BuildAllowEntries ${USERREQUESTS} +BuildEntries ${USERREQUESTS} "ALLOW" # Delete the user requests @@ -68,10 +71,18 @@ # Now include the standard set of access definitions echo "" +echo "# Standard 'Deny' Entries" +echo "" + +BuildEntries ${STDDENY} "DENY" + +echo "" echo "# Standard 'Allow' Entries" echo "" -BuildAllowEntries ${STANDARD} +BuildEntries ${STDALLOW} "ALLOW" +echo "" +echo "" # Finally, add the epilogue