home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.4 Applications 1997 August / SGI IRIX 6.4 Applications 1997 August.iso / dist / gateway.idb / usr / WebFace / Tasks / security-third.cgi.z / security-third.cgi
Encoding:
Text File  |  1997-07-30  |  4.3 KB  |  131 lines

  1. #!/usr/bin/perl5
  2. #
  3. # security-third.cgi
  4. #
  5. # Copyright 1988-1996 Silicon Graphics, Inc.
  6. # All rights reserved.
  7. #
  8. # This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  9. # the contents of this file may not be disclosed to third parties, copied or
  10. # duplicated in any form, in whole or in part, without the prior written
  11. # permission of Silicon Graphics, Inc.
  12. #
  13. # RESTRICTED RIGHTS LEGEND:
  14. # Use, duplication or disclosure by the Government is subject to restrictions
  15. # as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  16. # and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  17. # successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  18. # rights reserved under the Copyright Laws of the United States.
  19. #
  20. # $Id: security-third.cgi,v 1.6 1997/04/17 23:46:23 shotes Exp $
  21.  
  22. require "/usr/OnRamp/lib/OnRamp.pm";
  23.  
  24. if (!$ARGV[0]) { printf("Location: %s%c%c","/tasks/Tasks.security-start.cgi",10,10); }
  25.  
  26. $myname = "security-second.cgi";
  27. $passwd = "/etc/passwd";
  28. $temp = "task.tmp3";
  29. $dummy = "task.dummy";
  30. $action = "security-third.cgi?loop";
  31.  
  32. $it = "<td><font size=5><i>";
  33. $ni = "</i></font></td>";
  34.  
  35. &get_fields;
  36.  
  37. if (%fld) {
  38.     if ($fld{'left.x'}) {
  39.         $go = "/tasks/security-second.cgi?t";
  40.         print "Content-type: text/html\n\n";
  41.             print "<HTML><HEAD>";
  42.             print "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=$go\">";
  43.             print "</HEAD><BODY></BODY></HTML>";
  44.             exit 0;
  45.     }
  46.  
  47.         &writeFile;
  48.  
  49.         $go = "/tasks/security-end.cgi?t";
  50.         # printf("Location: %s%c%c",$go,10,10);
  51.         print "Content-type: text/html\n\n";
  52.         print "<HTML><HEAD>";
  53.         print "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=$go\">";
  54.         print "</HEAD><BODY></BODY></HTML>";
  55.         exit 0;
  56. }
  57.  
  58. &generic;
  59.  
  60. sub writeFile {
  61.     open(OUT, "> $temp");
  62.  
  63.     if ($fld{'rlogin'}) { print OUT "rlogin:yes\n"; }
  64.     else { print OUT "rlogin:no\n"; }
  65.  
  66.     if ($fld{'xhost'}) { print OUT "xhost:yes\n"; }       
  67.         else { print OUT "xhost:no\n"; }       
  68.     
  69.         close(OUT);
  70. }
  71.  
  72. sub generic {
  73.     print "Content-type: text/html\n\n";
  74.     print "<html><title>Security Setup (continued)</title>\n";
  75.  
  76.     print "<body bgcolor=\'a7b4ce\' background=/tasks/security-task.bg.gif>\n";
  77.  
  78.     print "<table width=100%>",
  79.           "<tr><th align=left><h1>Security Setup (continued)</h1></th>\n",
  80.           "<th align=right><a href=\"/newsplash.shtml\">",
  81.           "<img height=55 width=57 border=0 src=/tasks/home.gif></a>\n",
  82.           "  <a href=\"Tasks.shtml\">",
  83.           "<img height=55 width=57 border=0 src=/tasks/back.gif></a>",
  84.           "</tr></table>\n";
  85.  
  86.     printf("\n<form name=\"page2\" action=\"%s\" method=post>\n", $action);
  87.     
  88.     print "<center><table width=620>\n";
  89.  
  90.     print "<tr>$it Remote login: <br>$ni</tr>\n";
  91.     print "<tr><td>
  92.         Ordinarily, individual users on a UNIX system can configure their 
  93.         own accounts to allow other designated users to log in to the 
  94.         accounts without a login verification process. UNIX system
  95.         administrators can configure the entire system to enable unverified 
  96.         logins. However, these login configurations create a security risk to 
  97.         the Internet Gateway server. 
  98.  
  99.         The ability to access the Internet Gateway's X server from a remote 
  100.         location is also a security risk, since tampering with the X server 
  101.         can compromise window management services, which are critical
  102.         to proper system functioning.",
  103.         
  104.         "</td></tr></table>\n\n";
  105.  
  106.     print "<center><table width=620>\n";
  107.     print "<tr><td> 
  108.          Select the security protection items below to enable or disable
  109.          them. A red check mark indicates that protection is enabled.",
  110.          "</td></tr></table>\n\n"; 
  111.     
  112.     print "<table width=320>\n";
  113.  
  114.     print "<tr><td align=center><input type=checkbox name=rlogin ",
  115.           "value=1></td><td colspan=2><strong>Require password verification for all remote logins</strong></td>",
  116.           "</tr>\n"; 
  117.  
  118.     print "<tr><td align=center><input type=checkbox name=xhost ",
  119.           "value=1></td><td colspan=2><strong>Restrict access of x server</strong></td>",
  120.           "</tr>\n"; 
  121.  
  122.     print "</table>";
  123.  
  124.     print '<input type=image name="right" SRC="/tasks/rightarrow.gif" BORDER=0 align="right">';
  125.     print "\n";
  126.     print '<input type=image name="left" SRC="/tasks/leftarrow.gif" BORDER=0 align="right">';
  127.  
  128.     print "\n</form></body></html>";
  129. }
  130.  
  131.