home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl5
- #
- # security-fourth.cgi
- #
- # Copyright 1988-1996 Silicon Graphics, Inc.
- # All rights reserved.
- #
- # This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- # the contents of this file may not be disclosed to fourth parties, copied or
- # duplicated in any form, in whole or in part, without the prior written
- # permission of Silicon Graphics, Inc.
- #
- # RESTRICTED RIGHTS LEGEND:
- # Use, duplication or disclosure by the Government is subject to restrictions
- # as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- # and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- # successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- # rights reserved under the Copyright Laws of the United States.
- #
-
- require "/usr/OnRamp/lib/OnRamp.pm";
-
- if (!$ARGV[0]) { printf("Location: %s%c%c","/tasks/Tasks.security-start.cgi",10,10); exit; }
-
- $temp = "task.tmp4";
- $action = "security-fourth.cgi?loop";
- $go = "/tasks/security-end.cgi?f";
-
- $it = "<td><font size=5><i>";
- $ni = "</i></font></td>";
-
- &get_fields;
-
- if ($ARGV[0] eq loop) {
- &writeFile;
-
- # printf("Location: %s%c%c",$go,10,10);
- print "Content-type: text/html\n\n";
- print "<HTML><HEAD>";
- print "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=$go\">";
- print "</HEAD><BODY></BODY></HTML>";
- exit 0;
- }
-
- &generic;
-
- sub writeFile {
- open(OUT, "> $temp");
-
- if ($fld{'get'}) { print OUT "get:yes\n"; }
- else { print OUT "get:no\n"; }
-
- if ($fld{'set'}) { print OUT "set:yes\n"; }
- else { print OUT "set:no\n"; }
-
- if ($fld{'daemon'}) { print OUT "daemon:yes\n"; }
- else { print OUT "daemon:no\n"; }
-
- close(OUT);
- }
-
- sub generic {
- print "Content-type: text/html\n\n";
- print "<html><title>Security Setup (continued)</title>\n";
-
- print "<script language=\"JavaScript\">\n<!--\n";
-
- # JavaScript
- print "function Next() {
- form = document.page4;
- setTimeout('form.submit()',0);
- return;
- }
- function Previous() {
- setTimeout('window.location=\"/tasks/security-third.cgi?f\"',0);
- return;
- }
- ";
-
- print "//-->\n";
- print "</script></head>\n\n";
-
- print "<body bgcolor=\'a7b4ce\' background=/tasks/security-task.bg.gif>\n";
-
- print "<table width=100%>",
- "<tr><th align=left><h1>Security Setup (continued)</h1></th>\n",
- "<th align=right><a href=\"/newsplash.shtml\">",
- "<img height=55 width=57 border=0 src=/tasks/home.gif></a>\n",
- " <a href=\"Tasks.shtml\">",
- "<img height=55 width=57 border=0 src=/tasks/back.gif></a>",
- "</tr></table>\n";
-
- printf("\n<form name=\"page4\" action=\"%s\" method=post>\n", $action);
-
- print "<center><table width=620>\n";
-
- print "<tr>$it Network management: <br>$ni</tr>\n";
- print "<tr><td>
- The Simple Network Management Protocol (SNMP) allows a system
- administrator on a remote machine to obtain information about
- your server and local network. In some cases it may also be
- possible to set configuration parameters.
-
- By default, your server allows unlimited read access through the
- SNMP protocol. However, this creates a security risk to the
- Internet Gateway server. You can protect your server by
- disallowing all SNMP privileges and/or disabling the SNMP daemon.",
-
- "</td></tr></table>\n\n";
-
- print "<table width=620>\n";
- print "<tr><td>
- Select the security protection items below to enable or disable
- them. A red check mark indicates that protection is enabled.",
- "</td></tr></table>\n\n";
-
- print "<table width=320>\n";
-
- print "<tr><td align=center><input type=checkbox name=set checked ",
- "value=1></td><td colspan=2><strong>Disallow SNMP write privileges</strong></td>",
- "</tr>\n";
-
- print "<tr><td align=center><input type=checkbox name=get ",
- "value=1></td><td colspan=2><strong>Disallow SNMP read privileges</strong></td>",
- "</tr>\n";
-
- print "<tr><td align=center><input type=checkbox name=daemon ",
- "value=1></td><td colspan=2><strong>Disable SNMP daemon</strong></td>",
- "</tr>\n";
-
- print "</table></center>\n\n";
-
- print '<MAP NAME="js_map1">',
- ' <AREA SHAPE="rect" COORDS="0,0,59,52" HREF="javascript:Previous()"
- onMouseOver="window.status=\'\';return true">',
- '</MAP>';
- print "\n";
- print '<MAP NAME="js_map2">',
- ' <AREA SHAPE="rect" COORDS="0,0,59,52" HREF="javascript:Next()"
- onMouseOver="window.status=\'\';return true">',
- '</MAP>';
- print "\n";
- print '<IMG SRC="/tasks/rightarrow.gif" BORDER=0 USEMAP="#js_map2" align="right">';
- print "\n";
- print '<IMG SRC="/tasks/leftarrow.gif" BORDER=0 USEMAP="#js_map1" align="right">';
-
- print "\n</form></body></html>";
- }
-
-