1
# Copyright 2000, International Business Machines Corporation and others.
4
# This software has been released under the terms of the IBM Public
5
# License. For details, see the LICENSE file in the top-level source
6
# directory or online at http://www.openafs.org/dl/license10.html
8
# An InstallGuide for the AFS modified Unix commands
9
# For Sun systems running Solaris 5.6
13
&Copy("etc/inetd", "/usr/sbin/inetd.afs");
16
&Patch::Verbose if ($InstallVerbose);
17
&CreateDir("/usr/vice/bin");
19
&Copy("bin/rsh", "/usr/vice/bin");
20
&Chown (0,2, "/usr/vice/bin/rsh");
21
&Chmod (04755, "/usr/vice/bin/rsh");
23
&Copy("lib/pam_afs.so.1", "/usr/lib/security");
24
&Chmod(0755, "/usr/lib/security/pam_afs.so.1");
25
&Chown(0,3, "/usr/lib/security/pam_afs.so.1");
27
$PamConf = "/etc/pam.conf";
28
&Patch::FileOpen($PamConf);
30
$RloginSubSearch = "^(rlogin.+)required(.+)";
31
$RloginSubReplace = '$1.optional.$2';
33
$RLoginAuthSearch = "^rlogin\\s+auth\\s+.+pam_unix.so.1";
34
$RLoginAuthNew = <<"xxENDxx";
35
rlogin auth optional /usr/lib/security/pam_afs.so.1 try_first_pass ignore_root
38
$RshSubSearch = "^(rsh.+)required(.+)";
39
$RshSubReplace = '$1.optional.$2';
41
$RshSearch = "^rsh\\s+auth\\s+.*pam_rhosts_auth.so.1";
42
$RshNew = <<"xxENDxx";
43
rsh auth optional /usr/lib/security/pam_afs.so.1 try_first_pass ignore_root
46
if (!&Patch::Patch($PamConf, [[1, "Substitution", $RloginSubSearch, $RloginSubReplace],
47
[1, "Insert", $RLoginAuthSearch, $RLoginAuthNew],
48
[1, "Substitution", $RshSubSearch, $RshSubReplace],
49
[1, "Insert", $RshSearch, $RshNew]])) {
50
&ErrorMsg("Did not succeed with patch", $PamConf);
53
# Create the inetd.conf.afs file
54
$InetdConfAfs = "/etc/inet/inetd.conf.afs";
55
open(INETD, ">$InetdConfAfs") || &ErrorMsg("Can't open file", $InetdConfAfs);
56
print INETD <<"EOINETD";
57
shell stream tcp nowait root /usr/sbin/in.rshd in.rshd
58
ta-rauth stream tcp nowait root internal ta-rauth
60
&Symlink("./inet/inetd.conf.afs", "/etc/inetd.conf.afs");
62
# comment out the rshd line in inetd.conf
63
$InetdConf = "/etc/inet/inetd.conf";
64
&CopyStat($InetdConf, $InetdConfAfs);
65
&Patch::FileOpen($InetdConf);
67
$Search = "^(shell\\s+.+)";
70
if (!&Patch::Patch($InetdConf, [[1, "Substitution", $Search, $Replace]])) {
71
&ErrorMsg("Did not succeed with patch", $InetdConf);
74
# Modify the /etc/inet/services file
75
# append the ta-rauth to the services file
76
$Services = "/etc/inet/services";
77
&Patch::FileOpen($Services);
79
$ServicesAppend = "ta-rauth 601/tcp rauth";
81
if (!&Patch::Patch($Services, [[0, "EOF", "", $ServicesAppend]])) {
82
&ErrorMsg("Did not succeed with patch", $Services);