Browse Source

Plan 9 from Bell Labs 2003-10-10

David du Colombier 20 years ago
parent
commit
262b6cd17c

+ 7 - 7
dist/replica/plan9.db

@@ -441,7 +441,7 @@
 386/bin/upas/ratfs - 775 sys sys 1064598359 112146
 386/bin/upas/runq - 775 sys sys 1064598360 111212
 386/bin/upas/scanmail - 775 sys sys 1064598361 127497
-386/bin/upas/send - 775 sys sys 1064598362 189555
+386/bin/upas/send - 775 sys sys 1065717666 190471
 386/bin/upas/smtp - 775 sys sys 1064598364 269362
 386/bin/upas/smtpd - 775 sys sys 1064598366 313618
 386/bin/upas/spam - 775 sys sys 1064598366 36
@@ -3288,7 +3288,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 1063856231 244987
+sys/games/lib/fortunes - 664 sys sys 1065751340 245757
 sys/include - 20000000775 sys sys 1016902416 0
 sys/include/9p.h - 664 sys sys 1044836327 4309
 sys/include/String.h - 664 sys sys 1055701304 1291
@@ -5208,7 +5208,7 @@ sys/src/9/pc/devlm78.c - 664 sys sys 1026847635 6038
 sys/src/9/pc/devlml.c - 664 sys sys 1026847636 7486
 sys/src/9/pc/devlml.h - 664 sys sys 1026847636 2948
 sys/src/9/pc/devlpt.c - 664 sys sys 1015014514 4420
-sys/src/9/pc/devpccard.c - 664 sys sys 1048644060 39977
+sys/src/9/pc/devpccard.c - 664 sys sys 1065717606 39976
 sys/src/9/pc/devrtc.c - 664 sys sys 1015014515 7167
 sys/src/9/pc/devtv.c - 664 sys sys 1032052915 45652
 sys/src/9/pc/devusb.c - 664 sys sys 1063857423 18352
@@ -5251,7 +5251,7 @@ sys/src/9/pc/mem.h - 664 sys sys 1018553448 4573
 sys/src/9/pc/memory.c - 664 sys sys 1032303986 12994
 sys/src/9/pc/mkfile - 664 sys sys 1056336303 3092
 sys/src/9/pc/mmu.c - 664 sys sys 1049509456 10014
-sys/src/9/pc/mouse.c - 664 sys sys 1060266650 6625
+sys/src/9/pc/mouse.c - 664 sys sys 1065717607 6625
 sys/src/9/pc/mp.c - 664 sys sys 1048644112 16928
 sys/src/9/pc/mp.h - 664 sys sys 1015014520 6575
 sys/src/9/pc/pc - 664 sys sys 1055700612 1360
@@ -10595,14 +10595,14 @@ sys/src/cmd/upas/send/authorize.c - 664 sys sys 944961322 569
 sys/src/cmd/upas/send/bind.c - 664 sys sys 944961322 3252
 sys/src/cmd/upas/send/cat_mail.c - 664 sys sys 1016904916 1190
 sys/src/cmd/upas/send/date - 664 sys sys 944961326 4665
-sys/src/cmd/upas/send/dest.c - 664 sys sys 956275873 4728
+sys/src/cmd/upas/send/dest.c - 664 sys sys 1065717617 4732
 sys/src/cmd/upas/send/filter.c - 664 sys sys 988225293 2292
 sys/src/cmd/upas/send/gateway.c - 664 sys sys 944961322 499
 sys/src/cmd/upas/send/local.c - 664 sys sys 1031707305 2584
 sys/src/cmd/upas/send/log.c - 664 sys sys 944961322 2090
-sys/src/cmd/upas/send/main.c - 664 sys sys 1038186966 11767
+sys/src/cmd/upas/send/main.c - 664 sys sys 1065717618 11856
 sys/src/cmd/upas/send/makefile - 664 sys sys 944961322 1247
-sys/src/cmd/upas/send/message.c - 664 sys sys 1016731559 11089
+sys/src/cmd/upas/send/message.c - 664 sys sys 1065717617 11064
 sys/src/cmd/upas/send/mkfile - 664 sys sys 1064589602 706
 sys/src/cmd/upas/send/regtest.c - 664 sys sys 944961322 566
 sys/src/cmd/upas/send/rewrite.c - 664 sys sys 1031707304 6294

+ 7 - 0
dist/replica/plan9.log

@@ -13851,3 +13851,10 @@
 1065641510 2 c sys/src/cmd/ip/httpd/webls.c - 664 sys sys 1065640769 7232
 1065646915 0 c 386/bin/ip/httpd/webls - 775 sys sys 1065646626 129996
 1065646915 1 c sys/src/cmd/ip/httpd/webls.c - 664 sys sys 1065646625 7233
+1065718912 0 c 386/bin/upas/send - 775 sys sys 1065717666 190471
+1065718912 1 c sys/src/9/pc/devpccard.c - 664 sys sys 1065717606 39976
+1065718912 2 c sys/src/9/pc/mouse.c - 664 sys sys 1065717607 6625
+1065718912 3 c sys/src/cmd/upas/send/dest.c - 664 sys sys 1065717617 4732
+1065718912 4 c sys/src/cmd/upas/send/main.c - 664 sys sys 1065717618 11856
+1065718912 5 c sys/src/cmd/upas/send/message.c - 664 sys sys 1065717617 11064
+1065753032 0 c sys/games/lib/fortunes - 664 sys sys 1065751340 245757

+ 5 - 0
sys/games/lib/fortunes

@@ -3980,3 +3980,8 @@ That doesn't make sense to me.  But then, you are very small.  Perhaps you're ri
 A company is only as good as its least imaginative manager.
 Thank you for ordering from MEDCO SUPPLY COMPANY, INC., where 100% satisfaction is gu
 (mozilla-bin:3115): Gtk-WARNING **: A floating object was finalized. This means that someone called g_object_unref() on an object that had only a floating reference; the initial floating reference is not owned by anyone and must be removed with gtk_object_sink() after a normal reference is obtained with g_object_ref(). - exit message from Mozilla
+Hurray! We have successfully exploited a buffer overflow on the plan9 operating system! And most importantly, we did the most useful thing possible: we exited the shell. If you ever gain access to a plan9 box, remember that the smartest thing you can do is logout. - phrack article
+You have synapses?  I wish I did.  My neurons communicate by shouting.  It gets pretty noisy in my head.  Some times all six of them are shouting at the same time.  - presotto
+Failed silent installation. May be failed to allocate Memory.!
+An extended error was returned from the server. This is typically a string or buffer containing a verbose error message. Call InternetGetLastResponseInfo to retrieve the error text.
+If you're not living on the edge, you're taking up too much space.

+ 3 - 3
sys/src/9/pc/devpccard.c

@@ -1368,13 +1368,13 @@ pccardread(Chan *c, void *a, long n, vlong offset)
 
 					ct = &pi->ctab[i];
 					p = seprint(p, e, 
-						"\tconfiguration[%ld] irqs %.4uX; vpp %d, %d; %s\n",
-							  n, ct->irqs, ct->vpp1, ct->vpp2,
+						"\tconfiguration[%d] irqs %.4uX; vpp %d, %d; %s\n",
+							  i, ct->irqs, ct->vpp1, ct->vpp2,
 							  (ct == pi->defctab)? "(default);": "");
 					for (j = 0; j != ct->nio; j++)
 						if (ct->io[j].len > 0)
 							p = seprint(p, e, "\t\tio[%d] %.8ulX %uld\n",
-									  i, ct->io[j].start, ct->io[j].len);
+									  j, ct->io[j].start, ct->io[j].len);
 				}
 			}
 			break;

+ 1 - 1
sys/src/9/pc/mouse.c

@@ -307,7 +307,7 @@ mousectl(Cmdbuf *cb)
 			i8250mouse(cb->f[1], mouseputc, cb->nf == 1);
 
 		mousetype = Mouseserial;
-		strncmp(mouseport, cb->f[1], sizeof(mouseport)-1);
+		strncpy(mouseport, cb->f[1], sizeof(mouseport)-1);
 		packetsize = 3;
 		break;
 	case CMhwaccel:

+ 1 - 1
sys/src/cmd/upas/send/dest.c

@@ -11,7 +11,7 @@ d_new(String *addr)
 {
 	dest *dp;
 
-	dp = (dest *)malloc(sizeof(dest));
+	dp = (dest *)mallocz(sizeof(dest), 1);
 	if (dp == 0) {
 		perror("d_new");
 		exit(1);

+ 5 - 1
sys/src/cmd/upas/send/main.c

@@ -529,12 +529,16 @@ replymsg(String *errstring, message *mp, dest *dp)
 	boundary = mkboundary();
 
 	refp->bulk = 1;
+	refp->rfc822headers = 1;
 	rcvr = dp->status==d_eloop ? "postmaster" : s_to_c(mp->replyaddr);
 	ndp = d_new(s_copy(rcvr));
 	s_append(refp->sender, "postmaster");
 	s_append(refp->replyaddr, "/dev/null");
 	s_append(refp->date, thedate());
-	s_append(refp->body, "From: postmaster\n");
+	refp->haveto = 1;
+	s_append(refp->body, "To: ");
+	s_append(refp->body, rcvr);
+	s_append(refp->body, "\n");
 	s_append(refp->body, "Subject: bounced mail\n");
 	s_append(refp->body, "MIME-Version: 1.0\n");
 	s_append(refp->body, "Content-Type: multipart/mixed;\n");

+ 1 - 2
sys/src/cmd/upas/send/message.c

@@ -39,12 +39,11 @@ m_new(void)
 {
 	message *mp;
 
-	mp = (message *)malloc(sizeof(message));
+	mp = (message *)mallocz(sizeof(message), 1);
 	if (mp == 0) {
 		perror("message:");
 		exit(1);
 	}
-	memset(mp, 0, sizeof(*mp));
 	mp->sender = s_new();
 	mp->replyaddr = s_new();
 	mp->date = s_new();