9fans archive / 1996 / 11 / 17 / prev next
From: Stephen Hemminger sch@ncu...
Subject: It's alive!
Date: Thu, 07 Nov 1996 11:08:27 -0800
This is a multi-part message in MIME format.
--------------ABD322C31DFF4F5237C228A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The fix we used for boot was:
1. if only one boot method, build in kernel don't ask
question. boot.c/rootserver()
Method*
rootserver(char *arg)
{
char prompt[256];
char reply[64];
Method *mp;
char *cp, *goodarg;
int n, j;
/* don't ask if this is a cpu server and only one method */
if (cpuflag && method[1].name == 0) {
print("Root is from %s\n", method[0].name);
return method;
}
...
2. if the cpu server is authing itself, then don't have annoying
timeout.
--------------ABD322C31DFF4F5237C228A
Content-Type: text/plain; charset=us-ascii; name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="diff"
*** original/doauthenticate.c Mon Jul 24 05:52:57 1995
--- doauthenticate.c Wed Dec 20 10:30:04 1995
***************
*** 5,15 ****
static char *pbmsg = "AS protocol botch";
static char *ccmsg = "can't connect to AS";
--- 5,17 ----
static char *pbmsg = "AS protocol botch";
static char *ccmsg = "can't connect to AS";
+ static char *selfmsg = "Authorize self";
***************
*** 30,37 ****
if(mp->auth == 0)
fatal("no method for accessing auth server");
afd = (*mp->auth)();
! if(afd < 0)
! return ccmsg;
}
if(write(afd, trbuf, TICKREQLEN) < 0 || read(afd, &t, 1) != 1){
close(afd);
--- 32,43 ----
if(mp->auth == 0)
fatal("no method for accessing auth server");
afd = (*mp->auth)();
! if(afd < 0) {
! if (afd == -2)
! return selfmsg;
! else
! return ccmsg;
! }
}
if(write(afd, trbuf, TICKREQLEN) < 0 || read(afd, &t, 1) != 1){
close(afd);
***************
*** 82,88 ****
return;
/* didn't work, go for the security hole */
! fprint(2, "no authentication server (%s), using your key as server key\n", msg);
}
char*
--- 88,95 ----
return;
/* didn't work, go for the security hole */
! if (strcmp(msg, selfmsg) != 0)
! fprint(2, "no authentication server (%s), using your key as server key\n", msg);
}
char*
*** original/ip.c Mon Jul 24 05:52:57 1995
--- ip.c Fri Oct 18 23:34:26 1996
***************
*** 75,80 ****
--- 108,115 ----
{
int fd[2];
+ if(memcmp(auip, ipaddr, sizeof(ipaddr)) == 0)
+ return -2;
if(auip[0] == 0 || ipdial(fd, "#Iil/il", auip, 566) < 0)
return -1;
close(fd[0]);
--------------ABD322C31DFF4F5237C228A--