Browse Source

Plan 9 from Bell Labs 2007-04-27

David du Colombier 13 years ago
parent
commit
e9ace367d3

+ 5 - 0
cfg/example/termrc

@@ -0,0 +1,5 @@
+#!/bin/rc
+# Since booting from venti could have started loopback,
+# don't test for existing interfaces, just use
+#
+#ip/ipconfig -g your-gateway ether /net/ether0 your-ip-address your-subnet-mask

+ 23 - 22
dist/replica/_plan9.db

@@ -20,7 +20,7 @@
 386/bin/9660srv - 775 sys sys 1168402261 104975
 386/bin/aan - 775 sys sys 1168402261 131298
 386/bin/acid - 775 sys sys 1172808055 401961
-386/bin/acme - 775 sys sys 1177527677 432298
+386/bin/acme - 775 sys sys 1177557986 432228
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1173754547 134719
 386/bin/ape/cc - 775 sys sys 1168402263 70642
@@ -37,7 +37,7 @@
 386/bin/ape/stty - 775 sys sys 1148500571 41080
 386/bin/ape/tar - 775 sys sys 1168402264 62184
 386/bin/ape/uname - 775 sys sys 1173754552 134895
-386/bin/aquarela - 775 sys sys 1174332054 333082
+386/bin/aquarela - 775 sys sys 1177617494 339018
 386/bin/ar - 775 sys sys 1168402265 113774
 386/bin/archfs - 775 sys sys 1168402265 147070
 386/bin/ascii - 775 sys sys 1168402265 64884
@@ -179,7 +179,7 @@
 386/bin/cfs - 775 sys sys 1172808057 131665
 386/bin/chgrp - 775 sys sys 1168402294 59522
 386/bin/chmod - 775 sys sys 1168402294 62518
-386/bin/cifscmd - 775 sys sys 1174332056 343905
+386/bin/cifscmd - 775 sys sys 1177617495 349848
 386/bin/cleanname - 775 sys sys 1168402295 58541
 386/bin/clock - 775 sys sys 1168402296 158688
 386/bin/cmp - 775 sys sys 1157597609 40658
@@ -302,7 +302,7 @@
 386/bin/ip/httpd/wikipost - 775 sys sys 1177283321 115228
 386/bin/ip/httpfile - 775 sys sys 1168402324 284262
 386/bin/ip/imap4d - 775 sys sys 1169265834 238152
-386/bin/ip/ipconfig - 775 sys sys 1177541736 158958
+386/bin/ip/ipconfig - 775 sys sys 1177557987 158902
 386/bin/ip/linklocal - 775 sys sys 1177530964 42790
 386/bin/ip/ping - 775 sys sys 1175887160 84684
 386/bin/ip/ppp - 775 sys sys 1169612026 220423
@@ -459,9 +459,9 @@
 386/bin/upas/isspam - 775 sys sys 1064598349 38
 386/bin/upas/list - 775 sys sys 1176520506 83035
 386/bin/upas/marshal - 775 sys sys 1169065328 134608
-386/bin/upas/ml - 775 sys sys 1176520507 124309
-386/bin/upas/mlmgr - 775 sys sys 1176520507 104932
-386/bin/upas/mlowner - 775 sys sys 1176520507 92263
+386/bin/upas/ml - 775 sys sys 1177617496 124309
+386/bin/upas/mlmgr - 775 sys sys 1177617496 104932
+386/bin/upas/mlowner - 775 sys sys 1177617496 92263
 386/bin/upas/msgcat - 775 sys sys 1064598353 38
 386/bin/upas/msgtok - 775 sys sys 1176520508 76758
 386/bin/upas/nedmail - 775 sys sys 1176520508 157330
@@ -873,6 +873,9 @@ arm/inflate - 664 sys sys 1176753895 20480
 arm/lib - 20000000775 sys sys 1039727909 0
 arm/lib/ape - 20000000775 sys sys 1020896375 0
 arm/mkfile - 664 sys sys 948141303 46
+cfg - 20000000775 sys sys 1177628278 0
+cfg/example - 20000000775 sys sys 1177628283 0
+cfg/example/termrc - 775 sys sys 1177628544 195
 cron - 20000000777 sys sys 1039727915 0
 cron/upas - 20000000775 upas sys 1039727915 0
 cron/upas/cron - 664 upas sys 1144683680 222
@@ -881,7 +884,7 @@ dist/replica - 20000000775 sys sys 1166743907 0
 dist/replica/cd - 664 sys sys 1149084099 922
 dist/replica/kfs - 664 sys sys 1019527929 237
 dist/replica/network - 775 sys sys 1139499513 956
-dist/replica/plan9.proto - 664 sys sys 1144683345 2813
+dist/replica/plan9.proto - 664 sys sys 1177628403 2840
 env - 20000000775 sys sys 1104813586 0
 fd - 20000000775 sys sys 1020896384 0
 lib - 20000000775 sys sys 1161442421 0
@@ -5594,7 +5597,7 @@ rc/bin/start - 775 sys sys 945617209 120
 rc/bin/stock - 775 sys sys 1143126371 292
 rc/bin/stop - 775 sys sys 945617209 110
 rc/bin/tel - 775 sys sys 1161209756 128
-rc/bin/termrc - 775 sys sys 1176830829 1692
+rc/bin/termrc - 775 sys sys 1177629021 2240
 rc/bin/termrc.local - 775 sys sys 1176500067 425
 rc/bin/thesaurus - 775 sys sys 1068054167 246
 rc/bin/tlsclienttunnel - 775 sys sys 1024375633 153
@@ -9442,7 +9445,7 @@ sys/src/cmd/aquarela/smbcomfindclose2.c - 664 sys sys 1135892111 319
 sys/src/cmd/aquarela/smbcomflush.c - 664 sys sys 1135892111 707
 sys/src/cmd/aquarela/smbcomlocking.c - 664 sys sys 1135892111 3701
 sys/src/cmd/aquarela/smbcommon.c - 664 sys sys 1135892111 8652
-sys/src/cmd/aquarela/smbcomopen.c - 664 sys sys 1135892111 18350
+sys/src/cmd/aquarela/smbcomopen.c - 664 sys sys 1177589922 20789
 sys/src/cmd/aquarela/smbcomquery.c - 664 sys sys 1135892111 2715
 sys/src/cmd/aquarela/smbcomread.c - 664 sys sys 1135892112 2601
 sys/src/cmd/aquarela/smbcomrename.c - 664 sys sys 1135892112 1259
@@ -9451,19 +9454,19 @@ sys/src/cmd/aquarela/smbcomsetinfo.c - 664 sys sys 1135892112 2985
 sys/src/cmd/aquarela/smbcomtransaction.c - 664 sys sys 1135892112 4041
 sys/src/cmd/aquarela/smbcomtreeconnectandx.c - 664 sys sys 1135892112 3269
 sys/src/cmd/aquarela/smbcomtreedisconnect.c - 664 sys sys 1135892112 290
-sys/src/cmd/aquarela/smbcomwrite.c - 664 sys sys 1135892112 3312
+sys/src/cmd/aquarela/smbcomwrite.c - 664 sys sys 1177589923 5630
 sys/src/cmd/aquarela/smbconnect.c - 664 sys sys 1135892112 9040
 sys/src/cmd/aquarela/smbconv.c - 664 sys sys 1135892112 531
 sys/src/cmd/aquarela/smbdat.h - 664 sys sys 1135892113 6649
 sys/src/cmd/aquarela/smbdircache.c - 664 sys sys 1135892113 631
 sys/src/cmd/aquarela/smbfile.c - 664 sys sys 1135892113 438
-sys/src/cmd/aquarela/smbfns.h - 664 sys sys 1135892113 12190
+sys/src/cmd/aquarela/smbfns.h - 664 sys sys 1177589923 12366
 sys/src/cmd/aquarela/smbglobals.c - 664 sys sys 1136651999 1141
 sys/src/cmd/aquarela/smbidmap.c - 664 sys sys 1135892113 2178
 sys/src/cmd/aquarela/smblisten.c - 664 sys sys 1135892113 2592
-sys/src/cmd/aquarela/smblog.c - 664 sys sys 1135892113 1841
+sys/src/cmd/aquarela/smblog.c - 664 sys sys 1177589924 2029
 sys/src/cmd/aquarela/smbnegotiate.c - 664 sys sys 1135892113 2933
-sys/src/cmd/aquarela/smboptable.c - 664 sys sys 1135892113 5826
+sys/src/cmd/aquarela/smboptable.c - 664 sys sys 1177589924 5871
 sys/src/cmd/aquarela/smbpath.c - 664 sys sys 1135892114 393
 sys/src/cmd/aquarela/smbrap2.c - 664 sys sys 1135892114 11628
 sys/src/cmd/aquarela/smbrap2client.c - 664 sys sys 1135892114 3082
@@ -9475,8 +9478,8 @@ sys/src/cmd/aquarela/smbstring.c - 664 sys sys 1135892114 4152
 sys/src/cmd/aquarela/smbtime.c - 664 sys sys 1135892114 1232
 sys/src/cmd/aquarela/smbtrans2client.c - 664 sys sys 1135892114 3726
 sys/src/cmd/aquarela/smbtrans2find.c - 664 sys sys 1135892115 9041
-sys/src/cmd/aquarela/smbtrans2query.c - 664 sys sys 1174276975 8262
-sys/src/cmd/aquarela/smbtrans2set.c - 664 sys sys 1155362132 2510
+sys/src/cmd/aquarela/smbtrans2query.c - 664 sys sys 1177589924 10191
+sys/src/cmd/aquarela/smbtrans2set.c - 664 sys sys 1177589925 5289
 sys/src/cmd/aquarela/smbtransaction.c - 664 sys sys 1135892115 16684
 sys/src/cmd/aquarela/smbtree.c - 664 sys sys 1135892115 1314
 sys/src/cmd/aquarela/testconnect.c - 664 sys sys 1135892115 1533
@@ -13206,7 +13209,7 @@ sys/src/cmd/qi/symbols.c - 664 sys sys 1121978130 1742
 sys/src/cmd/qi/syscall.c - 664 sys sys 1166822290 14425
 sys/src/cmd/qi/timing - 664 sys sys 1076688570 641
 sys/src/cmd/ql - 20000000775 sys sys 1055699284 0
-sys/src/cmd/ql/asm.c - 664 sys sys 1135487949 13021
+sys/src/cmd/ql/asm.c - 664 sys sys 1177590112 14961
 sys/src/cmd/ql/asmout.c - 664 sys sys 1137459145 35737
 sys/src/cmd/ql/cnam.c - 664 sys sys 1089299167 335
 sys/src/cmd/ql/compat.c - 664 sys sys 944961082 445
@@ -14167,12 +14170,12 @@ sys/src/cmd/upas/misc/remotemail - 775 sys sys 954266541 113
 sys/src/cmd/upas/misc/rewrite - 664 sys sys 954264578 661
 sys/src/cmd/upas/mkfile - 664 sys sys 1130423810 1916
 sys/src/cmd/upas/ml - 20000000775 sys sys 1064589605 0
-sys/src/cmd/upas/ml/common.c - 664 sys sys 1121977165 3373
+sys/src/cmd/upas/ml/common.c - 664 sys sys 1177589087 3379
 sys/src/cmd/upas/ml/dat.h - 664 sys sys 1015096762 517
 sys/src/cmd/upas/ml/mkfile - 664 sys sys 1064589605 521
-sys/src/cmd/upas/ml/ml.c - 664 sys sys 1063854713 3462
+sys/src/cmd/upas/ml/ml.c - 664 sys sys 1177589086 3465
 sys/src/cmd/upas/ml/mlmgr.c - 664 sys sys 1045505888 2332
-sys/src/cmd/upas/ml/mlowner.c - 664 sys sys 1015096763 1142
+sys/src/cmd/upas/ml/mlowner.c - 664 sys sys 1177589086 1143
 sys/src/cmd/upas/ned - 20000000775 sys sys 1062073146 0
 sys/src/cmd/upas/ned/mkfile - 664 sys sys 1060041738 233
 sys/src/cmd/upas/ned/nedmail.c - 664 sys sys 1143759341 44533
@@ -15808,5 +15811,3 @@ 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/acme - 775 sys sys 1177557986 432228
-386/bin/ip/ipconfig - 775 sys sys 1177557987 158902

+ 21 - 18
dist/replica/plan9.db

@@ -37,7 +37,7 @@
 386/bin/ape/stty - 775 sys sys 1148500571 41080
 386/bin/ape/tar - 775 sys sys 1168402264 62184
 386/bin/ape/uname - 775 sys sys 1173754552 134895
-386/bin/aquarela - 775 sys sys 1174332054 333082
+386/bin/aquarela - 775 sys sys 1177617494 339018
 386/bin/ar - 775 sys sys 1168402265 113774
 386/bin/archfs - 775 sys sys 1168402265 147070
 386/bin/ascii - 775 sys sys 1168402265 64884
@@ -179,7 +179,7 @@
 386/bin/cfs - 775 sys sys 1172808057 131665
 386/bin/chgrp - 775 sys sys 1168402294 59522
 386/bin/chmod - 775 sys sys 1168402294 62518
-386/bin/cifscmd - 775 sys sys 1174332056 343905
+386/bin/cifscmd - 775 sys sys 1177617495 349848
 386/bin/cleanname - 775 sys sys 1168402295 58541
 386/bin/clock - 775 sys sys 1168402296 158688
 386/bin/cmp - 775 sys sys 1157597609 40658
@@ -459,9 +459,9 @@
 386/bin/upas/isspam - 775 sys sys 1064598349 38
 386/bin/upas/list - 775 sys sys 1176520506 83035
 386/bin/upas/marshal - 775 sys sys 1169065328 134608
-386/bin/upas/ml - 775 sys sys 1176520507 124309
-386/bin/upas/mlmgr - 775 sys sys 1176520507 104932
-386/bin/upas/mlowner - 775 sys sys 1176520507 92263
+386/bin/upas/ml - 775 sys sys 1177617496 124309
+386/bin/upas/mlmgr - 775 sys sys 1177617496 104932
+386/bin/upas/mlowner - 775 sys sys 1177617496 92263
 386/bin/upas/msgcat - 775 sys sys 1064598353 38
 386/bin/upas/msgtok - 775 sys sys 1176520508 76758
 386/bin/upas/nedmail - 775 sys sys 1176520508 157330
@@ -873,6 +873,9 @@ arm/inflate - 664 sys sys 1176753895 20480
 arm/lib - 20000000775 sys sys 1039727909 0
 arm/lib/ape - 20000000775 sys sys 1020896375 0
 arm/mkfile - 664 sys sys 948141303 46
+cfg - 20000000775 sys sys 1177628278 0
+cfg/example - 20000000775 sys sys 1177628283 0
+cfg/example/termrc - 775 sys sys 1177628544 195
 cron - 20000000777 sys sys 1039727915 0
 cron/upas - 20000000775 upas sys 1039727915 0
 cron/upas/cron - 664 upas sys 1144683680 222
@@ -881,7 +884,7 @@ dist/replica - 20000000775 sys sys 1166743907 0
 dist/replica/cd - 664 sys sys 1149084099 922
 dist/replica/kfs - 664 sys sys 1019527929 237
 dist/replica/network - 775 sys sys 1139499513 956
-dist/replica/plan9.proto - 664 sys sys 1144683345 2813
+dist/replica/plan9.proto - 664 sys sys 1177628403 2840
 env - 20000000775 sys sys 1104813586 0
 fd - 20000000775 sys sys 1020896384 0
 lib - 20000000775 sys sys 1161442421 0
@@ -5594,7 +5597,7 @@ rc/bin/start - 775 sys sys 945617209 120
 rc/bin/stock - 775 sys sys 1143126371 292
 rc/bin/stop - 775 sys sys 945617209 110
 rc/bin/tel - 775 sys sys 1161209756 128
-rc/bin/termrc - 775 sys sys 1176830829 1692
+rc/bin/termrc - 775 sys sys 1177629021 2240
 rc/bin/termrc.local - 775 sys sys 1176500067 425
 rc/bin/thesaurus - 775 sys sys 1068054167 246
 rc/bin/tlsclienttunnel - 775 sys sys 1024375633 153
@@ -9442,7 +9445,7 @@ sys/src/cmd/aquarela/smbcomfindclose2.c - 664 sys sys 1135892111 319
 sys/src/cmd/aquarela/smbcomflush.c - 664 sys sys 1135892111 707
 sys/src/cmd/aquarela/smbcomlocking.c - 664 sys sys 1135892111 3701
 sys/src/cmd/aquarela/smbcommon.c - 664 sys sys 1135892111 8652
-sys/src/cmd/aquarela/smbcomopen.c - 664 sys sys 1135892111 18350
+sys/src/cmd/aquarela/smbcomopen.c - 664 sys sys 1177589922 20789
 sys/src/cmd/aquarela/smbcomquery.c - 664 sys sys 1135892111 2715
 sys/src/cmd/aquarela/smbcomread.c - 664 sys sys 1135892112 2601
 sys/src/cmd/aquarela/smbcomrename.c - 664 sys sys 1135892112 1259
@@ -9451,19 +9454,19 @@ sys/src/cmd/aquarela/smbcomsetinfo.c - 664 sys sys 1135892112 2985
 sys/src/cmd/aquarela/smbcomtransaction.c - 664 sys sys 1135892112 4041
 sys/src/cmd/aquarela/smbcomtreeconnectandx.c - 664 sys sys 1135892112 3269
 sys/src/cmd/aquarela/smbcomtreedisconnect.c - 664 sys sys 1135892112 290
-sys/src/cmd/aquarela/smbcomwrite.c - 664 sys sys 1135892112 3312
+sys/src/cmd/aquarela/smbcomwrite.c - 664 sys sys 1177589923 5630
 sys/src/cmd/aquarela/smbconnect.c - 664 sys sys 1135892112 9040
 sys/src/cmd/aquarela/smbconv.c - 664 sys sys 1135892112 531
 sys/src/cmd/aquarela/smbdat.h - 664 sys sys 1135892113 6649
 sys/src/cmd/aquarela/smbdircache.c - 664 sys sys 1135892113 631
 sys/src/cmd/aquarela/smbfile.c - 664 sys sys 1135892113 438
-sys/src/cmd/aquarela/smbfns.h - 664 sys sys 1135892113 12190
+sys/src/cmd/aquarela/smbfns.h - 664 sys sys 1177589923 12366
 sys/src/cmd/aquarela/smbglobals.c - 664 sys sys 1136651999 1141
 sys/src/cmd/aquarela/smbidmap.c - 664 sys sys 1135892113 2178
 sys/src/cmd/aquarela/smblisten.c - 664 sys sys 1135892113 2592
-sys/src/cmd/aquarela/smblog.c - 664 sys sys 1135892113 1841
+sys/src/cmd/aquarela/smblog.c - 664 sys sys 1177589924 2029
 sys/src/cmd/aquarela/smbnegotiate.c - 664 sys sys 1135892113 2933
-sys/src/cmd/aquarela/smboptable.c - 664 sys sys 1135892113 5826
+sys/src/cmd/aquarela/smboptable.c - 664 sys sys 1177589924 5871
 sys/src/cmd/aquarela/smbpath.c - 664 sys sys 1135892114 393
 sys/src/cmd/aquarela/smbrap2.c - 664 sys sys 1135892114 11628
 sys/src/cmd/aquarela/smbrap2client.c - 664 sys sys 1135892114 3082
@@ -9475,8 +9478,8 @@ sys/src/cmd/aquarela/smbstring.c - 664 sys sys 1135892114 4152
 sys/src/cmd/aquarela/smbtime.c - 664 sys sys 1135892114 1232
 sys/src/cmd/aquarela/smbtrans2client.c - 664 sys sys 1135892114 3726
 sys/src/cmd/aquarela/smbtrans2find.c - 664 sys sys 1135892115 9041
-sys/src/cmd/aquarela/smbtrans2query.c - 664 sys sys 1174276975 8262
-sys/src/cmd/aquarela/smbtrans2set.c - 664 sys sys 1155362132 2510
+sys/src/cmd/aquarela/smbtrans2query.c - 664 sys sys 1177589924 10191
+sys/src/cmd/aquarela/smbtrans2set.c - 664 sys sys 1177589925 5289
 sys/src/cmd/aquarela/smbtransaction.c - 664 sys sys 1135892115 16684
 sys/src/cmd/aquarela/smbtree.c - 664 sys sys 1135892115 1314
 sys/src/cmd/aquarela/testconnect.c - 664 sys sys 1135892115 1533
@@ -13206,7 +13209,7 @@ sys/src/cmd/qi/symbols.c - 664 sys sys 1121978130 1742
 sys/src/cmd/qi/syscall.c - 664 sys sys 1166822290 14425
 sys/src/cmd/qi/timing - 664 sys sys 1076688570 641
 sys/src/cmd/ql - 20000000775 sys sys 1055699284 0
-sys/src/cmd/ql/asm.c - 664 sys sys 1135487949 13021
+sys/src/cmd/ql/asm.c - 664 sys sys 1177590112 14961
 sys/src/cmd/ql/asmout.c - 664 sys sys 1137459145 35737
 sys/src/cmd/ql/cnam.c - 664 sys sys 1089299167 335
 sys/src/cmd/ql/compat.c - 664 sys sys 944961082 445
@@ -14167,12 +14170,12 @@ sys/src/cmd/upas/misc/remotemail - 775 sys sys 954266541 113
 sys/src/cmd/upas/misc/rewrite - 664 sys sys 954264578 661
 sys/src/cmd/upas/mkfile - 664 sys sys 1130423810 1916
 sys/src/cmd/upas/ml - 20000000775 sys sys 1064589605 0
-sys/src/cmd/upas/ml/common.c - 664 sys sys 1121977165 3373
+sys/src/cmd/upas/ml/common.c - 664 sys sys 1177589087 3379
 sys/src/cmd/upas/ml/dat.h - 664 sys sys 1015096762 517
 sys/src/cmd/upas/ml/mkfile - 664 sys sys 1064589605 521
-sys/src/cmd/upas/ml/ml.c - 664 sys sys 1063854713 3462
+sys/src/cmd/upas/ml/ml.c - 664 sys sys 1177589086 3465
 sys/src/cmd/upas/ml/mlmgr.c - 664 sys sys 1045505888 2332
-sys/src/cmd/upas/ml/mlowner.c - 664 sys sys 1015096763 1142
+sys/src/cmd/upas/ml/mlowner.c - 664 sys sys 1177589086 1143
 sys/src/cmd/upas/ned - 20000000775 sys sys 1062073146 0
 sys/src/cmd/upas/ned/mkfile - 664 sys sys 1060041738 233
 sys/src/cmd/upas/ned/nedmail.c - 664 sys sys 1143759341 44533

+ 24 - 0
dist/replica/plan9.log

@@ -48483,3 +48483,27 @@
 1177542005 1 c sys/src/cmd/ip/ipconfig/main.c - 664 sys sys 1177541727 37984
 1177558206 0 c 386/bin/acme - 775 sys sys 1177557986 432228
 1177558206 1 c 386/bin/ip/ipconfig - 775 sys sys 1177557987 158902
+1177590606 0 c sys/src/cmd/aquarela/smbcomopen.c - 664 sys sys 1177589922 20789
+1177590606 1 c sys/src/cmd/aquarela/smbcomwrite.c - 664 sys sys 1177589923 5630
+1177590606 2 c sys/src/cmd/aquarela/smbfns.h - 664 sys sys 1177589923 12366
+1177590606 3 c sys/src/cmd/aquarela/smblog.c - 664 sys sys 1177589924 2029
+1177590606 4 c sys/src/cmd/aquarela/smboptable.c - 664 sys sys 1177589924 5871
+1177590606 5 c sys/src/cmd/aquarela/smbtrans2query.c - 664 sys sys 1177589924 10191
+1177590606 6 c sys/src/cmd/aquarela/smbtrans2set.c - 664 sys sys 1177589925 5289
+1177590606 7 c sys/src/cmd/ql/asm.c - 664 sys sys 1177590112 14961
+1177590606 8 c sys/src/cmd/upas/ml/common.c - 664 sys sys 1177589087 3379
+1177590606 9 c sys/src/cmd/upas/ml/ml.c - 664 sys sys 1177589086 3465
+1177590606 10 c sys/src/cmd/upas/ml/mlowner.c - 664 sys sys 1177589086 1143
+1177617606 0 c 386/bin/aquarela - 775 sys sys 1177617494 339018
+1177617606 1 c 386/bin/cifscmd - 775 sys sys 1177617495 349848
+1177617606 2 c 386/bin/upas/ml - 775 sys sys 1177617496 124309
+1177617606 3 c 386/bin/upas/mlmgr - 775 sys sys 1177617496 104932
+1177617606 4 c 386/bin/upas/mlowner - 775 sys sys 1177617496 92263
+1177628406 0 a cfg - 20000000775 sys sys 1177628278 0
+1177628406 1 a cfg/example - 20000000775 sys sys 1177628283 0
+1177628406 2 a cfg/example/termrc - 664 sys sys 1177628287 10
+1177628406 3 c rc/bin/termrc - 775 sys sys 1177628201 1905
+1177628406 4 c dist/replica/plan9.proto - 664 sys sys 1177628403 2840
+1177630205 0 c cfg/example/termrc - 775 sys sys 1177628544 195
+1177630205 1 m cfg/example/termrc - 775 sys sys 1177628544 195
+1177630205 2 c rc/bin/termrc - 775 sys sys 1177629021 2240

+ 2 - 0
dist/replica/plan9.proto

@@ -53,6 +53,8 @@ sparc64	- sys sys
 # everything else is owned by sys
 acme	- sys sys
 	+	- sys sys
+cfg	- sys sys
+	+	- sys sys
 cron	d777 sys sys
 	upas	- upas sys
 		+	- upas sys

+ 41 - 28
rc/bin/termrc

@@ -3,44 +3,63 @@
 TIMESYNCARGS=(-rLa1000000)
 NDBFILE=/lib/ndb/local
 
+mntgen -s slashn && chmod 666 /srv/slashn
+
+# bind all likely devices (#S was bound in boot)
+for(i in f t m v L P U '$' Σ κ)
+	/bin/bind -a '#'^$i /dev >/dev/null >[2=1]
+
+# set up any partitions
+diskparts
+
+# start up local swapping
+disk=`{ls /dev/sd*/swap >[2]/dev/null}
+if (! ~ $#disk 0)
+	swap $disk(1) >/dev/null >[2=1]
+rm /env/disk
+
 if(test -e /rc/bin/termrc.local)
 	. /rc/bin/termrc.local
 
-mntgen -s slashn && chmod 666 /srv/slashn
-
-# cs sets sysname
-ndb/cs -f $NDBFILE
+# cs sets sysname (termrc.local may already have started it so check)
+if(! test -e /srv/cs)
+	ndb/cs -f $NDBFILE
 sysname=`{cat /dev/sysname}
 
-# start IP on the LAN.  It's commented out to avoid a long timeout
+# machine specific startup (e.g., for devices not probed)
+if(test -e /cfg/$sysname/termrc)
+	. /cfg/$sysname/termrc
+
+# start IP on the LAN, if not already configured.  diskless terminals
+# are already configured by now.  It's commented out to avoid a long timeout
 # on startup waiting for DHCP.
 #
-# If your system has DHCP
+# If your site provides DHCP service,
 #
 #if(! test -e /net/ipifc/0/ctl)
-#	ip/ipconfig >/dev/null >[2=1]
-#
-# Otherwise use
+#	ip/ipconfig
 #
-#if(! test -e /net/ipifc/0/ctl)
-#	ip/ipconfig -g your-gateway ether /net/ether0 your-ip-address your-subnet-mask >/dev/null >[2=1]
+# Otherwise, see /cfg/$sysname/termrc (/cfg/example/termrc is an example).
 
-if(test -e /net/ipifc/0/ctl)
-	ndb/dns -rf $NDBFILE
+# start dns if we have an internet
+if(test -e /net/ipifc/0/ctl && ! test -e /srv/dns)
+	ndb/dns -r
 
+# start timesync if it isn't running and we weren't told not to
 if(! ps|grep -s timesync)
-	aux/timesync $TIMESYNCARGS
-
-# bind all likely devices (#S was bound in boot)
-for(i in f t m v L P U '$' Σ κ)
-	/bin/bind -a '#'^$i /dev >/dev/null >[2=1]
-
-diskparts
+	if(! ~ $TIMESYNCARGS '')
+		aux/timesync $TIMESYNCARGS
 
-# watch this space
+# add the loop-back device
+if(grep -s loopback /dev/drivers)
+	ip/ipconfig loopback /dev/null 127.1
 
+# set things up for vmware
 if(! ~ `{cat /dev/user} none)
-	aux/vmware
+	if(test -e /bin/aux/vmware)
+		aux/vmware
+
+# query user if terminal isn't adequately configured yet
 if(~ $mouseport ask){
 	echo -n 'mouseport is (ps2, ps2intellimouse, 0, 1, 2)[ps2]: '
 	mouseport=`{read}
@@ -71,9 +90,3 @@ if(test -f /dev/mousectl){
 			pipefile -dr /bin/aux/accupoint /dev/mouse
 	}
 }
-
-# start up local swapping
-disk=`{ls /dev/sd*/swap >[2]/dev/null}
-if (! ~ $#disk 0)
-	swap $disk(1) >/dev/null >[2=1]
-rm /env/disk

+ 99 - 5
sys/src/cmd/aquarela/smbcomopen.c

@@ -29,10 +29,12 @@ openfile(SmbSession *s, SmbTree *t, char *path, ushort mode, ushort attr, ushort
 	char *fullpath = nil;
 	int diropen = 0;
 
+//smblogprint(-1, "%s A %r", path);
 	p9mode = (mode >> SMB_OPEN_MODE_ACCESS_SHIFT) & SMB_OPEN_MODE_ACCESS_MASK;	
 	share = (mode >> SMB_OPEN_MODE_SHARE_SHIFT) & SMB_OPEN_MODE_SHARE_MASK;	
 	if (share == SMB_OPEN_MODE_SHARE_COMPATIBILITY) {
 	badshare:
+//smblogprint(-1, "%s SMB_OPEN_MODE_SHARE_COMPATIBILITY", path);
 		smbseterror(s, ERRDOS, ERRbadshare);
 		goto done;
 	}
@@ -114,6 +116,7 @@ openfile(SmbSession *s, SmbTree *t, char *path, ushort mode, ushort attr, ushort
 			}
 		}
 	}
+//smblogprint(-1, "%s D %r", fullpath);
 	if (!diropen && fd < 0) {
 		smbseterror(s, ERRSRV, ERRaccess);
 		goto done;
@@ -136,6 +139,7 @@ openfile(SmbSession *s, SmbTree *t, char *path, ushort mode, ushort attr, ushort
 	if (s->fidmap == nil)
 		s->fidmap = smbidmapnew();
 	*fidp = smbidmapadd(s->fidmap, f);
+//smblogprint(h->command, "REPLY:\n t->id=0x%ux fid=%d path=%s\n", t->id, *fidp, path);
 	smblogprintif(smbglobals.log.fids, "openfile: 0x%.4ux/0x%.4ux %s\n", t->id, *fidp, path);
 	if (actionp)
 		*actionp = action;
@@ -354,6 +358,82 @@ done:
 	return pr;
 }
 
+
+/*
+   smb_com      SMBcreate       smb_com      SMBcreate
+   smb_wct      3               smb_wct      1
+   smb_vwv[0]   attribute       smb_vwv[0]   file handle
+   smb_vwv[1]   time low        smb_bcc      0
+   smb_vwv[2]   time high
+   smb_bcc      min = 2
+   smb_buf[]    ASCII -- 04
+                file pathname
+*/
+
+SmbProcessResult
+smbcomcreate(SmbSession *s, SmbHeader *h, uchar *pdata, SmbBuffer *b)
+{
+	int ofun, attr, mode;
+	long createtime;
+	char *path;
+	uchar fmt;
+	SmbFile *f;
+	SmbTree *t;
+	ushort fid;
+	SmbProcessResult pr;
+
+	path = nil;
+	if (!smbcheckwordcount("comcreate", h, 3))
+		return SmbProcessResultFormat;
+
+	smblogprint(h->command, "tid=%d\n", h->tid);
+	attr = smbnhgets(pdata); pdata += 2;
+	createtime = smbnhgetl(pdata);
+	if (!smbbuffergetb(b, &fmt) || fmt != 0x04 || 
+	    !smbbuffergetstring(b, h, SMB_STRING_PATH, &path)){
+		pr = SmbProcessResultError;
+		goto done;
+	}
+
+	smbloglock();
+	smblogprint(h->command, "path %s\n", path);
+	smblogprint(h->command, "attr 0x%.4ux", attr);
+	smblogprintattr(h->command, attr);
+	smblogprint(h->command, "\n");
+	smblogprint(h->command, "createtime 0x%.8lux\n", createtime);
+	smblogunlock();
+
+	t = smbidmapfind(s->tidmap, h->tid);
+	if (t == nil) {
+		pr = SmbProcessResultError;
+		goto done;
+	}
+
+	mode = (ORDWR<<SMB_OPEN_MODE_ACCESS_SHIFT) | // SFS: FIXME: should be OWRITE?
+		(SMB_OPEN_MODE_SHARE_EXCLUSIVE<<SMB_OPEN_MODE_SHARE_SHIFT);
+	ofun = SMB_OFUN_NOEXIST_CREATE|(SMB_OFUN_EXIST_FAIL<<SMB_OFUN_EXIST_SHIFT);
+	f = openfile(s, t, path, mode, attr, ofun, SMB_CO_FILE, 0, &fid, nil, nil);
+	if (f == nil) {
+		pr = SmbProcessResultError;
+		goto done;
+	}
+
+	h->wordcount = 1;		// SFS: FIXME: unsure of this constant, maybe should be 3
+	if (!smbbufferputheader(s->response, h, &s->peerinfo)
+		|| !smbbufferputs(s->response, fid)
+		|| !smbbufferputs(s->response, 0)){	// bytecount 0
+		pr = SmbProcessResultMisc;
+		goto done;
+	}
+	pr = SmbProcessResultReply;
+	goto done;
+
+done:
+	free(path);
+	return pr;
+}
+
+
 typedef struct SmbSblut {
 	char *s;
 	ulong mask;
@@ -513,11 +593,25 @@ smbcomntcreateandx(SmbSession *s, SmbHeader *h, uchar *pdata, SmbBuffer *b)
 		goto unimp;
 	}
 
-	if (desiredaccess & SMB_DA_GENERIC_MASK) {
-		smblogprint(-1, "smbcomntcreateandx: generic bits in desiredaccess not implemented\n");
-		goto unimp;
-	}
-
+	if (desiredaccess & SMB_DA_GENERIC_MASK)
+		switch (desiredaccess & SMB_DA_GENERIC_MASK){
+		case SMB_DA_GENERIC_READ_ACCESS:
+			p9mode = OREAD;
+			break;
+		case SMB_DA_GENERIC_WRITE_ACCESS:
+			p9mode = OWRITE;
+			break;
+		case SMB_DA_GENERIC_ALL_ACCESS:
+			p9mode = ORDWR;
+			break;
+		case SMB_DA_GENERIC_EXECUTE_ACCESS:
+			p9mode = OEXEC;
+			break;
+		default:
+			p9mode = OREAD;
+			break;
+		}
+	else
 	if (desiredaccess & SMB_DA_SPECIFIC_READ_DATA)
 		if (desiredaccess & (SMB_DA_SPECIFIC_WRITE_DATA | SMB_DA_SPECIFIC_APPEND_DATA))
 			p9mode = ORDWR;

+ 76 - 0
sys/src/cmd/aquarela/smbcomwrite.c

@@ -153,3 +153,79 @@ smbcomwrite(SmbSession *s, SmbHeader *h, uchar *pdata, SmbBuffer *b)
 		return SmbProcessResultMisc;
 	return SmbProcessResultReply;
 }
+
+SmbProcessResult
+smbcomwriteandx(SmbSession *s, SmbHeader *h, uchar *pdata, SmbBuffer *b)
+{
+	uchar andxcommand;
+	ushort andxoffset;
+	ulong andxoffsetfixup;
+	SmbTree *t;
+	SmbFile *f;
+	ushort dataoff, fid, count;
+	ulong offset;
+	long nb;
+
+	if (h->wordcount != 12 && h->wordcount != 14)
+		return SmbProcessResultFormat;
+
+	andxcommand = *pdata++;				// andx command
+	pdata++;					// reserved 
+	andxoffset = smbnhgets(pdata); pdata += 2;	// andx offset
+	fid = smbnhgets(pdata); pdata += 2;		// fid
+	offset = smbnhgetl(pdata); pdata += 4;		// offset in file
+	pdata += 4;					// reserved
+	pdata += 2;					// write mode
+	pdata += 2;					// bytes waiting to be written
+	count = ((long)smbnhgets(pdata) << 16); pdata += 2; // MSBs of length or zero 
+	count |= smbnhgets(pdata); pdata += 2;		// LSBs of length
+	dataoff = smbnhgets(pdata); pdata += 2;		// offset to data in packet
+	if (h->wordcount != 14)
+		offset = ((long)smbnhgets(pdata) << 16); pdata += 2; // MSBs of offset in file, if long pkt 
+	pdata += 4;					// data bytes to write (including those not sent yet)
+
+	USED(pdata);
+
+	smblogprint(SMB_COM_WRITE_ANDX, "smbcomwriteandx: fid 0x%.4ux count 0x%.4ux offset 0x%.8lux\n",
+		fid, count, offset);
+
+	t = smbidmapfind(s->tidmap, h->tid);
+	if (t == nil) {
+		smbseterror(s, ERRSRV, ERRinvtid);
+		return SmbProcessResultError;
+	}
+	f = smbidmapfind(s->fidmap, fid);
+	if (f == nil) {
+		smbseterror(s, ERRDOS, ERRbadfid);
+		return SmbProcessResultError;
+	}
+
+	if (!f->ioallowed) {
+		smbseterror(s, ERRDOS, ERRbadaccess);
+		return SmbProcessResultError;
+	}
+
+	seek(f->fd, offset, 0);
+	nb = write(f->fd, smbbufferpointer(b, dataoff), count);
+	if (nb < 0) {
+		smbseterror(s, ERRDOS, ERRnoaccess);
+		return SmbProcessResultError;
+	}
+
+	h->wordcount = 6;
+	if (!smbbufferputandxheader(s->response, h, &s->peerinfo, andxcommand, &andxoffsetfixup))
+		return SmbProcessResultMisc;
+
+	if (!smbbufferputs(s->response, nb)			// count
+		|| !smbbufferputs(s->response, 0)		// datacompactionmode
+		|| !smbbufferputs(s->response, 0)		// remaining
+		|| !smbbufferputl(s->response, 0)		// reserved
+		|| !smbbufferputs(s->response, 0))		// byte count in reply
+		return SmbProcessResultMisc;
+
+
+	if (andxcommand != SMB_COM_NO_ANDX_COMMAND)
+		return smbchaincommand(s, h, andxoffsetfixup, andxcommand, andxoffset, b);
+
+	return SmbProcessResultReply;
+}

+ 4 - 0
sys/src/cmd/aquarela/smbfns.h

@@ -13,9 +13,11 @@ SMBPROCESSFN smbcomcheckdirectory;
 SMBPROCESSFN smbcomtransaction2;
 SMBPROCESSFN smbcomecho;
 SMBPROCESSFN smbcomopenandx;
+SMBPROCESSFN smbcomcreate;
 SMBPROCESSFN smbcomopen;
 SMBPROCESSFN smbcomclose;
 SMBPROCESSFN smbcomreadandx;
+SMBPROCESSFN smbcomwriteandx;
 SMBPROCESSFN smbcomqueryinformation;
 SMBPROCESSFN smbcomfindclose2;
 SMBPROCESSFN smbcomtreedisconnect;
@@ -173,6 +175,7 @@ SmbProcessResult smbtrans2queryfileinformation(SmbSession *s, SmbHeader *h);
 SmbProcessResult smbtrans2queryfsinformation(SmbSession *s, SmbHeader *h);
 SmbProcessResult smbtrans2querypathinformation(SmbSession *s, SmbHeader *h);
 SmbProcessResult smbtrans2setfileinformation(SmbSession *s, SmbHeader *h);
+SmbProcessResult smbtrans2setpathinformation(SmbSession *s, SmbHeader *h);
 
 SmbIdMap *smbidmapnew(void);
 long smbidmapadd(SmbIdMap *m, void *p);
@@ -209,6 +212,7 @@ void smbfileclose(SmbSession *s, SmbFile *f);
 void smbloglock(void);
 void smblogunlock(void);
 int smblogvprint(int cmd, char *fmt, va_list ap);
+int translogprint(int cmd, char *fmt, ...);
 int smblogprint(int cmd, char *fmt, ...);
 int smblogprintif(int v, char *fmt, ...);
 void smblogdata(int cmd, int (*print)(int cmd, char *fmt, ...), void *p, long data, long limit);

+ 12 - 0
sys/src/cmd/aquarela/smblog.c

@@ -44,6 +44,18 @@ smblogvprint(int cmd, char *fmt, va_list ap)
 
 int
 smblogprint(int cmd, char *fmt, ...)
+{
+	if (cmd < 0 || smbtrans2optable[cmd].debug) {
+		va_list ap;
+		va_start(ap, fmt);
+		smblogvprint(cmd, fmt, ap);
+		va_end(ap);
+	}
+	return 0;
+}
+
+int
+translogprint(int cmd, char *fmt, ...)
 {
 	if (cmd < 0 || smboptable[cmd].debug) {
 		va_list ap;

+ 3 - 3
sys/src/cmd/aquarela/smboptable.c

@@ -4,7 +4,7 @@ SmbOpTableEntry smboptable[256] = {
 [SMB_COM_CREATE_DIRECTORY] { "SMB_COM_CREATE_DIRECTORY", smbcomcreatedirectory },
 [SMB_COM_DELETE_DIRECTORY] { "SMB_COM_DELETE_DIRECTORY", smbcomdeletedirectory },
 [SMB_COM_OPEN] { "SMB_COM_OPEN", smbcomopen },
-[SMB_COM_CREATE] { "SMB_COM_CREATE", nil },
+[SMB_COM_CREATE] { "SMB_COM_CREATE", smbcomcreate },
 [SMB_COM_CLOSE] { "SMB_COM_CLOSE", smbcomclose },
 [SMB_COM_FLUSH] { "SMB_COM_FLUSH", smbcomflush },
 [SMB_COM_DELETE] { "SMB_COM_DELETE", smbcomdelete },
@@ -43,7 +43,7 @@ SmbOpTableEntry smboptable[256] = {
 [SMB_COM_WRITE_AND_CLOSE] { "SMB_COM_WRITE_AND_CLOSE", nil },
 [SMB_COM_OPEN_ANDX] { "SMB_COM_OPEN_ANDX", smbcomopenandx },
 [SMB_COM_READ_ANDX] { "SMB_COM_READ_ANDX", smbcomreadandx },
-[SMB_COM_WRITE_ANDX] { "SMB_COM_WRITE_ANDX", nil },
+[SMB_COM_WRITE_ANDX] { "SMB_COM_WRITE_ANDX", smbcomwriteandx },
 [SMB_COM_NEW_FILE_SIZE] { "SMB_COM_NEW_FILE_SIZE", nil },
 [SMB_COM_CLOSE_AND_TREE_DISC] { "SMB_COM_CLOSE_AND_TREE_DISC", nil },
 [SMB_COM_TRANSACTION2] { "SMB_COM_TRANSACTION2", smbcomtransaction2 },
@@ -83,7 +83,7 @@ smbtrans2optable[] = {
 [SMB_TRANS2_QUERY_FS_INFORMATION] { "SMB_TRANS2_QUERY_FS_INFORMATION", smbtrans2queryfsinformation },
 [SMB_TRANS2_SET_FS_INFORMATION] { "SMB_TRANS2_SET_FS_INFORMATION", nil },
 [SMB_TRANS2_QUERY_PATH_INFORMATION] { "SMB_TRANS2_QUERY_PATH_INFORMATION", smbtrans2querypathinformation },
-[SMB_TRANS2_SET_PATH_INFORMATION] { "SMB_TRANS2_SET_PATH_INFORMATION", nil },
+[SMB_TRANS2_SET_PATH_INFORMATION] { "SMB_TRANS2_SET_PATH_INFORMATION", smbtrans2setpathinformation },
 [SMB_TRANS2_QUERY_FILE_INFORMATION] { "SMB_TRANS2_QUERY_FILE_INFORMATION", smbtrans2queryfileinformation },
 [SMB_TRANS2_SET_FILE_INFORMATION] { "SMB_TRANS2_SET_FILE_INFORMATION", smbtrans2setfileinformation },
 [SMB_TRANS2_FSCTL] { "SMB_TRANS2_FSCTL", nil },

+ 39 - 9
sys/src/cmd/aquarela/smbtrans2query.c

@@ -18,6 +18,13 @@ query(SmbSession *s, char *cmdname, char *filename, ushort infolevel, vlong cbo,
 		ntatime = smbplan9time2time(d->atime);
 		ntmtime = smbplan9time2time(d->mtime);
 		dosmode = smbplan9mode2dosattr(d->mode);
+
+		translogprint(s->transaction.in.setup[0], "SMB_QUERY_FILE_BASIC_INFO\n");
+		translogprint(s->transaction.in.setup[0], "REPLY:\n");
+		translogprint(s->transaction.in.setup[0], "atime=%s", ctime(d->atime));
+		translogprint(s->transaction.in.setup[0], "atime=%s", ctime(d->mtime));
+		translogprint(s->transaction.in.setup[0], "mode=0%o -> dosmode=0x%x\n", d->mode, dosmode);
+
 		if (!smbbufferputv(s->transaction.out.data, ntmtime)
 			|| !smbbufferputv(s->transaction.out.data, ntatime)
 			|| !smbbufferputv(s->transaction.out.data, ntmtime)
@@ -31,6 +38,15 @@ query(SmbSession *s, char *cmdname, char *filename, ushort infolevel, vlong cbo,
 		ntmtime = smbplan9time2time(d->mtime);
 		dosmode = smbplan9mode2dosattr(d->mode);
 		allocsize = (d->length + (1 << smbglobals.l2allocationsize) - 1) & ~((1 << smbglobals.l2allocationsize) - 1);
+
+		translogprint(s->transaction.in.setup[0], "SMB_QUERY_FILE_ALL_INFO\n");
+		translogprint(s->transaction.in.setup[0], "REPLY:\n");
+		translogprint(s->transaction.in.setup[0], "atime=%s", ctime(d->atime));
+		translogprint(s->transaction.in.setup[0], "atime=%s", ctime(d->mtime));
+		translogprint(s->transaction.in.setup[0], "mode=0%o -> dosmode=0x%x\n", d->mode, dosmode);
+		translogprint(s->transaction.in.setup[0], "allocsize=%d\n", allocsize);
+		translogprint(s->transaction.in.setup[0], "isdir=%d\n", (d->mode & DMDIR) != 0);
+
 		if (!smbbufferputv(s->transaction.out.data, ntmtime)
 			|| !smbbufferputv(s->transaction.out.data, ntatime)
 			|| !smbbufferputv(s->transaction.out.data, ntmtime)
@@ -51,11 +67,16 @@ query(SmbSession *s, char *cmdname, char *filename, ushort infolevel, vlong cbo,
 			return SmbProcessResultMisc;
 		fnlfixupoffset = smbbufferwriteoffset(s->transaction.out.data);
 		if (!smbbufferputl(s->transaction.out.data, 0)
-		|| !smbbufferputstring(s->transaction.out.data, &s->peerinfo, SMB_STRING_REVPATH, filename)
-		|| !smbbufferfixuprelativel(s->transaction.out.data, fnlfixupoffset))
+		    || !smbbufferputstring(s->transaction.out.data, &s->peerinfo, SMB_STRING_REVPATH, filename)
+		    || !smbbufferfixuprelativel(s->transaction.out.data, fnlfixupoffset))
 			return SmbProcessResultMisc;
 		break;
 	case SMB_QUERY_FILE_STANDARD_INFO:
+		translogprint(s->transaction.in.setup[0], "SMB_QUERY_FILE_STANDARD_INFO\n");
+		translogprint(s->transaction.in.setup[0], "REPLY:\n");
+		translogprint(s->transaction.in.setup[0], "length=%lld", d->length);
+		translogprint(s->transaction.in.setup[0], "isdir=%d\n", (d->qid.type & QTDIR) != 0);
+
 		if (!smbbufferputv(s->transaction.out.data, smbl2roundupvlong(d->length, smbglobals.l2allocationsize))
 			|| !smbbufferputv(s->transaction.out.data, d->length)
 			|| !smbbufferputl(s->transaction.out.data, 1)
@@ -64,15 +85,21 @@ query(SmbSession *s, char *cmdname, char *filename, ushort infolevel, vlong cbo,
 			return SmbProcessResultMisc;
 		break;
 	case SMB_QUERY_FILE_EA_INFO:
+		translogprint(s->transaction.in.setup[0], "SMB_QUERY_FILE_EA_INFO\n");
+		translogprint(s->transaction.in.setup[0], "REPLY:\n");
+		translogprint(s->transaction.in.setup[0], "ea_len=0\n");
 		if (!smbbufferputl(s->transaction.out.data, 0))
 			return SmbProcessResultMisc;
 		break;
 	case SMB_QUERY_FILE_STREAM_INFO:
+		translogprint(s->transaction.in.setup[0], "SMB_QUERY_FILE_STREAM_INFO\n");
+		translogprint(s->transaction.in.setup[0], "REPLY: failed\n");
 		/* don't do it, never will */
 		goto unknownlevel;
 	default:
 		smblogprint(-1, "smbtrans2query%sinformation: infolevel 0x%.4ux not implemented\n", cmdname, infolevel);
 	unknownlevel:
+		translogprint(s->transaction.in.setup[0], "[not supported]\n");
 		smbseterror(s, ERRDOS, ERRunknownlevel);
 		return SmbProcessResultError;
 	}
@@ -102,11 +129,11 @@ smbtrans2querypathinformation(SmbSession *s, SmbHeader *h)
 		pr = SmbProcessResultMisc;
 		goto done;
 	}
-	smblogprintif(smbglobals.log.query, "infolevel 0x%.4ux\n", infolevel);
-	smblogprintif(smbglobals.log.query, "path %s\n", path);
+	translogprint(s->transaction.in.setup[0], "infolevel 0x%.4ux\n", infolevel);
+	translogprint(s->transaction.in.setup[0], "path %s\n", path);
 	fullpath = nil;
 	smbstringprint(&fullpath, "%s%s", t->serv->path, path);
-	smblogprintif(smbglobals.log.query, "fullpath %s\n", fullpath);
+	translogprint(s->transaction.in.setup[0], "fullpath %s\n", fullpath);
 	d = dirstat(fullpath);
 	pr = query(s, "path", path, infolevel, 0, d);
 	free(d);
@@ -139,8 +166,8 @@ smbtrans2queryfileinformation(SmbSession *s, SmbHeader *h)
 		pr = SmbProcessResultMisc;
 		goto done;
 	}
-	smblogprintif(smbglobals.log.query, "fid 0x%.4ux\n", fid);
-	smblogprintif(smbglobals.log.query, "infolevel 0x%.4ux\n", infolevel);
+	translogprint(s->transaction.in.setup[0], "fid 0x%.4ux\n", fid);
+	translogprint(s->transaction.in.setup[0], "infolevel 0x%.4ux\n", infolevel);
 	f = smbidmapfind(s->fidmap, fid);
 	if (f == nil) {
 		smbseterror(s, ERRDOS, ERRbadfid);
@@ -180,6 +207,7 @@ smbtrans2queryfsinformation(SmbSession *s, SmbHeader *h)
 	pr = SmbProcessResultReply;
 	switch (infolevel) {
 	case SMB_INFO_ALLOCATION:
+		translogprint(s->transaction.in.setup[0], "SMB_INFO_ALLOCATION\n");
 		if (!smbbufferputl(s->transaction.out.data, 0)
 			|| !smbbufferputl(s->transaction.out.data, 1 << (smbglobals.l2allocationsize - smbglobals.l2sectorsize))
 			|| !smbbufferputl(s->transaction.out.data, 0xffffffff)
@@ -188,11 +216,13 @@ smbtrans2queryfsinformation(SmbSession *s, SmbHeader *h)
 			goto misc;
 		break;
 	case SMB_INFO_VOLUME:
+		translogprint(s->transaction.in.setup[0], "SMB_INFO_VOLUME\n");
 		if (!smbbufferputl(s->transaction.out.data, 0xdeadbeef)
 			|| !smbbufferputstring(s->transaction.out.data, &s->peerinfo, 0, t->serv->name))
 			goto misc;
 		break;
 	case SMB_QUERY_FS_VOLUME_INFO:
+		translogprint(s->transaction.in.setup[0], "SMB_QUERY_FS_VOLUME_INFO\n");
 		if (!smbbufferputv(s->transaction.out.data, 0)
 			|| !smbbufferputl(s->transaction.out.data, 0xdeadbeef))
 			goto misc;
@@ -207,6 +237,7 @@ smbtrans2queryfsinformation(SmbSession *s, SmbHeader *h)
 			goto misc;
 		break;
 	case SMB_QUERY_FS_SIZE_INFO:
+		translogprint(s->transaction.in.setup[0], "SMB_QUERY_FS_SIZE_INFO\n");
 		if (!smbbufferputv(s->transaction.out.data, 0xffffffffffffffffLL)
 			|| !smbbufferputv(s->transaction.out.data, 0xffffffffffffffffLL)
 			|| !smbbufferputl(s->transaction.out.data, 1 << (smbglobals.l2allocationsize - smbglobals.l2sectorsize))
@@ -214,7 +245,7 @@ smbtrans2queryfsinformation(SmbSession *s, SmbHeader *h)
 			goto misc;
 		break;
 	case SMB_QUERY_FS_ATTRIBUTE_INFO:
-//print("doing attribute info\n");
+		translogprint(s->transaction.in.setup[0], "SMB_QUERY_FS_ATTRIBUTE_INFO\n");
 		if (!smbbufferputl(s->transaction.out.data, 3)
 			|| !smbbufferputl(s->transaction.out.data, 255))
 			goto misc;
@@ -223,7 +254,6 @@ smbtrans2queryfsinformation(SmbSession *s, SmbHeader *h)
 			|| !smbbufferputstring(s->transaction.out.data, &s->peerinfo, SMB_STRING_UNTERMINATED, smbglobals.serverinfo.nativelanman)
 			|| !smbbufferfixuprelativel(s->transaction.out.data, fixup))
 			goto misc;
-//print("done attribute info\n");
 		break;
 	default:
 		smblogprint(-1, "smbtrans2queryfsinformation: infolevel 0x%.4ux not implemented\n", infolevel);

+ 99 - 0
sys/src/cmd/aquarela/smbtrans2set.c

@@ -100,3 +100,102 @@ done:
 	smbbufferfree(&b);
 	return pr;
 }
+
+SmbProcessResult
+smbtrans2setpathinformation(SmbSession *s, SmbHeader *h)
+{
+	char *fullpath, *path;
+	SmbTree *t;
+	ushort infolevel;
+	SmbBuffer *b;
+	SmbProcessResult pr;
+	ushort atime, adate, mtime, mdate;
+	ulong attr;
+	ulong mode;
+	ulong size;
+	uvlong length;
+
+	t = smbidmapfind(s->tidmap, h->tid);
+	if (t == nil) {
+		smbseterror(s, ERRSRV, ERRinvtid);
+		pr = SmbProcessResultError;
+		goto done;
+	}
+	b = smbbufferinit(s->transaction.in.parameters, s->transaction.in.parameters, s->transaction.in.tpcount);
+	path = nil;
+	if (!smbbuffergets(b, &infolevel) || !smbbuffergetbytes(b, nil, 4)
+		|| !smbbuffergetstring(b, h, SMB_STRING_PATH, &path)) {
+	misc:
+		pr = SmbProcessResultMisc;
+		goto done;
+	}
+
+	fullpath = nil;
+	smbstringprint(&fullpath, "%s%s", t->serv->path, path);
+
+	translogprint(s->transaction.in.setup[0], "path %s\n", path);
+	translogprint(s->transaction.in.setup[0], "infolevel 0x%.4ux\n", infolevel);
+	translogprint(s->transaction.in.setup[0], "fullpath %s\n", fullpath);
+
+	switch (infolevel) {
+	case SMB_INFO_STANDARD:
+		if (s->transaction.in.tdcount < 6 * 4 + 2 * 2)
+			goto misc;
+		adate = smbnhgets(s->transaction.in.data + 6);
+		atime = smbnhgets(s->transaction.in.data + 4);
+		mdate = smbnhgets(s->transaction.in.data + 10);
+		mtime = smbnhgets(s->transaction.in.data + 8);
+		size = smbnhgetl(s->transaction.in.data + 12);
+		attr = smbnhgets(s->transaction.in.data + 20);
+		if (attr) {
+			Dir *od = dirstat(fullpath);
+			if (od == nil)
+				goto noaccess;
+			mode = smbdosattr2plan9wstatmode(od->mode, attr);
+			free(od);
+		}
+		else
+			mode = 0xffffffff;
+		translogprint(s->transaction.in.setup[0], "mode 0%od\n", mode);
+
+		if (size)
+			length = size;
+		else
+			length = ~0LL;
+	
+		translogprint(s->transaction.in.setup[0], "size %lld\n", size);
+		translogprint(s->transaction.in.setup[0], "adate %d atime %d", adate, atime);
+		translogprint(s->transaction.in.setup[0], "mdate %d mtime %d\n", mdate, mtime);
+
+		if (size || adate || atime || mdate || mtime || mode != 0xffffffff) {
+			Dir d;
+			memset(&d, 0xff, sizeof(d));
+			d.name = d.uid = d.gid = d.muid = nil;
+			if (adate || atime)
+				d.atime = smbdatetime2plan9time(adate, atime, s->tzoff);
+			if (mdate || mtime)
+				d.mtime = smbdatetime2plan9time(mdate, mtime, s->tzoff);
+			d.mode = mode;
+			d.length = size;
+			if (dirwstat(fullpath, &d) < 0) {
+			noaccess:
+				smbseterror(s, ERRDOS, ERRnoaccess);
+				pr = SmbProcessResultError;
+				goto done;
+			}
+		}
+		if (!smbbufferputs(s->transaction.out.parameters, 0))
+			goto misc;
+		pr = SmbProcessResultReply;
+		break;
+
+	default:
+		smblogprint(-1, "smbtrans2setpathinformation: infolevel 0x%.4ux not implemented\n", infolevel);
+		smbseterror(s, ERRDOS, ERRunknownlevel);
+		pr = SmbProcessResultError;
+		break;
+	}
+done:
+	smbbufferfree(&b);
+	return pr;
+}

+ 65 - 5
sys/src/cmd/ql/asm.c

@@ -299,11 +299,21 @@ asmb(void)
 		lput(1L);			/* version = CURRENT */
 		lput(entryvalue() & ~KMASK);	/* entry vaddr */
 		lput(52L);			/* offset to first phdr */
-		lput(0L);			/* offset to first shdr */
-		lput(0L);			/* flags = PPC */
-		lput((52L<<16)|32L);		/* Ehdr & Phdr sizes*/
-		lput((3L<<16)|0L);		/* # Phdrs & Shdr size */
-		lput((0L<<16)|0L);		/* # Shdrs & shdr string size */
+
+		if(debug['S']){
+			lput(HEADR+textsize+datsize+symsize);	/* offset to first shdr */
+			lput(0L);		/* flags = PPC */
+			lput((52L<<16)|32L);	/* Ehdr & Phdr sizes*/
+			lput((3L<<16)|40L);	/* # Phdrs & Shdr size */
+			lput((3L<<16)|2L);	/* # Shdrs & shdr string size */
+		}
+		else{
+			lput(0L);
+			lput(0L);		/* flags = PPC */
+			lput((52L<<16)|32L);	/* Ehdr & Phdr sizes*/
+			lput((3L<<16)|0L);	/* # Phdrs & Shdr size */
+			lput((3L<<16)|0L);	/* # Shdrs & shdr string size */
+		}
 
 		lput(1L);			/* text - type = PT_LOAD */
 		lput(HEADR);			/* file offset */
@@ -331,6 +341,56 @@ asmb(void)
 		lput(lcsize);			/* line number size */
 		lput(0x04L);			/* protections = R */
 		lput(0x04L);			/* alignment code?? */
+		cflush();
+
+		if(!debug['S'])
+			break;
+
+		seek(cout, HEADR+textsize+datsize+symsize, 0);
+		lput(1);			/* Section name (string tbl index) */
+		lput(1);			/* Section type */
+		lput(2|4);			/* Section flags */
+		lput(INITTEXT & ~KMASK);	/* Section virtual addr at execution */
+		lput(HEADR);			/* Section file offset */
+		lput(textsize);			/* Section size in bytes */
+		lput(0);			/* Link to another section */
+		lput(0);			/* Additional section information */
+		lput(0x10000L);			/* Section alignment */
+		lput(0);			/* Entry size if section holds table */
+
+		lput(7);			/* Section name (string tbl index) */
+		lput(1);			/* Section type */
+		lput(2|1);			/* Section flags */
+		lput(INITDAT & ~KMASK);		/* Section virtual addr at execution */
+		lput(HEADR+textsize);		/* Section file offset */
+		lput(datsize);			/* Section size in bytes */
+		lput(0);			/* Link to another section */
+		lput(0);			/* Additional section information */
+		lput(0x10000L);			/* Section alignment */
+		lput(0);			/* Entry size if section holds table */
+
+		/* string section header */
+		lput(12);			/* Section name (string tbl index) */
+		lput(3);			/* Section type */
+		lput(1 << 5);			/* Section flags */
+		lput(0);			/* Section virtual addr at execution */
+		lput(HEADR+textsize+datsize+symsize+3*40);	/* Section file offset */
+		lput(14);			/* Section size in bytes */
+		lput(0);			/* Link to another section */
+		lput(0);			/* Additional section information */
+		lput(1);			/* Section alignment */
+		lput(0);			/* Entry size if section holds table */
+
+		/* string table */
+		cput(0);
+		strnput(".text", 5);
+		cput(0);
+		strnput(".data", 5);
+		cput(0);
+		strnput(".strtab", 7);
+		cput(0);
+		cput(0);
+
 		break;
 	}
 	cflush();

+ 2 - 2
sys/src/cmd/upas/ml/common.c

@@ -11,7 +11,7 @@ getaddr(Node *p)
 	return nil;
 }
 
-/* send messae adding our own reply-to and precedence */
+/* send message adding our own reply-to and precedence */
 void
 getaddrs(void)
 {
@@ -177,7 +177,7 @@ sendnotification(char *addr, char *listname, int rem)
 		close(pfd[0]);
 		fprint(pfd[1], "From: %s-owner\n\n", listname);
 		if(rem)
-			fprint(pfd[1], "You have removed from the %s mailing list\n", listname);
+			fprint(pfd[1], "You have been removed from the %s mailing list\n", listname);
 		else{
 			fprint(pfd[1], "You have been added to the %s mailing list\n", listname);
 			fprint(pfd[1], "To be removed, send an email to %s-owner containing\n",

+ 3 - 3
sys/src/cmd/upas/ml/ml.c

@@ -56,7 +56,7 @@ main(int argc, char **argv)
 	if(s_read_line(&in, firstline) == nil)
 		sysfatal("reading input: %r");
 
-	/* read up to the first 128k of the message.  more is redculous. 
+	/* read up to the first 128k of the message.  more is ridiculous. 
 	     Not if word documents are distributed.  Upped it to 2MB (pb) */
 	if(s_read(&in, msg, 2*1024*1024) <= 0)
 		sysfatal("reading input: %r");
@@ -89,7 +89,7 @@ main(int argc, char **argv)
 		free(w);
 	}
 
-	/* if the mailbox exits, cat the mail to the end of it */
+	/* if the mailbox exists, cat the mail to the end of it */
 	appendtoarchive(listname, firstline, msg);
 	exits(0);
 }
@@ -123,7 +123,7 @@ printmsg(int fd, String *msg, char *replyto, char *listname)
 	write(fd, cp, s_len(msg) - (cp - s_to_c(msg)));
 }
 
-/* if the mailbox exits, cat the mail to the end of it */
+/* if the mailbox exists, cat the mail to the end of it */
 void
 appendtoarchive(char* listname, String *firstline, String *msg)
 {

+ 1 - 1
sys/src/cmd/upas/ml/mlowner.c

@@ -40,7 +40,7 @@ main(int argc, char **argv)
 	if(s_read_line(&in, msg) == nil)
 		sysfatal("reading input: %r");
 
-	/* read up to the first 128k of the message.  more is redculous */
+	/* read up to the first 128k of the message.  more is ridiculous */
 	if(s_read(&in, s_restart(msg), 128*1024) <= 0)
 		sysfatal("reading input: %r");