Browse Source

Plan 9 from Bell Labs 2003-03-21

David du Colombier 21 years ago
parent
commit
4ba4fc6677

+ 10 - 10
dist/replica/plan9.db

@@ -3195,7 +3195,7 @@ sys/doc/venti/venti.pdf - 755 sys sys 1020384352 139090
 sys/doc/venti/venti.ps - 664 sys sys 1019852320 2012620
 sys/games - 20000000775 sys sys 952648872 0
 sys/games/lib - 20000000775 sys sys 952648879 0
-sys/games/lib/fortunes - 664 sys sys 1047502111 238601
+sys/games/lib/fortunes - 664 sys sys 1048184380 239194
 sys/include - 20000000775 sys sys 1016902416 0
 sys/include/9p.h - 664 sys sys 1044836327 4309
 sys/include/String.h - 664 sys sys 1014929061 1133
@@ -9911,11 +9911,11 @@ sys/src/cmd/srvold9p/fcall.c - 664 sys sys 1016921010 2571
 sys/src/cmd/srvold9p/mkfile - 664 sys sys 1016921011 132
 sys/src/cmd/srvold9p/srvold9p.c - 664 sys sys 1045505578 19752
 sys/src/cmd/ssh - 20000000775 sys sys 1016927305 0
-sys/src/cmd/ssh/agent.c - 664 sys sys 1038371941 9079
+sys/src/cmd/ssh/agent.c - 664 sys sys 1048179624 9079
 sys/src/cmd/ssh/authpasswd.c - 664 sys sys 1016466378 758
-sys/src/cmd/ssh/authrsa.c - 664 sys sys 1016466378 2649
+sys/src/cmd/ssh/authrsa.c - 664 sys sys 1048179608 2649
 sys/src/cmd/ssh/authsrvpasswd.c - 664 sys sys 1016466379 296
-sys/src/cmd/ssh/authsrvtis.c - 664 sys sys 1016466379 726
+sys/src/cmd/ssh/authsrvtis.c - 664 sys sys 1048179599 931
 sys/src/cmd/ssh/authtis.c - 664 sys sys 1016466379 1013
 sys/src/cmd/ssh/cipher3des.c - 664 sys sys 1016466379 836
 sys/src/cmd/ssh/cipherblowfish.c - 664 sys sys 1016466379 631
@@ -9924,17 +9924,17 @@ sys/src/cmd/ssh/ciphernone.c - 664 sys sys 1016466379 317
 sys/src/cmd/ssh/cipherrc4.c - 664 sys sys 1016466379 674
 sys/src/cmd/ssh/ciphertwiddle.c - 664 sys sys 1016466379 380
 sys/src/cmd/ssh/cmsg.c - 664 sys sys 1038371942 8382
-sys/src/cmd/ssh/mkfile - 664 sys sys 1046654890 1226
-sys/src/cmd/ssh/msg.c - 664 sys sys 1038293465 7740
+sys/src/cmd/ssh/mkfile - 664 sys sys 1048179592 1045
+sys/src/cmd/ssh/msg.c - 664 sys sys 1048179596 7876
 sys/src/cmd/ssh/pubkey.c - 664 sys sys 1019928902 3974
 sys/src/cmd/ssh/scp.c - 664 sys sys 1046643068 13708
-sys/src/cmd/ssh/smsg.c - 664 sys sys 1016466380 4225
+sys/src/cmd/ssh/smsg.c - 664 sys sys 1048179694 4225
 sys/src/cmd/ssh/ssh.c - 664 sys sys 1046654892 9615
-sys/src/cmd/ssh/ssh.h - 664 sys sys 1038293464 6011
+sys/src/cmd/ssh/ssh.h - 664 sys sys 1048179595 6054
 sys/src/cmd/ssh/ssh_genkey.c - 664 sys sys 1016466380 1563
 sys/src/cmd/ssh/sshnet.c - 664 sys sys 1046655072 17660
-sys/src/cmd/ssh/sshserve.c - 664 sys sys 1019678647 5940
-sys/src/cmd/ssh/util.c - 664 sys sys 1038293465 5506
+sys/src/cmd/ssh/sshserve.c - 664 sys sys 1048179703 5940
+sys/src/cmd/ssh/util.c - 664 sys sys 1048179672 5506
 sys/src/cmd/stats.c - 664 sys sys 1045059499 26965
 sys/src/cmd/strings.c - 664 sys sys 944961364 1216
 sys/src/cmd/strip.c - 664 sys sys 1014926661 3306

+ 10 - 0
dist/replica/plan9.log

@@ -18618,3 +18618,13 @@
 1047996055 0 c sys/src/9/port/portdat.h - 664 sys sys 1047995947 21197
 1047996055 1 c sys/src/9/port/portfns.h - 664 sys sys 1047995955 10620
 1047996055 2 c sys/src/9/port/sysproc.c - 664 sys sys 1047995943 15125
+1048179656 0 c sys/src/cmd/ssh/agent.c - 664 sys sys 1048179624 9079
+1048179656 1 c sys/src/cmd/ssh/authrsa.c - 664 sys sys 1048179608 2649
+1048179656 2 c sys/src/cmd/ssh/authsrvtis.c - 664 sys sys 1048179599 931
+1048179656 3 c sys/src/cmd/ssh/mkfile - 664 sys sys 1048179592 1045
+1048179656 4 c sys/src/cmd/ssh/msg.c - 664 sys sys 1048179596 7876
+1048179656 5 c sys/src/cmd/ssh/smsg.c - 664 sys sys 1048179694 4225
+1048179656 6 c sys/src/cmd/ssh/ssh.h - 664 sys sys 1048179595 6054
+1048179656 7 c sys/src/cmd/ssh/sshserve.c - 664 sys sys 1048179703 5940
+1048179656 8 c sys/src/cmd/ssh/util.c - 664 sys sys 1048179672 5506
+1048185062 0 c sys/games/lib/fortunes - 664 sys sys 1048184380 239194

+ 4 - 0
sys/games/lib/fortunes

@@ -3866,3 +3866,7 @@ A short stranger will soon enter your life.
 Click Here to GET the penis you want today!!!
 The envMaxSize field is the environment file size. It must not exceed envMaxSize.
 parser.h:16: ISO C++ forbids declaration of `ConsumeOffendingSymbol'
+Click on the following link if you don't want to recieve any more email.
+/usr/include/c++/3.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
+with venti there's not a simple way to do anything. - rsc
+Quidquid latine dictum sit, altum viditur.

+ 12 - 1
sys/src/cmd/ssh/authsrvtis.c

@@ -22,7 +22,18 @@ authsrvtisfn(Conn *conn, Msg *m)
 	sendmsg(m);
 	free(s);
 
-	m = recvmsg(conn, SSH_CMSG_AUTH_TIS_RESPONSE);
+	m = recvmsg(conn, 0);
+	if(m == nil)
+		badmsg(m, SSH_CMSG_AUTH_TIS_RESPONSE);
+	if(m->type != SSH_CMSG_AUTH_TIS_RESPONSE){
+		/*
+		 * apparently you can just give up on
+		 * this protocol and start a new one.
+		 */
+		unrecvmsg(conn, m);
+		return nil;
+	}
+
 	c->resp = getstring(m);
 	c->nresp = strlen(c->resp);
 	ai = auth_response(c);

+ 0 - 8
sys/src/cmd/ssh/mkfile

@@ -7,7 +7,6 @@ TARG=\
 	ssh\
 	sshnet\
 	sshserve\
-	ssh_genkey\
 
 AUTHOFILES=\
 	authpasswd.$O\
@@ -68,9 +67,6 @@ $O.sshnet: \
 $BIN/sshserve:VQ: $BIN/aux/sshserve
 	;
 
-$BIN/ssh_genkey:VQ: $BIN/aux/ssh_genkey
-	;
-
 $BIN/aux/sshserve: $O.sshserve
 	cp $O.sshserve $BIN/aux/sshserve
 
@@ -80,7 +76,3 @@ $BIN/aux/ssh_genkey: $O.ssh_genkey
 sshserve.safeinstall:
 	test -e $BIN/aux/sshserve && mv $BIN/aux/sshserve $BIN/aux/_sshserve
 	mk sshserve.install
-
-ssh_genkey.safeinstall:
-	test -e $BIN/aux/ssh_genkey && mv $BIN/aux/ssh_genkey $BIN/aux/_ssh_genkey
-	mk ssh_genkey.install

+ 15 - 2
sys/src/cmd/ssh/msg.c

@@ -99,6 +99,13 @@ allocmsg(Conn *c, int type, int len)
 	return m;
 }
 
+void
+unrecvmsg(Conn *c, Msg *m)
+{
+	free(c->unget);
+	c->unget = m;
+}
+
 static Msg*
 recvmsg0(Conn *c)
 {
@@ -107,6 +114,12 @@ recvmsg0(Conn *c)
 	ulong crc, crc0, len;
 	Msg *m;
 
+	if(c->unget){
+		m = c->unget;
+		c->unget = nil;
+		return m;
+	}
+
 	if(readn(c->fd[0], buf, 4) != 4){
 		werrstr("short net read: %r");
 		return nil;
@@ -416,7 +429,7 @@ mpint*
 rsapad(mpint *b, int n)
 {
 	int i, pad, nbuf;
-	uchar buf[256];
+	uchar buf[2560];
 	mpint *c;
 
 	if(n > sizeof buf)
@@ -442,7 +455,7 @@ mpint*
 rsaunpad(mpint *b)
 {
 	int i, n;
-	uchar buf[256];
+	uchar buf[2560];
 
 	n = (mpsignif(b)+7)/8;
 	if(n > sizeof buf)

+ 2 - 0
sys/src/cmd/ssh/ssh.h

@@ -179,6 +179,7 @@ struct Conn
 	char *host;
 	char *aliases;
 	int interactive;
+	Msg *unget;
 
 	RSApriv *serverpriv;		/* server only */
 	RSApriv *hostpriv;
@@ -231,6 +232,7 @@ extern Cipher ciphertwiddle;
 Msg*	allocmsg(Conn*, int, int);
 void		badmsg(Msg*, int);
 Msg*	recvmsg(Conn*, int);
+void		unrecvmsg(Conn*, Msg*);
 int		sendmsg(Msg*);
 uchar	getbyte(Msg*);
 ushort	getshort(Msg*);