home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl5
- #
- # security-third.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 third 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.
- #
- # $Id: security-third.cgi,v 1.6 1997/04/17 23:46:23 shotes Exp $
-
- require "/usr/OnRamp/lib/OnRamp.pm";
-
- if (!$ARGV[0]) { printf("Location: %s%c%c","/tasks/Tasks.security-start.cgi",10,10); }
-
- $myname = "security-second.cgi";
- $passwd = "/etc/passwd";
- $temp = "task.tmp3";
- $dummy = "task.dummy";
- $action = "security-third.cgi?loop";
-
- $it = "<td><font size=5><i>";
- $ni = "</i></font></td>";
-
- &get_fields;
-
- if (%fld) {
- if ($fld{'left.x'}) {
- $go = "/tasks/security-second.cgi?t";
- 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;
- }
-
- &writeFile;
-
- $go = "/tasks/security-end.cgi?t";
- # 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{'rlogin'}) { print OUT "rlogin:yes\n"; }
- else { print OUT "rlogin:no\n"; }
-
- if ($fld{'xhost'}) { print OUT "xhost:yes\n"; }
- else { print OUT "xhost:no\n"; }
-
- close(OUT);
- }
-
- sub generic {
- print "Content-type: text/html\n\n";
- print "<html><title>Security Setup (continued)</title>\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=\"page2\" action=\"%s\" method=post>\n", $action);
-
- print "<center><table width=620>\n";
-
- print "<tr>$it Remote login: <br>$ni</tr>\n";
- print "<tr><td>
- Ordinarily, individual users on a UNIX system can configure their
- own accounts to allow other designated users to log in to the
- accounts without a login verification process. UNIX system
- administrators can configure the entire system to enable unverified
- logins. However, these login configurations create a security risk to
- the Internet Gateway server.
-
- The ability to access the Internet Gateway's X server from a remote
- location is also a security risk, since tampering with the X server
- can compromise window management services, which are critical
- to proper system functioning.",
-
- "</td></tr></table>\n\n";
-
- print "<center><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=rlogin ",
- "value=1></td><td colspan=2><strong>Require password verification for all remote logins</strong></td>",
- "</tr>\n";
-
- print "<tr><td align=center><input type=checkbox name=xhost ",
- "value=1></td><td colspan=2><strong>Restrict access of x server</strong></td>",
- "</tr>\n";
-
- print "</table>";
-
- print '<input type=image name="right" SRC="/tasks/rightarrow.gif" BORDER=0 align="right">';
- print "\n";
- print '<input type=image name="left" SRC="/tasks/leftarrow.gif" BORDER=0 align="right">';
-
- print "\n</form></body></html>";
- }
-
-