M boot/boot.c => boot/boot.c +0 -1
@@ 94,7 94,6 @@ boot(int argc, char *argv[])
if(fd < 0)
fatal("can't connect to file server");
if(!islocal && !ishybrid){
- nop(fd);
if(cfs)
fd = (*cfs)(fd);
doauthenticate(fd, mp);
M boot/doauthenticate.c => boot/doauthenticate.c +2 -2
@@ 101,12 101,12 @@ checkkey(Method *mp, char *name, char *key)
strcpy(tr.uid, name);
convTR2M(&tr, trbuf);
msg = fromauth(mp, trbuf, tbuf);
- if(msg)
- return msg;
if(msg == ccmsg){
fprint(2, "boot: can't contact auth server, passwd unchecked\n");
return 0;
}
+ if(msg)
+ return msg;
convM2T(tbuf, &t, key);
if(t.num == AuthTc && strcmp(name, t.cuid)==0)
return 0;
M pc/bbmalloc.c => pc/bbmalloc.c +13 -1
@@ 18,7 18,7 @@ enum {
nbbarena=4096 /* number of words in an arena */
};
-static ulong bbarena[narena][nbbarena];
+static ulong *bbarena[narena];
static ulong *bbcur[narena] = {&bbarena[0][0], &bbarena[1][0]};
static ulong *bblast[narena] = {0, 0};
@@ 44,6 44,18 @@ bbmalloc(int nbytes)
}
void
+bbinit(void)
+{
+ int i;
+
+ if(bbarena[0])
+ return;
+ for(i = 0; i < narena; i++)
+ bbarena[i] = xalloc(nbbarena);
+}
+
+
+void
bbfree(void *p, int n)
{
int a, s;
M pc/devvga.c => pc/devvga.c +1 -0
@@ 293,6 293,7 @@ vgawrite(Chan *c, void *buf, long n, ulong offset)
|| ldepth > 3 || ldepth < 0)
error(Ebadarg);
cursoroff(1);
+ bbinit();
setscreen(maxx, maxy, ldepth);
cursoron(1);
return n;
M pc/fns.h => pc/fns.h +1 -0
@@ 1,6 1,7 @@
#include "../port/portfns.h"
void meminit(void);
+void bbinit(void);
void bigcursor(void);
void bootargs(ulong);
#define clearmmucache() /* 386 doesn't have one */
M port/auth.c => port/auth.c +6 -1
@@ 135,7 135,10 @@ sysfsession(ulong *arg)
n = convS2M(f, buf);
if((*devtab[c->type].write)(c, buf, n, 0) != n)
error(Emountrpc);
+ dkhack:
n = (*devtab[c->type].read)(c, buf, MAXMSG, 0);
+ if(n == 2 && buf[0] == 'O' && buf[1] == 'K')
+ goto dkhack;
if(convM2S(buf, f, n) == 0)
error(Emountrpc);
if(f->type == Rsession){
@@ 409,8 412,10 @@ authcheck(Chan *c, char *a, int n)
c->aux = newcrypt();
cp = c->aux;
convM2T(a, &cp->t, evekey);
- if(cp->t.num != AuthTc || strcmp(u->p->user, cp->t.cuid))
+ if(cp->t.num != AuthTc)
error(Ebadarg);
+ if(strcmp(u->p->user, cp->t.cuid))
+ error(cp->t.cuid);
convM2A(a+TICKETLEN, &cp->a, cp->t.key);
if(cp->a.num != AuthAs || memcmp(cp->t.chal, cp->a.chal, CHALLEN))
error(Eperm);
M port/devcons.c => port/devcons.c +2 -2
@@ 354,8 354,8 @@ Dirtab consdir[]={
"cons", {Qcons}, 0, 0660,
"consctl", {Qconsctl}, 0, 0220,
"cputime", {Qcputime}, 6*NUMSIZE, 0444,
- "hostdomain", {Qhostdomain}, DOMLEN, 0622,
- "hostowner", {Qhostowner}, NAMELEN, 0622,
+ "hostdomain", {Qhostdomain}, DOMLEN, 0664,
+ "hostowner", {Qhostowner}, NAMELEN, 0664,
"hz", {Qhz}, NUMSIZE, 0666,
"key", {Qkey}, DESKEYLEN, 0622,
"klog", {Qklog}, 0, 0444,