install 000755 006053 000012 00000003044 06772463413 012561 0 ustar 00doug staff 000000 000000 #!/usr/bin/sh if [ "`whoami`" != "root" ] ; then echo "Must be root to run this patch script." exit 1 fi Scripts="do_config_vhost.tcl do_config_report.tcl config_location.tcl" Suffix=".OSIS5x-patched" for Script in $Scripts; do Source="$Script$Suffix" if [ ! -f $Source ] ; then echo "Can't find $Source" exit 1 fi done ValidSubsets=IAFWAPCH5[01]0 if [ ! -f /usr/.smdb./$ValidSubsets.lk ] ; then echo "This patch can only be applied to the Open Source Internet Solutions V5.0" echo "or V5.1 Apache subset (IAFWAPCH500 or IAFWAPCH510) which do not appear" echo "to be installed." exit 1 fi TargetDir=/usr/internet/apache/port-8089/cgi-bin PatchScripts= for Script in $Scripts; do Target=$TargetDir/$Script Source="$Script$Suffix" if [ -f $Target ]; then if [ "`cksum $Target | cut -f-2 -d\ `" = "`cksum $Source | cut -f-2 -d\ `" ]; then continue fi fi PatchScripts="$PatchScripts $Script" done if [ "$PatchScripts" = "" ]; then echo "This patch has already been applied." exit 1 fi V=`ls /usr/.smdb./$ValidSubsets.lk | tail -1 | sed -e "s/^[^0-9]*\([0-9]*\).lk/\1/" -e "s/0$//"` Version=`echo $V | sed -e "s/^\(.\)/\1\./"` echo "Applying Open Source Internet Solutions V$Version Apache Administration patch" for Script in $PatchScripts; do Target=$TargetDir/$Script Source="$Script$Suffix" mv $Target $Target.OSIS$V-orig cp $Source $Target chmod 700 $Target done echo "Open Source Internet Solutions V$Version Apache Administration patch applied successfully" config_location.tcl.OSIS5x-patched 000555 006053 000012 00000005217 06772443376 017500 0 ustar 00doug staff 000000 000000 #!/usr/local/bin/tcl_cgi # **************************************************************** # * * # * Copyright (c) Digital Equipment Corporation, 1991, 1994 * # * * # * All Rights Reserved. Unpublished rights reserved under * # * the copyright laws of the United States. * # * * # * The software contained on this media is proprietary to * # * and embodies the confidential technology of Digital * # * Equipment Corporation. Possession, use, duplication or * # * dissemination of the software and media is authorized only * # * pursuant to a valid written license from Digital Equipment * # * Corporation. * # * * # * RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * # * by the U.S. Government is subject to restrictions as set * # * forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * # * or in FAR 52.227-19, as applicable. * # * * # **************************************************************** # # Name: config_location.tcl # # Description: This script posts and allows modification # of the URL location defaults in the apache # config files srm.conf. # # Parameters: port = the web server port # # # Returns: none # # Notes: none # # Called modules: config_utils.tcl # #============================================================================= source "config_utils.tcl" set help "sec-apache-urls" general_header "$header_string" "Change $name Server URL Defaults" "$help" "REFRESH" puts "
" general_trailer "$help" "config_apache.tcl?port=$port" "Change $name Server Configuration Parameters" do_config_report.tcl.OSIS5x-patched 000555 006053 000012 00000006532 06772443410 017653 0 ustar 00doug staff 000000 000000 #!/usr/local/bin/tcl_cgi # **************************************************************** # * * # * Copyright (c) Digital Equipment Corporation, 1991, 1994 * # * * # * All Rights Reserved. Unpublished rights reserved under * # * the copyright laws of the United States. * # * * # * The software contained on this media is proprietary to * # * and embodies the confidential technology of Digital * # * Equipment Corporation. Possession, use, duplication or * # * dissemination of the software and media is authorized only * # * pursuant to a valid written license from Digital Equipment * # * Corporation. * # * * # * RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * # * by the U.S. Government is subject to restrictions as set * # * forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * # * or in FAR 52.227-19, as applicable. * # * * # **************************************************************** # # Name: do_config_report.tcl # # Description: This script reads report parameters from # the config_report.tcl form and updates # the apache config file httpd.conf. # # Parameters: port = the web server port # # see report_directives in config_utils.tcl # # Returns: none # # Notes: Rewrites /usr/internet/apache/port-{port}/conf/httpd.conf # via the write_config procedure. # # Called modules: config_utils.tcl # #============================================================================= source "config_utils.tcl" set help "sec-apache-log-params" general_header "$header_string" "Change $name Server Report and Logging Parameters" "$help" "" set content [exec cat $httpd_config] set contentL [split $content \n] set content_changed 0 if {![info exists Q(HostnameLookups)]} {set Q(HostnameLookups) "off"} foreach name {HostnameLookups ServerAdmin Error401 Error403 Error404 Error500} { if {"$Q($name)" != "$Q(old_$name)"} { set delete 0 if {"$Q($name)" == ""} {set delete 1} if {[string match "Error*" $name]} { regexp "^Error(.*)$" $name string code set search_string "ErrorDocument\[ \]+$code\[ \]" set replace_string "ErrorDocument $code $Q($name)" } else { set search_string "$name\[ \]" set replace_string "$name $Q($name)" } set i [lsearch -regexp $contentL "^$search_string"] if {$i == -1} { if {!$delete} { set i [lsearch -regexp $contentL "^#$search_string"] if {$i == -1} { lappend contentL "$replace_string" } else { set contentL [linsert $contentL [expr $i + 1] "$replace_string"] } set content_changed 1 } } else { if {$delete} { set contentL [lreplace $contentL $i $i] } else { set contentL [lreplace $contentL $i $i "$replace_string"] } set content_changed 1 } } } write_config $contentL $content_changed $httpd_config "" general_trailer "$help" "config_report.tcl?port=$port" "Change Web Server Logging and Reporting Parameters" do_config_vhost.tcl.OSIS5x-patched 000700 006053 000012 00000011223 06771507752 017475 0 ustar 00doug staff 000000 000000 #!/usr/local/bin/tcl_cgi # **************************************************************** # * * # * Copyright (c) Digital Equipment Corporation, 1991, 1994 * # * * # * All Rights Reserved. Unpublished rights reserved under * # * the copyright laws of the United States. * # * * # * The software contained on this media is proprietary to * # * and embodies the confidential technology of Digital * # * Equipment Corporation. Possession, use, duplication or * # * dissemination of the software and media is authorized only * # * pursuant to a valid written license from Digital Equipment * # * Corporation. * # * * # * RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * # * by the U.S. Government is subject to restrictions as set * # * forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * # * or in FAR 52.227-19, as applicable. * # * * # **************************************************************** # # Name: do_config_vhost.tcl # # Description: This script gets virtual host info from the # config_vhost_form.tcl form and uses it to update # the apache config file httpd.conf. # # Parameters: port = the web server port # # ip_addr = virtual host name or IP address # vport = virtual host port # # see vhost_directives in config_utils.tcl # # Returns: none # # Notes: Rewrites /usr/internet/apache/port-{port}/conf/httpd.conf # # Called modules: config_utils.tcl # #============================================================================= source "config_utils.tcl" set operation $Q(operation) set help "sec-apache-virtual-hosts" if {"$operation" == "Delete"} { general_header "$header_string" "$operation $name Server Virtual Hosts" "$help" "" } else { general_header "$header_string" "$operation $name Server Virtual Host" "$help" "" } if {"$operation" == "Delete"} { set index 0 set Q(ip_addr) "" if {[info exists Q(vhostL)]} { set Q(ip_addr) [lindex [lindex $Q(vhostL) $index] 0] set Q(vport) [lindex [lindex $Q(vhostL) $index] 1] } } if {"$Q(ip_addr)" == ""} { if {"$operation" == "Delete"} { error_msg "No virtual hosts have been selected." } else { error_msg "The IP address must be specified." } } else { # # Read config file and store it in a list # set content [exec cat $httpd_config] set contentL [split $content \n] set content_changed 0 set error_string "" while {1} { set field $Q(ip_addr) if {"$Q(vport)" != ""} {append field ":$Q(vport)"} set i [lsearch -regexp $contentL "^