Browse Source

Plan 9 from Bell Labs 2005-08-11

David du Colombier 14 years ago
parent
commit
4fb3d58bde

+ 19 - 22
dist/replica/_plan9.db

@@ -331,10 +331,10 @@
 386/bin/ndb - 20000000775 sys sys 985743147 0
 386/bin/ndb/cs - 775 sys sys 1116126321 149237
 386/bin/ndb/csquery - 775 sys sys 1115950095 61476
-386/bin/ndb/dns - 775 sys sys 1119496651 219934
-386/bin/ndb/dnsdebug - 775 sys sys 1119496652 194546
+386/bin/ndb/dns - 775 sys sys 1123643766 220090
+386/bin/ndb/dnsdebug - 775 sys sys 1123643767 194702
 386/bin/ndb/dnsquery - 775 sys sys 1120619354 63643
-386/bin/ndb/dnstcp - 775 sys sys 1119496652 193187
+386/bin/ndb/dnstcp - 775 sys sys 1123643767 193343
 386/bin/ndb/ipquery - 775 sys sys 1116126323 95480
 386/bin/ndb/mkdb - 775 sys sys 1115950097 63982
 386/bin/ndb/mkhash - 775 sys sys 1115950097 83917
@@ -7189,8 +7189,8 @@ sys/lib/wiki/page.html - 664 sys sys 1018580959 943
 sys/lib/wiki/page.txt - 664 sys sys 1018580959 12
 sys/lib/wiki/sandbox - 664 sys sys 1018580959 102
 sys/lib/wiki/werror.html - 664 sys sys 1018580959 1234
-sys/lib/yaccpar - 664 sys sys 944956052 4588
-sys/lib/yaccpars - 664 sys sys 1045432683 4596
+sys/lib/yaccpar - 664 sys sys 1123699615 4588
+sys/lib/yaccpars - 664 sys sys 1123699616 4596
 sys/log - 20000000775 sys sys 984760091 0
 sys/log/aan - 10000000666 sys sys 1019856844 0
 sys/log/auth - 10000000666 sys sys 959261821 0
@@ -7408,7 +7408,7 @@ sys/man/2/chdir - 664 sys sys 944959694 552
 sys/man/2/cleanname - 664 sys sys 950593488 709
 sys/man/2/color - 664 sys sys 944959697 1335
 sys/man/2/complete - 664 sys sys 1076276513 2396
-sys/man/2/control - 664 sys sys 1037465511 42782
+sys/man/2/control - 664 sys sys 1123676381 42778
 sys/man/2/cputime - 664 sys sys 1015091518 713
 sys/man/2/ctime - 664 sys sys 954378853 2547
 sys/man/2/ctype - 664 sys sys 1079535676 2611
@@ -7679,6 +7679,7 @@ sys/man/8/drawterm - 664 sys sys 958419689 2458
 sys/man/8/fossilcons - 664 sys sys 1087406046 17788
 sys/man/8/fs - 664 sys sys 1055701170 15029
 sys/man/8/fsconfig - 664 sys sys 1045501600 8142
+sys/man/8/gpsfs - 664 sys sys 1123643451 4924
 sys/man/8/httpd - 664 sys sys 1121198377 6675
 sys/man/8/init - 664 sys sys 944959679 1430
 sys/man/8/ipconfig - 664 sys sys 1116383710 6170
@@ -7880,7 +7881,6 @@ sys/src/9/mtx/dat.h - 664 sys sys 1091904417 3874
 sys/src/9/mtx/devarch.c - 664 sys sys 1018721285 6793
 sys/src/9/mtx/devether.c - 664 sys sys 1116097786 9281
 sys/src/9/mtx/devrtc.c - 664 sys sys 1018721285 6772
-sys/src/9/mtx/errstr.h - 664 sys sys 1089390059 2137
 sys/src/9/mtx/ether2114x.c - 664 sys sys 1026848191 37904
 sys/src/9/mtx/etherif.h - 664 sys sys 1045504432 785
 sys/src/9/mtx/fns.h - 664 sys sys 1111851554 2722
@@ -7925,7 +7925,6 @@ sys/src/9/pc/devtv.c - 664 sys sys 1091734484 45725
 sys/src/9/pc/devusb.c - 664 sys sys 1105193103 18364
 sys/src/9/pc/devvga.c - 664 sys sys 1063857412 8714
 sys/src/9/pc/dma.c - 664 sys sys 1015014515 4736
-sys/src/9/pc/errstr.h - 664 sys sys 1119276286 2144
 sys/src/9/pc/ether2000.c - 664 sys sys 1089299187 4819
 sys/src/9/pc/ether2114x.c - 664 sys sys 1081706476 41545
 sys/src/9/pc/ether589.c - 664 sys sys 1015014516 4644
@@ -7966,7 +7965,7 @@ sys/src/9/pc/main.c - 664 sys sys 1121858827 14693
 sys/src/9/pc/mem.h - 664 sys sys 1018553448 4573
 sys/src/9/pc/memory.c - 664 sys sys 1071245460 13028
 sys/src/9/pc/mkfile - 664 sys sys 1067810339 3219
-sys/src/9/pc/mmu.c - 664 sys sys 1123438210 10452
+sys/src/9/pc/mmu.c - 664 sys sys 1123645071 10456
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057
 sys/src/9/pc/mp.c - 664 sys sys 1123637234 17024
 sys/src/9/pc/mp.h - 664 sys sys 1015014520 6575
@@ -8033,10 +8032,10 @@ sys/src/9/pc/wavelan.h - 664 sys sys 1107448246 6169
 sys/src/9/port - 20000000775 sys sys 1018469625 0
 sys/src/9/port/alarm.c - 664 sys sys 1067722766 1426
 sys/src/9/port/alloc.c - 664 sys sys 1102093389 5645
-sys/src/9/port/allocb.c - 664 sys sys 1067722759 3200
-sys/src/9/port/auth.c - 664 sys sys 1055688251 2308
+sys/src/9/port/allocb.c - 664 sys sys 1123676437 3340
+sys/src/9/port/auth.c - 664 sys sys 1123647282 2392
 sys/src/9/port/cache.c - 664 sys sys 1055688274 9241
-sys/src/9/port/chan.c - 664 sys sys 1072704672 29140
+sys/src/9/port/chan.c - 664 sys sys 1123647283 29928
 sys/src/9/port/cis.c - 664 sys sys 1099761153 9248
 sys/src/9/port/debugalloc.c - 664 sys sys 1014931171 10402
 sys/src/9/port/dev.c - 664 sys sys 1077896125 8247
@@ -8096,7 +8095,7 @@ sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
 sys/src/9/port/pgrp.c - 664 sys sys 1072704671 3940
 sys/src/9/port/portclock.c - 664 sys sys 1102093397 4556
 sys/src/9/port/portdat.h - 664 sys sys 1109541435 22233
-sys/src/9/port/portfns.h - 664 sys sys 1111851541 10943
+sys/src/9/port/portfns.h - 664 sys sys 1123647283 10976
 sys/src/9/port/portmkfile - 664 sys sys 1109202242 2043
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
 sys/src/9/port/proc.c - 664 sys sys 1099760501 28207
@@ -8107,8 +8106,8 @@ sys/src/9/port/rebootcmd.c - 664 sys sys 1015278340 1561
 sys/src/9/port/sd.h - 664 sys sys 1098546338 2348
 sys/src/9/port/segment.c - 664 sys sys 1121259584 13761
 sys/src/9/port/swap.c - 664 sys sys 1055688551 6980
-sys/src/9/port/sysfile.c - 664 sys sys 1100363052 22146
-sys/src/9/port/sysproc.c - 664 sys sys 1123438659 15118
+sys/src/9/port/sysfile.c - 664 sys sys 1123647282 22249
+sys/src/9/port/sysproc.c - 664 sys sys 1123645064 15114
 sys/src/9/port/systab.h - 664 sys sys 1062721698 3044
 sys/src/9/port/taslock.c - 664 sys sys 1084475129 3658
 sys/src/9/port/thwack.c - 664 sys sys 1057323394 7253
@@ -8125,7 +8124,6 @@ sys/src/9/ppc/devether.c - 664 sys sys 1116097817 9264
 sys/src/9/ppc/devflash.c - 664 sys sys 1059490750 19885
 sys/src/9/ppc/devirq.c - 664 sys sys 1100701675 6314
 sys/src/9/ppc/devtls.c - 664 sys sys 1059490751 43721
-sys/src/9/ppc/errstr.h - 664 sys sys 1059490751 2137
 sys/src/9/ppc/etherfcc.c - 664 sys sys 1100701674 19690
 sys/src/9/ppc/etherif.h - 664 sys sys 1059490751 785
 sys/src/9/ppc/ethersaturn.c - 664 sys sys 1059490751 4321
@@ -9781,7 +9779,7 @@ sys/src/cmd/cpp/mkfile - 664 sys sys 944960879 178
 sys/src/cmd/cpp/nlist.c - 664 sys sys 1116770041 4645
 sys/src/cmd/cpp/test.c - 664 sys sys 944960879 47
 sys/src/cmd/cpp/tokens.c - 664 sys sys 944960879 6755
-sys/src/cmd/cpu.c - 664 sys sys 1121977158 21112
+sys/src/cmd/cpu.c - 664 sys sys 1123676384 21128
 sys/src/cmd/crop.c - 664 sys sys 1039753034 4136
 sys/src/cmd/date.c - 664 sys sys 944961351 449
 sys/src/cmd/db - 20000000775 sys sys 988249965 0
@@ -12203,7 +12201,7 @@ sys/src/cmd/mk/job.c - 664 sys sys 944961025 692
 sys/src/cmd/mk/lex.c - 664 sys sys 944961025 2315
 sys/src/cmd/mk/main.c - 664 sys sys 1123094366 4790
 sys/src/cmd/mk/match.c - 664 sys sys 1014926073 856
-sys/src/cmd/mk/mk.c - 664 sys sys 1014926073 5195
+sys/src/cmd/mk/mk.c - 664 sys sys 1123676387 5348
 sys/src/cmd/mk/mk.h - 664 sys sys 1055698812 3735
 sys/src/cmd/mk/mkconv - 775 sys sys 944961025 555
 sys/src/cmd/mk/mkfile - 664 sys sys 1055698812 376
@@ -14956,7 +14954,6 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
-386/bin/ndb/dns - 775 sys sys 1123643766 220090
-386/bin/ndb/dnsdebug - 775 sys sys 1123643767 194702
-386/bin/ndb/dnstcp - 775 sys sys 1123643767 193343
-sys/man/8/gpsfs - 664 sys sys 1123643451 4924
+386/bin/cpu - 775 sys sys 1123729447 138028
+386/bin/mk - 775 sys sys 1123729447 144048
+sys/games/lib/fortunes - 664 sys sys 1123730222 254387

+ 15 - 18
dist/replica/plan9.db

@@ -184,7 +184,7 @@
 386/bin/con - 775 sys sys 1115950058 78211
 386/bin/cp - 775 sys sys 1115950058 63215
 386/bin/cpp - 775 sys sys 1116903731 149799
-386/bin/cpu - 775 sys sys 1121051350 138031
+386/bin/cpu - 775 sys sys 1123729447 138028
 386/bin/crop - 775 sys sys 1115950059 116008
 386/bin/date - 775 sys sys 1115950059 43261
 386/bin/db - 775 sys sys 1119496644 336326
@@ -320,7 +320,7 @@
 386/bin/ls - 775 sys sys 1119496651 82480
 386/bin/mc - 775 sys sys 1115950092 133620
 386/bin/md5sum - 775 sys sys 1115950092 61265
-386/bin/mk - 775 sys sys 1123123798 144048
+386/bin/mk - 775 sys sys 1123729447 144048
 386/bin/mkdir - 775 sys sys 1115950093 60964
 386/bin/mkpaqfs - 775 sys sys 1115950093 94509
 386/bin/mntgen - 775 sys sys 1115950094 139193
@@ -5763,7 +5763,7 @@ sys/games - 20000000775 sys sys 952648872 0
 sys/games/lib - 20000000775 sys sys 952648879 0
 sys/games/lib/4scores - 10000000664 sys sys 1118680448 0
 sys/games/lib/5scores - 10000000664 sys sys 1118680453 0
-sys/games/lib/fortunes - 664 sys sys 1121303903 254178
+sys/games/lib/fortunes - 664 sys sys 1123730222 254387
 sys/games/lib/mahjongg - 20000000775 sys sys 1095792278 0
 sys/games/lib/mahjongg/backgrounds - 20000000775 sys sys 1095792293 0
 sys/games/lib/mahjongg/backgrounds/default.bit - 664 sys sys 1095792293 346803
@@ -7189,8 +7189,8 @@ sys/lib/wiki/page.html - 664 sys sys 1018580959 943
 sys/lib/wiki/page.txt - 664 sys sys 1018580959 12
 sys/lib/wiki/sandbox - 664 sys sys 1018580959 102
 sys/lib/wiki/werror.html - 664 sys sys 1018580959 1234
-sys/lib/yaccpar - 664 sys sys 944956052 4588
-sys/lib/yaccpars - 664 sys sys 1045432683 4596
+sys/lib/yaccpar - 664 sys sys 1123699615 4588
+sys/lib/yaccpars - 664 sys sys 1123699616 4596
 sys/log - 20000000775 sys sys 984760091 0
 sys/log/aan - 10000000666 sys sys 1019856844 0
 sys/log/auth - 10000000666 sys sys 959261821 0
@@ -7408,7 +7408,7 @@ sys/man/2/chdir - 664 sys sys 944959694 552
 sys/man/2/cleanname - 664 sys sys 950593488 709
 sys/man/2/color - 664 sys sys 944959697 1335
 sys/man/2/complete - 664 sys sys 1076276513 2396
-sys/man/2/control - 664 sys sys 1037465511 42782
+sys/man/2/control - 664 sys sys 1123676381 42778
 sys/man/2/cputime - 664 sys sys 1015091518 713
 sys/man/2/ctime - 664 sys sys 954378853 2547
 sys/man/2/ctype - 664 sys sys 1079535676 2611
@@ -7881,7 +7881,6 @@ sys/src/9/mtx/dat.h - 664 sys sys 1091904417 3874
 sys/src/9/mtx/devarch.c - 664 sys sys 1018721285 6793
 sys/src/9/mtx/devether.c - 664 sys sys 1116097786 9281
 sys/src/9/mtx/devrtc.c - 664 sys sys 1018721285 6772
-sys/src/9/mtx/errstr.h - 664 sys sys 1089390059 2137
 sys/src/9/mtx/ether2114x.c - 664 sys sys 1026848191 37904
 sys/src/9/mtx/etherif.h - 664 sys sys 1045504432 785
 sys/src/9/mtx/fns.h - 664 sys sys 1111851554 2722
@@ -7926,7 +7925,6 @@ sys/src/9/pc/devtv.c - 664 sys sys 1091734484 45725
 sys/src/9/pc/devusb.c - 664 sys sys 1105193103 18364
 sys/src/9/pc/devvga.c - 664 sys sys 1063857412 8714
 sys/src/9/pc/dma.c - 664 sys sys 1015014515 4736
-sys/src/9/pc/errstr.h - 664 sys sys 1119276286 2144
 sys/src/9/pc/ether2000.c - 664 sys sys 1089299187 4819
 sys/src/9/pc/ether2114x.c - 664 sys sys 1081706476 41545
 sys/src/9/pc/ether589.c - 664 sys sys 1015014516 4644
@@ -7967,7 +7965,7 @@ sys/src/9/pc/main.c - 664 sys sys 1121858827 14693
 sys/src/9/pc/mem.h - 664 sys sys 1018553448 4573
 sys/src/9/pc/memory.c - 664 sys sys 1071245460 13028
 sys/src/9/pc/mkfile - 664 sys sys 1067810339 3219
-sys/src/9/pc/mmu.c - 664 sys sys 1123438210 10452
+sys/src/9/pc/mmu.c - 664 sys sys 1123645071 10456
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057
 sys/src/9/pc/mp.c - 664 sys sys 1123637234 17024
 sys/src/9/pc/mp.h - 664 sys sys 1015014520 6575
@@ -8034,10 +8032,10 @@ sys/src/9/pc/wavelan.h - 664 sys sys 1107448246 6169
 sys/src/9/port - 20000000775 sys sys 1018469625 0
 sys/src/9/port/alarm.c - 664 sys sys 1067722766 1426
 sys/src/9/port/alloc.c - 664 sys sys 1102093389 5645
-sys/src/9/port/allocb.c - 664 sys sys 1067722759 3200
-sys/src/9/port/auth.c - 664 sys sys 1055688251 2308
+sys/src/9/port/allocb.c - 664 sys sys 1123676437 3340
+sys/src/9/port/auth.c - 664 sys sys 1123647282 2392
 sys/src/9/port/cache.c - 664 sys sys 1055688274 9241
-sys/src/9/port/chan.c - 664 sys sys 1072704672 29140
+sys/src/9/port/chan.c - 664 sys sys 1123647283 29928
 sys/src/9/port/cis.c - 664 sys sys 1099761153 9248
 sys/src/9/port/debugalloc.c - 664 sys sys 1014931171 10402
 sys/src/9/port/dev.c - 664 sys sys 1077896125 8247
@@ -8097,7 +8095,7 @@ sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
 sys/src/9/port/pgrp.c - 664 sys sys 1072704671 3940
 sys/src/9/port/portclock.c - 664 sys sys 1102093397 4556
 sys/src/9/port/portdat.h - 664 sys sys 1109541435 22233
-sys/src/9/port/portfns.h - 664 sys sys 1111851541 10943
+sys/src/9/port/portfns.h - 664 sys sys 1123647283 10976
 sys/src/9/port/portmkfile - 664 sys sys 1109202242 2043
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
 sys/src/9/port/proc.c - 664 sys sys 1099760501 28207
@@ -8108,8 +8106,8 @@ sys/src/9/port/rebootcmd.c - 664 sys sys 1015278340 1561
 sys/src/9/port/sd.h - 664 sys sys 1098546338 2348
 sys/src/9/port/segment.c - 664 sys sys 1121259584 13761
 sys/src/9/port/swap.c - 664 sys sys 1055688551 6980
-sys/src/9/port/sysfile.c - 664 sys sys 1100363052 22146
-sys/src/9/port/sysproc.c - 664 sys sys 1123438659 15118
+sys/src/9/port/sysfile.c - 664 sys sys 1123647282 22249
+sys/src/9/port/sysproc.c - 664 sys sys 1123645064 15114
 sys/src/9/port/systab.h - 664 sys sys 1062721698 3044
 sys/src/9/port/taslock.c - 664 sys sys 1084475129 3658
 sys/src/9/port/thwack.c - 664 sys sys 1057323394 7253
@@ -8126,7 +8124,6 @@ sys/src/9/ppc/devether.c - 664 sys sys 1116097817 9264
 sys/src/9/ppc/devflash.c - 664 sys sys 1059490750 19885
 sys/src/9/ppc/devirq.c - 664 sys sys 1100701675 6314
 sys/src/9/ppc/devtls.c - 664 sys sys 1059490751 43721
-sys/src/9/ppc/errstr.h - 664 sys sys 1059490751 2137
 sys/src/9/ppc/etherfcc.c - 664 sys sys 1100701674 19690
 sys/src/9/ppc/etherif.h - 664 sys sys 1059490751 785
 sys/src/9/ppc/ethersaturn.c - 664 sys sys 1059490751 4321
@@ -9782,7 +9779,7 @@ sys/src/cmd/cpp/mkfile - 664 sys sys 944960879 178
 sys/src/cmd/cpp/nlist.c - 664 sys sys 1116770041 4645
 sys/src/cmd/cpp/test.c - 664 sys sys 944960879 47
 sys/src/cmd/cpp/tokens.c - 664 sys sys 944960879 6755
-sys/src/cmd/cpu.c - 664 sys sys 1121977158 21112
+sys/src/cmd/cpu.c - 664 sys sys 1123676384 21128
 sys/src/cmd/crop.c - 664 sys sys 1039753034 4136
 sys/src/cmd/date.c - 664 sys sys 944961351 449
 sys/src/cmd/db - 20000000775 sys sys 988249965 0
@@ -12204,7 +12201,7 @@ sys/src/cmd/mk/job.c - 664 sys sys 944961025 692
 sys/src/cmd/mk/lex.c - 664 sys sys 944961025 2315
 sys/src/cmd/mk/main.c - 664 sys sys 1123094366 4790
 sys/src/cmd/mk/match.c - 664 sys sys 1014926073 856
-sys/src/cmd/mk/mk.c - 664 sys sys 1014926073 5195
+sys/src/cmd/mk/mk.c - 664 sys sys 1123676387 5348
 sys/src/cmd/mk/mk.h - 664 sys sys 1055698812 3735
 sys/src/cmd/mk/mkconv - 775 sys sys 944961025 555
 sys/src/cmd/mk/mkfile - 664 sys sys 1055698812 376

+ 18 - 0
dist/replica/plan9.log

@@ -20763,3 +20763,21 @@
 1123644725 1 c 386/bin/ndb/dnsdebug - 775 sys sys 1123643767 194702
 1123644725 2 c 386/bin/ndb/dnstcp - 775 sys sys 1123643767 193343
 1123644725 3 a sys/man/8/gpsfs - 664 sys sys 1123643451 4924
+1123646526 0 c sys/src/9/pc/mmu.c - 664 sys sys 1123645071 10456
+1123646526 1 c sys/src/9/port/sysproc.c - 664 sys sys 1123645064 15114
+1123648324 0 c sys/src/9/port/auth.c - 664 sys sys 1123647282 2392
+1123648324 1 c sys/src/9/port/chan.c - 664 sys sys 1123647283 29928
+1123648324 2 c sys/src/9/port/portfns.h - 664 sys sys 1123647283 10976
+1123648324 3 c sys/src/9/port/sysfile.c - 664 sys sys 1123647282 22249
+1123677133 0 c sys/man/2/control - 664 sys sys 1123676381 42778
+1123677133 1 c sys/src/9/port/allocb.c - 664 sys sys 1123676437 3340
+1123677133 2 c sys/src/cmd/mk/mk.c - 664 sys sys 1123676387 5348
+1123677133 3 c sys/src/cmd/cpu.c - 664 sys sys 1123676384 21128
+1123677133 4 d sys/src/9/ppc/errstr.h - 664 sys sys 1059490751 0
+1123677133 5 d sys/src/9/pc/errstr.h - 664 sys sys 1119276286 0
+1123677133 6 d sys/src/9/mtx/errstr.h - 664 sys sys 1089390059 0
+1123700537 0 c sys/lib/yaccpar - 664 sys sys 1123699615 4588
+1123700537 1 c sys/lib/yaccpars - 664 sys sys 1123699616 4596
+1123731145 0 c 386/bin/cpu - 775 sys sys 1123729447 138028
+1123731145 1 c 386/bin/mk - 775 sys sys 1123729447 144048
+1123731145 2 c sys/games/lib/fortunes - 664 sys sys 1123730222 254387

+ 3 - 0
sys/games/lib/fortunes

@@ -4069,3 +4069,6 @@ i hate all sorts of zealots  - boyd
 /* Watch the brackets - even Ken and Dennis get some language design wrong */
 Not related to the portable reciprocating power saw trademark of the Milwaukee Electric Tool Corporation.
 GNU C++ does not support old-style function definitions, so this extension is irrelevant.
+Here we have twenty-eight letters.
+Here we have twenty-six letters.
+Even if you could revive someone who has died, you haven't really done anything that deals with that person's central problem, which is sin.

+ 2 - 2
sys/lib/yaccpar

@@ -21,7 +21,7 @@ extern	int	sprint(char*, char*, ...);
 char*
 yytokname(int yyc)
 {
-	static char x[10];
+	static char x[16];
 
 	if(yyc > 0 && yyc <= sizeof(yytoknames)/sizeof(yytoknames[0]))
 	if(yytoknames[yyc-1])
@@ -33,7 +33,7 @@ yytokname(int yyc)
 char*
 yystatname(int yys)
 {
-	static char x[10];
+	static char x[16];
 
 	if(yys >= 0 && yys < sizeof(yystates)/sizeof(yystates[0]))
 	if(yystates[yys])

+ 2 - 2
sys/lib/yaccpars

@@ -21,7 +21,7 @@ int	yyerrflag = 0;		/* error recovery flag */
 char*
 yytokname(int yyc)
 {
-	static char x[10];
+	static char x[16];
 
 	if(yyc > 0 && yyc <= sizeof(yytoknames)/sizeof(yytoknames[0]))
 	if(yytoknames[yyc-1])
@@ -33,7 +33,7 @@ yytokname(int yyc)
 char*
 yystatname(int yys)
 {
-	static char x[10];
+	static char x[16];
 
 	if(yys >= 0 && yys < sizeof(yystates)/sizeof(yystates[0]))
 	if(yystates[yys])

+ 0 - 1
sys/man/2/control

@@ -1159,7 +1159,6 @@ Controls the left-right placement of the text in its rectangle.
 .BI reveal
 .TP
 .BI size " minx miny maxx maxy
-.TP
 Only the origin of the rectangle is significant; menus calculate the appropriate size.
 .TP
 .BI selectcolor " name

+ 0 - 51
sys/src/9/mtx/errstr.h

@@ -1,51 +0,0 @@
-char Enoerror[] = "no error";
-char Emount[] = "inconsistent mount";
-char Eunmount[] = "not mounted";
-char Eismtpt[] = "is a mount point";
-char Eunion[] = "not in union";
-char Emountrpc[] = "mount rpc error";
-char Eshutdown[] = "device shut down";
-char Enocreate[] = "mounted directory forbids creation";
-char Enonexist[] = "file does not exist";
-char Eexist[] = "file already exists";
-char Ebadsharp[] = "unknown device in # filename";
-char Enotdir[] = "not a directory";
-char Eisdir[] = "file is a directory";
-char Ebadchar[] = "bad character in file name";
-char Efilename[] = "file name syntax";
-char Eperm[] = "permission denied";
-char Ebadusefd[] = "inappropriate use of fd";
-char Ebadarg[] = "bad arg in system call";
-char Einuse[] = "device or object already in use";
-char Eio[] = "i/o error";
-char Etoobig[] = "read or write too large";
-char Etoosmall[] = "read or write too small";
-char Enoport[] = "network port not available";
-char Ehungup[] = "i/o on hungup channel";
-char Ebadctl[] = "bad process or channel control request";
-char Enodev[] = "no free devices";
-char Eprocdied[] = "process exited";
-char Enochild[] = "no living children";
-char Eioload[] = "i/o error in demand load";
-char Enovmem[] = "virtual memory allocation failed";
-char Ebadfd[] = "fd out of range or not open";
-char Enofd[] = "no free file descriptors";
-char Eisstream[] = "seek on a stream";
-char Ebadexec[] = "exec header invalid";
-char Etimedout[] = "connection timed out";
-char Econrefused[] = "connection refused";
-char Econinuse[] = "connection in use";
-char Eintr[] = "interrupted";
-char Enomem[] = "kernel allocate failed";
-char Enoswap[] = "swap space full";
-char Esoverlap[] = "segments overlap";
-char Emouseset[] = "mouse type already set";
-char Eshort[] = "i/o count too small";
-char Egreg[] = "ken has left the building";
-char Ebadspec[] = "bad attach specifier";
-char Enoreg[] = "process has no saved registers";
-char Enoattach[] = "mount/attach disallowed";
-char Eshortstat[] = "stat buffer too small";
-char Ebadstat[] = "malformed stat buffer";
-char Enegoff[] = "negative i/o offset";
-char Ecmdargs[] = "wrong #args in control message";

+ 0 - 51
sys/src/9/pc/errstr.h

@@ -1,51 +0,0 @@
-char Enoerror[] = "no error";
-char Emount[] = "inconsistent mount";
-char Eunmount[] = "not mounted";
-char Eismtpt[] = "is a mount point";
-char Eunion[] = "not in union";
-char Emountrpc[] = "mount rpc error";
-char Eshutdown[] = "device shut down";
-char Enocreate[] = "mounted directory forbids creation";
-char Enonexist[] = "file does not exist";
-char Eexist[] = "file already exists";
-char Ebadsharp[] = "unknown device in # filename";
-char Enotdir[] = "not a directory";
-char Eisdir[] = "file is a directory";
-char Ebadchar[] = "bad character in file name";
-char Efilename[] = "file name syntax";
-char Eperm[] = "permission denied";
-char Ebadusefd[] = "inappropriate use of fd";
-char Ebadarg[] = "bad arg in system call";
-char Einuse[] = "device or object already in use";
-char Eio[] = "i/o error";
-char Etoobig[] = "read or write too large";
-char Etoosmall[] = "read or write too small";
-char Enoport[] = "network port not available";
-char Ehungup[] = "i/o on hungup channel";
-char Ebadctl[] = "bad process or channel control request";
-char Enodev[] = "no free devices";
-char Eprocdied[] = "process exited";
-char Enochild[] = "no living children";
-char Eioload[] = "i/o error in demand load";
-char Enovmem[] = "virtual memory allocation failed";
-char Ebadfd[] = "fd out of range or not open";
-char Enofd[] = "no free file descriptors";
-char Eisstream[] = "seek on a stream";
-char Ebadexec[] = "exec header invalid";
-char Etimedout[] = "connection timed out";
-char Econrefused[] = "connection refused";
-char Econinuse[] = "connection in use";
-char Eintr[] = "interrupted";
-char Enomem[] = "kernel allocate failed";
-char Enoswap[] = "swap space full";
-char Esoverlap[] = "segments overlap";
-char Emouseset[] = "mouse type already set";
-char Eshort[] = "i/o count too small";
-char Egreg[] = "jmk added reentrancy for threads";
-char Ebadspec[] = "bad attach specifier";
-char Enoreg[] = "process has no saved registers";
-char Enoattach[] = "mount/attach disallowed";
-char Eshortstat[] = "stat buffer too small";
-char Ebadstat[] = "malformed stat buffer";
-char Enegoff[] = "negative i/o offset";
-char Ecmdargs[] = "wrong #args in control message";

+ 14 - 4
sys/src/9/port/allocb.c

@@ -76,19 +76,29 @@ Block*
 iallocb(int size)
 {
 	Block *b;
-	static int m1, m2;
+	static int m1, m2, mp;
 
 	if(ialloc.bytes > conf.ialloc){
-		if((m1++%10000)==0)
+		if((m1++%10000)==0){
+			if(mp++ > 1000){
+				active.exiting = 1;
+				exit(0);
+			}
 			iprint("iallocb: limited %lud/%lud\n",
 				ialloc.bytes, conf.ialloc);
-		return 0;
+		}
+		return nil;
 	}
 
 	if((b = _allocb(size)) == nil){
-		if((m2++%10000)==0)
+		if((m2++%10000)==0){
+			if(mp++ > 1000){
+				active.exiting = 1;
+				exit(0);
+			}
 			iprint("iallocb: no memory %lud/%lud\n",
 				ialloc.bytes, conf.ialloc);
+		}
 		return nil;
 	}
 	setmalloctag(b, getcallerpc(&size));

+ 7 - 2
sys/src/9/port/auth.c

@@ -66,8 +66,11 @@ sysfauth(ulong *arg)
 	int fd;
 
 	validaddr(arg[1], 1, 0);
-	aname = (char*)arg[1];
-	validname(aname, 1);
+	aname = validnamedup((char*)arg[1], 1);
+	if(waserror()){
+		free(aname);
+		nexterror();
+	}
 	c = fdtochan(arg[0], ORDWR, 0, 1);
 	if(waserror()){
 		cclose(c);
@@ -78,6 +81,8 @@ sysfauth(ulong *arg)
 	/* at this point ac is responsible for keeping c alive */
 	cclose(c);
 	poperror();	/* c */
+	free(aname);
+	poperror();	/* aname */
 
 	if(waserror()){
 		cclose(ac);

+ 43 - 7
sys/src/9/port/chan.c

@@ -1076,7 +1076,11 @@ namec(char *aname, int amode, int omode, ulong perm)
 	name = aname;
 	if(name[0] == '\0')
 		error("empty file name");
-	validname(name, 1);
+	name = validnamedup(name, 1);
+	if(waserror()){
+		free(name);
+		nexterror();
+	}
 
 	/*
 	 * Find the starting off point (the current slash, the root of
@@ -1376,8 +1380,6 @@ if(c->umh != nil){
 		panic("unknown namec access %d\n", amode);
 	}
 
-	poperror();
-
 	/* place final element in genbuf for e.g. exec */
 	if(e.nelems > 0)
 		kstrcpy(up->genbuf, e.elems[e.nelems-1], sizeof up->genbuf);
@@ -1386,6 +1388,9 @@ if(c->umh != nil){
 	free(e.name);
 	free(e.elems);
 	free(e.off);
+	poperror();	/* e c */
+	free(name);
+	poperror();	/* name */
 
 	return c;
 }
@@ -1419,17 +1424,24 @@ char isfrog[256]={
  * routine works for kernel and user memory both.
  * The parameter slashok flags whether a slash character is an error
  * or a valid character.
+ *
+ * The parameter dup flags whether the string should be copied
+ * out of user space before being scanned the second time.
+ * (Otherwise a malicious thread could remove the NUL, causing us
+ * to access unchecked addresses.) 
  */
-void
-validname(char *aname, int slashok)
+static char*
+validname0(char *aname, int slashok, int dup, ulong pc)
 {
-	char *p, *ename, *name;
+	char *p, *ename, *name, *s;
 	uint t;
-	int c;
+	int c, n;
 	Rune r;
 
 	name = aname;
 	if(((ulong)name & KZERO) != KZERO) {
+		if(!dup)
+			print("warning: validname called from %lux with user pointer", pc);
 		p = name;
 		t = BY2PG-((ulong)p&(BY2PG-1));
 		while((ename=vmemchr(p, 0, t)) == nil) {
@@ -1442,6 +1454,16 @@ validname(char *aname, int slashok)
 	if(ename==nil || ename-name>=(1<<16))
 		error("name too long");
 
+	s = nil;
+	if(dup){
+		n = ename-name;
+		s = smalloc(n+1);
+		memmove(s, name, n);
+		s[n] = 0;
+		aname = s;
+		name = s;
+	}
+	
 	while(*name){
 		/* all characters above '~' are ok */
 		c = *(uchar*)name;
@@ -1451,11 +1473,25 @@ validname(char *aname, int slashok)
 			if(isfrog[c])
 				if(!slashok || c!='/'){
 					snprint(up->genbuf, sizeof(up->genbuf), "%s: %q", Ebadchar, aname);
+					free(s);
 					error(up->genbuf);
 			}
 			name++;
 		}
 	}
+	return s;
+}
+
+void
+validname(char *aname, int slashok)
+{
+	validname0(aname, slashok, 0, getcallerpc(&aname));
+}
+
+char*
+validnamedup(char *aname, int slashok)
+{
+	return validname0(aname, slashok, 1, 0);
 }
 
 void

+ 1 - 0
sys/src/9/port/portfns.h

@@ -353,6 +353,7 @@ ulong		userpc(void);
 long		userwrite(char*, int);
 void		validaddr(ulong, ulong, int);
 void		validname(char*, int);
+char*		validnamedup(char*, int);
 void		validstat(uchar*, int);
 void*		vmemchr(void*, int, int);
 Proc*		wakeup(Rendez*);

+ 8 - 2
sys/src/9/port/sysfile.c

@@ -1029,13 +1029,19 @@ bindmount(int ismount, int fd, int afd, char* arg0, char* arg1, ulong flag, char
 		bogus.spec = spec;
 		if(waserror())
 			error(Ebadspec);
-		validname(spec, 1);
+		spec = validnamedup(spec, 1);
 		poperror();
+		
+		if(waserror()){
+			free(spec);
+			nexterror();
+		}
 
 		ret = devno('M', 0);
 		c0 = devtab[ret]->attach((char*)&bogus);
 
-		poperror();
+		poperror();	/* spec */
+		poperror();	/* ac bc */
 		if(ac)
 			cclose(ac);
 		cclose(bc);

+ 0 - 51
sys/src/9/ppc/errstr.h

@@ -1,51 +0,0 @@
-char Enoerror[] = "no error";
-char Emount[] = "inconsistent mount";
-char Eunmount[] = "not mounted";
-char Eismtpt[] = "is a mount point";
-char Eunion[] = "not in union";
-char Emountrpc[] = "mount rpc error";
-char Eshutdown[] = "device shut down";
-char Enocreate[] = "mounted directory forbids creation";
-char Enonexist[] = "file does not exist";
-char Eexist[] = "file already exists";
-char Ebadsharp[] = "unknown device in # filename";
-char Enotdir[] = "not a directory";
-char Eisdir[] = "file is a directory";
-char Ebadchar[] = "bad character in file name";
-char Efilename[] = "file name syntax";
-char Eperm[] = "permission denied";
-char Ebadusefd[] = "inappropriate use of fd";
-char Ebadarg[] = "bad arg in system call";
-char Einuse[] = "device or object already in use";
-char Eio[] = "i/o error";
-char Etoobig[] = "read or write too large";
-char Etoosmall[] = "read or write too small";
-char Enoport[] = "network port not available";
-char Ehungup[] = "i/o on hungup channel";
-char Ebadctl[] = "bad process or channel control request";
-char Enodev[] = "no free devices";
-char Eprocdied[] = "process exited";
-char Enochild[] = "no living children";
-char Eioload[] = "i/o error in demand load";
-char Enovmem[] = "virtual memory allocation failed";
-char Ebadfd[] = "fd out of range or not open";
-char Enofd[] = "no free file descriptors";
-char Eisstream[] = "seek on a stream";
-char Ebadexec[] = "exec header invalid";
-char Etimedout[] = "connection timed out";
-char Econrefused[] = "connection refused";
-char Econinuse[] = "connection in use";
-char Eintr[] = "interrupted";
-char Enomem[] = "kernel allocate failed";
-char Enoswap[] = "swap space full";
-char Esoverlap[] = "segments overlap";
-char Emouseset[] = "mouse type already set";
-char Eshort[] = "i/o count too small";
-char Egreg[] = "ken has left the building";
-char Ebadspec[] = "bad attach specifier";
-char Enoreg[] = "process has no saved registers";
-char Enoattach[] = "mount/attach disallowed";
-char Eshortstat[] = "stat buffer too small";
-char Ebadstat[] = "malformed stat buffer";
-char Enegoff[] = "negative i/o offset";
-char Ecmdargs[] = "wrong #args in control message";

+ 2 - 1
sys/src/cmd/cpu.c

@@ -1148,5 +1148,6 @@ lclnoteproc(int netfd)
 
 	if(w == nil)
 		exits(nil);
-	exits(w->msg);
+	exits(0);
+/*	exits(w->msg); */
 }

+ 7 - 2
sys/src/cmd/mk/mk.c

@@ -221,10 +221,15 @@ outofdate(Node *node, Arc *arc, int eval)
 			else
 				symlook(str, S_OUTOFDATE, (void *)ret);
 		} else
-			ret = (int)sym->value;
+			ret = (int)(uintptr)sym->value;
 		return(ret-1);
 	} else if(strchr(arc->n->name, '(') && arc->n->time == 0)  /* missing archive member */
 		return 1;
 	else
-		return node->time < arc->n->time;
+		/*
+		 * Treat equal times as out-of-date.
+		 * It's a race, and the safer option is to do
+		 * extra building rather than not enough.
+	 	 */
+		return node->time <= arc->n->time;
 }