Browse Source

Plan 9 from Bell Labs 2005-10-06

David du Colombier 15 years ago
parent
commit
eae6cf9c19

+ 34 - 18
dist/replica/_plan9.db

@@ -7257,13 +7257,13 @@ sys/man/1/comm - 664 sys sys 944959675 665
 sys/man/1/con - 664 sys sys 1071156278 4318
 sys/man/1/cp - 664 sys sys 1110816882 1947
 sys/man/1/cpp - 664 sys sys 944959674 2105
-sys/man/1/cpu - 664 sys sys 1128462781 3804
+sys/man/1/cpu - 664 sys sys 1128483118 3804
 sys/man/1/crop - 664 sys sys 984709627 2596
 sys/man/1/date - 664 sys sys 969499884 996
 sys/man/1/db - 664 sys sys 1015024738 17862
 sys/man/1/dc - 664 sys sys 1113743325 4834
 sys/man/1/dd - 664 sys sys 1055693436 3346
-sys/man/1/delkey - 664 sys sys 1109429138 779
+sys/man/1/delkey - 664 sys sys 1128483118 779
 sys/man/1/deroff - 664 sys sys 1113743324 1826
 sys/man/1/diff - 664 sys sys 1114697100 3085
 sys/man/1/doc2txt - 664 sys sys 1105020018 2077
@@ -7577,10 +7577,11 @@ sys/man/4/dossrv - 664 sys sys 1015024813 4176
 sys/man/4/execnet - 664 sys sys 1019866708 1069
 sys/man/4/exportfs - 664 sys sys 1115314261 4653
 sys/man/4/ext2srv - 664 sys sys 1055692986 2409
-sys/man/4/factotum - 664 sys sys 1119530771 14709
+sys/man/4/factotum - 664 sys sys 1128483118 14709
 sys/man/4/fossil - 664 sys sys 1112368411 9546
 sys/man/4/fs - 664 sys sys 1019058716 3387
 sys/man/4/ftpfs - 664 sys sys 1112563349 4410
+sys/man/4/httpfile - 664 sys sys 1128556957 1233
 sys/man/4/import - 664 sys sys 1115314601 3095
 sys/man/4/iostats - 664 sys sys 1105574383 1621
 sys/man/4/keyfs - 664 sys sys 1116594919 5048
@@ -7629,7 +7630,7 @@ sys/man/6/INDEX - 664 sys sys 1104736383 410
 sys/man/6/INDEX.html - 664 sys sys 1104736385 2927
 sys/man/6/a.out - 664 sys sys 1015024888 7155
 sys/man/6/ar - 664 sys sys 944959678 2092
-sys/man/6/authsrv - 664 sys sys 1035840090 10534
+sys/man/6/authsrv - 664 sys sys 1128483124 13304
 sys/man/6/color - 664 sys sys 988225304 5181
 sys/man/6/face - 664 sys sys 1062505426 2846
 sys/man/6/font - 664 sys sys 1077594184 2528
@@ -7699,7 +7700,7 @@ sys/man/8/mouse - 664 sys sys 971455511 2476
 sys/man/8/na - 664 sys sys 958527089 859
 sys/man/8/ndb - 664 sys sys 1118851681 9943
 sys/man/8/newuser - 664 sys sys 1116954242 2418
-sys/man/8/nfsserver - 664 sys sys 1017251291 3397
+sys/man/8/nfsserver - 664 sys sys 1128483119 3397
 sys/man/8/pcmcia - 664 sys sys 944959679 408
 sys/man/8/pem - 664 sys sys 1060263669 1189
 sys/man/8/ping - 664 sys sys 1084473185 3436
@@ -9382,7 +9383,7 @@ sys/src/cmd/auth/lib/wrbio.c - 664 sys sys 1015008430 755
 sys/src/cmd/auth/login.c - 664 sys sys 1121977157 3981
 sys/src/cmd/auth/mkfile - 664 sys sys 1071334970 1979
 sys/src/cmd/auth/netkey.c - 664 sys sys 1015008431 741
-sys/src/cmd/auth/newns.c - 664 sys sys 1048614962 486
+sys/src/cmd/auth/newns.c - 664 sys sys 1128540497 962
 sys/src/cmd/auth/none.c - 664 sys sys 1116769155 774
 sys/src/cmd/auth/passwd.c - 664 sys sys 1055699009 2761
 sys/src/cmd/auth/pemdecode.c - 664 sys sys 1084330528 947
@@ -11948,6 +11949,7 @@ sys/src/cmd/ip/httpd/sendfd.c - 664 sys sys 1017679317 12134
 sys/src/cmd/ip/httpd/webls.c - 664 sys sys 1120737502 7658
 sys/src/cmd/ip/httpd/webls.denied - 664 sys sys 1064887847 3
 sys/src/cmd/ip/httpd/wikipost.c - 664 sys sys 1083771074 5913
+sys/src/cmd/ip/httpfile.c - 600 sys sys 1128556975 10037
 sys/src/cmd/ip/imap4d - 20000000775 sys sys 988249981 0
 sys/src/cmd/ip/imap4d/auth.c - 664 sys sys 1015013075 3510
 sys/src/cmd/ip/imap4d/copy.c - 664 sys sys 1062298855 4597
@@ -13065,12 +13067,9 @@ sys/src/cmd/unix/9pfreebsd/mount_9fs/Makefile - 664 sys sys 960684604 412
 sys/src/cmd/unix/9pfreebsd/mount_9fs/crypt.c - 664 sys sys 960684604 18042
 sys/src/cmd/unix/9pfreebsd/mount_9fs/mount_9fs.8 - 664 sys sys 960684604 10864
 sys/src/cmd/unix/9pfreebsd/mount_9fs/mount_9fs.c - 664 sys sys 960684605 25118
-sys/src/cmd/unix/README - 664 sys sys 1110289527 746
-sys/src/cmd/unix/bootp - 20000000775 sys sys 944961309 0
-sys/src/cmd/unix/bootp/README - 664 sys sys 944961309 2986
-sys/src/cmd/unix/bootp/unix.bootp.tar - 664 sys sys 944961309 153600
+sys/src/cmd/unix/README - 664 sys sys 1128520385 1735
 sys/src/cmd/unix/drawterm - 20000000775 sys sys 964488190 0
-sys/src/cmd/unix/drawterm/README - 664 sys sys 1019847889 410
+sys/src/cmd/unix/drawterm/README - 664 sys sys 1128520449 373
 sys/src/cmd/unix/drawterm/README.MACOSX - 664 sys sys 1020578504 57
 sys/src/cmd/unix/drawterm/_asgetticket.c - 664 sys sys 954098597 285
 sys/src/cmd/unix/drawterm/_asrdfile.c - 664 sys sys 954098597 245
@@ -13250,12 +13249,6 @@ sys/src/cmd/unix/drawterm/windows.h - 664 sys sys 954098656 401
 sys/src/cmd/unix/drawterm/winscreen.c - 664 sys sys 954098657 11393
 sys/src/cmd/unix/drawterm/wstrtoutf.c - 664 sys sys 954098657 393
 sys/src/cmd/unix/netkey.c - 664 sys sys 1045152984 21761
-sys/src/cmd/unix/sam - 20000000775 sys sys 954263160 0
-sys/src/cmd/unix/sam/README - 664 sys sys 1110289373 306
-sys/src/cmd/unix/spin - 20000000775 sys sys 956275829 0
-sys/src/cmd/unix/spin/readme - 664 sys sys 1125514575 247
-sys/src/cmd/unix/spin/spin425.tar.gz - 664 sys sys 1125514573 330078
-sys/src/cmd/unix/tcs.shar.Z - 664 sys sys 944961315 312440
 sys/src/cmd/unix/u9fs - 20000000775 sys sys 1015092354 0
 sys/src/cmd/unix/u9fs/authnone.c - 664 sys sys 1015092351 321
 sys/src/cmd/unix/u9fs/authp9any.c - 664 sys sys 1094068304 11021
@@ -13921,7 +13914,7 @@ sys/src/libauth/authlocal.h - 664 sys sys 1014929317 87
 sys/src/libauth/httpauth.c - 664 sys sys 1017166331 1059
 sys/src/libauth/login.c - 664 sys sys 1014929318 264
 sys/src/libauth/mkfile - 664 sys sys 1063854014 455
-sys/src/libauth/newns.c - 664 sys sys 1076977148 6284
+sys/src/libauth/newns.c - 664 sys sys 1128540492 7226
 sys/src/libauth/noworld.c - 664 sys sys 1014929318 779
 sys/src/libauthsrv - 20000000775 sys sys 1015091654 0
 sys/src/libauthsrv/_asgetticket.c - 664 sys sys 1015091652 280
@@ -14974,3 +14967,26 @@ 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/cpu - 775 sys sys 1128568175 139098
+386/bin/exportfs - 775 sys sys 1128568175 162241
+386/bin/import - 775 sys sys 1128568175 101371
+386/bin/auth/cron - 775 sys sys 1128568172 143960
+386/bin/auth/login - 775 sys sys 1128568172 104451
+386/bin/auth/newns - 775 sys sys 1128568172 89687
+386/bin/auth/none - 775 sys sys 1128568172 89021
+386/bin/auth/warning - 775 sys sys 1128568173 100637
+386/bin/aux/listen - 775 sys sys 1128568173 107968
+386/bin/aux/listen1 - 775 sys sys 1128568174 94491
+386/bin/aux/sshserve - 775 sys sys 1128568174 252710
+386/bin/ip/ftpd - 775 sys sys 1128568176 170299
+386/bin/ip/httpd/httpd - 775 sys sys 1128568177 292364
+386/bin/ip/imap4d - 775 sys sys 1128568177 237569
+386/bin/ip/ppp - 775 sys sys 1128568178 219956
+386/bin/ip/rexexec - 775 sys sys 1128568178 89977
+386/bin/ip/telnetd - 775 sys sys 1128568178 123067
+386/bin/ip/tftpd - 775 sys sys 1128568179 130567
+386/bin/upas/pop3 - 775 sys sys 1128568180 262187
+386/bin/upas/send - 775 sys sys 1128568180 192895
+386/bin/upas/smtpd - 775 sys sys 1128568181 331205
+386/init - 775 sys sys 1128568181 101180
+386/lib/libauth.a - 664 sys sys 1128568181 58648

+ 34 - 41
dist/replica/plan9.db

@@ -49,7 +49,7 @@
 386/bin/auth/changeuser - 775 sys sys 1125345945 97017
 386/bin/auth/convkeys - 775 sys sys 1117249742 87396
 386/bin/auth/convkeys2 - 775 sys sys 1117249742 87447
-386/bin/auth/cron - 775 sys sys 1125345946 142881
+386/bin/auth/cron - 775 sys sys 1128568172 143960
 386/bin/auth/debug - 775 sys sys 1125345946 101055
 386/bin/auth/disable - 775 sys sys 1020319057 146
 386/bin/auth/enable - 775 sys sys 1020319057 134
@@ -58,9 +58,9 @@
 386/bin/auth/guard.srv - 775 sys sys 1125345947 142841
 386/bin/auth/iam - 775 sys sys 1085076981 50791
 386/bin/auth/keyfs - 775 sys sys 1117249744 115539
-386/bin/auth/login - 775 sys sys 1125345947 103370
-386/bin/auth/newns - 775 sys sys 1125345947 87941
-386/bin/auth/none - 775 sys sys 1125345947 87938
+386/bin/auth/login - 775 sys sys 1128568172 104451
+386/bin/auth/newns - 775 sys sys 1128568172 89687
+386/bin/auth/none - 775 sys sys 1128568172 89021
 386/bin/auth/pemdecode - 775 sys sys 1115950032 61457
 386/bin/auth/pemencode - 775 sys sys 1115950032 59851
 386/bin/auth/printnetkey - 775 sys sys 1115950032 40474
@@ -76,7 +76,7 @@
 386/bin/auth/secuser - 775 sys sys 1127360568 152942
 386/bin/auth/status - 775 sys sys 1020319060 738
 386/bin/auth/uniq - 775 sys sys 1125345951 63059
-386/bin/auth/warning - 775 sys sys 1125345952 99558
+386/bin/auth/warning - 775 sys sys 1128568173 100637
 386/bin/auth/wrkey - 775 sys sys 1117249745 75165
 386/bin/aux - 20000000775 sys sys 1016920817 0
 386/bin/aux/9pcon - 775 sys sys 1127445048 94916
@@ -107,8 +107,8 @@
 386/bin/aux/hardcopy - 775 sys sys 1020319063 1699
 386/bin/aux/isvmware - 775 sys sys 1032486791 23997
 386/bin/aux/lines - 775 sys sys 1125345956 60483
-386/bin/aux/listen - 775 sys sys 1125345956 106887
-386/bin/aux/listen1 - 775 sys sys 1125345956 93410
+386/bin/aux/listen - 775 sys sys 1128568173 107968
+386/bin/aux/listen1 - 775 sys sys 1128568174 94491
 386/bin/aux/lpdaemon - 775 sys sys 1127360569 168275
 386/bin/aux/lpdsend - 775 sys sys 1127360569 155113
 386/bin/aux/lpsend - 775 sys sys 1115950042 52540
@@ -139,7 +139,7 @@
 386/bin/aux/searchfs - 775 sys sys 1115950049 89556
 386/bin/aux/sprog - 775 sys sys 1125345960 79340
 386/bin/aux/ssh_genkey - 775 sys sys 1045537957 194629
-386/bin/aux/sshserve - 775 sys sys 1127360570 251631
+386/bin/aux/sshserve - 775 sys sys 1128568174 252710
 386/bin/aux/stub - 775 sys sys 1124939599 135175
 386/bin/aux/tcpostio - 775 sys sys 1094040084 200808
 386/bin/aux/text2post - 775 sys sys 1104121986 78336
@@ -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 1125345964 138019
+386/bin/cpu - 775 sys sys 1128568175 139098
 386/bin/crop - 775 sys sys 1115950059 116008
 386/bin/date - 775 sys sys 1115950059 43261
 386/bin/db - 775 sys sys 1125345965 336317
@@ -219,7 +219,7 @@
 386/bin/ed - 775 sys sys 1125345970 93025
 386/bin/eqn - 775 sys sys 1127360572 243030
 386/bin/execnet - 775 sys sys 1124939601 172009
-386/bin/exportfs - 775 sys sys 1125345970 161162
+386/bin/exportfs - 775 sys sys 1128568175 162241
 386/bin/ext2srv - 775 sys sys 1125345971 173998
 386/bin/faces - 775 sys sys 1115950068 193388
 386/bin/factor - 775 sys sys 1125345971 61466
@@ -274,18 +274,18 @@
 386/bin/ico - 775 sys sys 1125345981 161421
 386/bin/iconv - 775 sys sys 1115950080 113265
 386/bin/idiff - 775 sys sys 1125345981 76103
-386/bin/import - 775 sys sys 1125345982 100290
+386/bin/import - 775 sys sys 1128568175 101371
 386/bin/iostats - 775 sys sys 1127445049 98431
 386/bin/ip - 20000000775 sys sys 1016920851 0
 386/bin/ip/dhcpclient - 775 sys sys 1116126317 94096
 386/bin/ip/dhcpd - 775 sys sys 1125345983 149123
 386/bin/ip/dhcpleases - 775 sys sys 1116126317 86215
-386/bin/ip/ftpd - 775 sys sys 1125345983 169218
+386/bin/ip/ftpd - 775 sys sys 1128568176 170299
 386/bin/ip/gizzard - 775 sys sys 1081480408 101521
 386/bin/ip/gping - 775 sys sys 1116126318 182819
 386/bin/ip/hogports - 775 sys sys 1118632064 42883
 386/bin/ip/httpd - 20000000775 sys sys 1016920846 0
-386/bin/ip/httpd/httpd - 775 sys sys 1127790501 291589
+386/bin/ip/httpd/httpd - 775 sys sys 1128568177 292364
 386/bin/ip/httpd/imagemap - 775 sys sys 1127790501 114798
 386/bin/ip/httpd/man2html - 775 sys sys 1127790501 123085
 386/bin/ip/httpd/netlib_find - 775 sys sys 1127790502 115643
@@ -293,19 +293,19 @@
 386/bin/ip/httpd/save - 775 sys sys 1127790502 131094
 386/bin/ip/httpd/webls - 775 sys sys 1127790503 131239
 386/bin/ip/httpd/wikipost - 775 sys sys 1127790503 112677
-386/bin/ip/imap4d - 775 sys sys 1125345987 236488
+386/bin/ip/imap4d - 775 sys sys 1128568177 237569
 386/bin/ip/ipconfig - 775 sys sys 1126148865 137742
 386/bin/ip/ping - 775 sys sys 1116126319 77010
-386/bin/ip/ppp - 775 sys sys 1125544173 218875
+386/bin/ip/ppp - 775 sys sys 1128568178 219956
 386/bin/ip/pppoe - 775 sys sys 1125544173 77548
 386/bin/ip/pptp - 775 sys sys 1116126320 126658
 386/bin/ip/pptpd - 775 sys sys 1125345988 125824
 386/bin/ip/rarpd - 775 sys sys 1125345990 111572
-386/bin/ip/rexexec - 775 sys sys 1125345991 88894
+386/bin/ip/rexexec - 775 sys sys 1128568178 89977
 386/bin/ip/rip - 775 sys sys 1125345991 91223
 386/bin/ip/rlogind - 775 sys sys 1115950088 67402
-386/bin/ip/telnetd - 775 sys sys 1127531310 121988
-386/bin/ip/tftpd - 775 sys sys 1125345992 129480
+386/bin/ip/telnetd - 775 sys sys 1128568178 123067
+386/bin/ip/tftpd - 775 sys sys 1128568179 130567
 386/bin/ip/traceroute - 775 sys sys 1115950089 73497
 386/bin/ip/udpecho - 775 sys sys 1115950089 43159
 386/bin/join - 775 sys sys 1115950090 114091
@@ -455,14 +455,14 @@
 386/bin/upas/msgcat - 775 sys sys 1064598353 38
 386/bin/upas/msgtok - 775 sys sys 1064598354 75149
 386/bin/upas/nedmail - 775 sys sys 1125346029 156582
-386/bin/upas/pop3 - 775 sys sys 1127360610 261106
+386/bin/upas/pop3 - 775 sys sys 1128568180 262187
 386/bin/upas/qer - 775 sys sys 1125346030 100118
 386/bin/upas/ratfs - 775 sys sys 1125346030 111349
 386/bin/upas/runq - 775 sys sys 1125346030 113769
 386/bin/upas/scanmail - 775 sys sys 1125346031 129036
-386/bin/upas/send - 775 sys sys 1125346032 191814
+386/bin/upas/send - 775 sys sys 1128568180 192895
 386/bin/upas/smtp - 775 sys sys 1127445051 275242
-386/bin/upas/smtpd - 775 sys sys 1127360612 330126
+386/bin/upas/smtpd - 775 sys sys 1128568181 331205
 386/bin/upas/spam - 775 sys sys 1064598366 36
 386/bin/upas/testscan - 775 sys sys 1125346034 83659
 386/bin/upas/token - 775 sys sys 1115950132 77554
@@ -519,7 +519,7 @@
 386/include/ape/ureg.h - 664 sys sys 944946041 812
 386/include/u.h - 664 sys sys 1115924095 1481
 386/include/ureg.h - 664 sys sys 944946012 523
-386/init - 775 sys sys 1125346042 100101
+386/init - 775 sys sys 1128568181 101180
 386/ld.com - 775 sys sys 1109598589 72076
 386/lib - 20000000775 sys sys 1016826328 0
 386/lib/ape - 20000000775 sys sys 944969312 0
@@ -535,7 +535,7 @@
 386/lib/ape/libv.a - 664 sys sys 1122001338 19668
 386/lib/lib9p.a - 664 sys sys 1124939608 79582
 386/lib/libString.a - 664 sys sys 1115950150 22184
-386/lib/libauth.a - 664 sys sys 1115950150 56134
+386/lib/libauth.a - 664 sys sys 1128568181 58648
 386/lib/libauthsrv.a - 664 sys sys 1117249746 34098
 386/lib/libbin.a - 664 sys sys 1115950150 2534
 386/lib/libbio.a - 664 sys sys 1125346045 26064
@@ -7257,13 +7257,13 @@ sys/man/1/comm - 664 sys sys 944959675 665
 sys/man/1/con - 664 sys sys 1071156278 4318
 sys/man/1/cp - 664 sys sys 1110816882 1947
 sys/man/1/cpp - 664 sys sys 944959674 2105
-sys/man/1/cpu - 664 sys sys 1128462781 3804
+sys/man/1/cpu - 664 sys sys 1128483118 3804
 sys/man/1/crop - 664 sys sys 984709627 2596
 sys/man/1/date - 664 sys sys 969499884 996
 sys/man/1/db - 664 sys sys 1015024738 17862
 sys/man/1/dc - 664 sys sys 1113743325 4834
 sys/man/1/dd - 664 sys sys 1055693436 3346
-sys/man/1/delkey - 664 sys sys 1109429138 779
+sys/man/1/delkey - 664 sys sys 1128483118 779
 sys/man/1/deroff - 664 sys sys 1113743324 1826
 sys/man/1/diff - 664 sys sys 1114697100 3085
 sys/man/1/doc2txt - 664 sys sys 1105020018 2077
@@ -7577,10 +7577,11 @@ sys/man/4/dossrv - 664 sys sys 1015024813 4176
 sys/man/4/execnet - 664 sys sys 1019866708 1069
 sys/man/4/exportfs - 664 sys sys 1115314261 4653
 sys/man/4/ext2srv - 664 sys sys 1055692986 2409
-sys/man/4/factotum - 664 sys sys 1119530771 14709
+sys/man/4/factotum - 664 sys sys 1128483118 14709
 sys/man/4/fossil - 664 sys sys 1112368411 9546
 sys/man/4/fs - 664 sys sys 1019058716 3387
 sys/man/4/ftpfs - 664 sys sys 1112563349 4410
+sys/man/4/httpfile - 664 sys sys 1128556957 1233
 sys/man/4/import - 664 sys sys 1115314601 3095
 sys/man/4/iostats - 664 sys sys 1105574383 1621
 sys/man/4/keyfs - 664 sys sys 1116594919 5048
@@ -7629,7 +7630,7 @@ sys/man/6/INDEX - 664 sys sys 1104736383 410
 sys/man/6/INDEX.html - 664 sys sys 1104736385 2927
 sys/man/6/a.out - 664 sys sys 1015024888 7155
 sys/man/6/ar - 664 sys sys 944959678 2092
-sys/man/6/authsrv - 664 sys sys 1035840090 10534
+sys/man/6/authsrv - 664 sys sys 1128483124 13304
 sys/man/6/color - 664 sys sys 988225304 5181
 sys/man/6/face - 664 sys sys 1062505426 2846
 sys/man/6/font - 664 sys sys 1077594184 2528
@@ -7699,7 +7700,7 @@ sys/man/8/mouse - 664 sys sys 971455511 2476
 sys/man/8/na - 664 sys sys 958527089 859
 sys/man/8/ndb - 664 sys sys 1118851681 9943
 sys/man/8/newuser - 664 sys sys 1116954242 2418
-sys/man/8/nfsserver - 664 sys sys 1017251291 3397
+sys/man/8/nfsserver - 664 sys sys 1128483119 3397
 sys/man/8/pcmcia - 664 sys sys 944959679 408
 sys/man/8/pem - 664 sys sys 1060263669 1189
 sys/man/8/ping - 664 sys sys 1084473185 3436
@@ -9382,7 +9383,7 @@ sys/src/cmd/auth/lib/wrbio.c - 664 sys sys 1015008430 755
 sys/src/cmd/auth/login.c - 664 sys sys 1121977157 3981
 sys/src/cmd/auth/mkfile - 664 sys sys 1071334970 1979
 sys/src/cmd/auth/netkey.c - 664 sys sys 1015008431 741
-sys/src/cmd/auth/newns.c - 664 sys sys 1048614962 486
+sys/src/cmd/auth/newns.c - 664 sys sys 1128540497 962
 sys/src/cmd/auth/none.c - 664 sys sys 1116769155 774
 sys/src/cmd/auth/passwd.c - 664 sys sys 1055699009 2761
 sys/src/cmd/auth/pemdecode.c - 664 sys sys 1084330528 947
@@ -11948,6 +11949,7 @@ sys/src/cmd/ip/httpd/sendfd.c - 664 sys sys 1017679317 12134
 sys/src/cmd/ip/httpd/webls.c - 664 sys sys 1120737502 7658
 sys/src/cmd/ip/httpd/webls.denied - 664 sys sys 1064887847 3
 sys/src/cmd/ip/httpd/wikipost.c - 664 sys sys 1083771074 5913
+sys/src/cmd/ip/httpfile.c - 600 sys sys 1128556975 10037
 sys/src/cmd/ip/imap4d - 20000000775 sys sys 988249981 0
 sys/src/cmd/ip/imap4d/auth.c - 664 sys sys 1015013075 3510
 sys/src/cmd/ip/imap4d/copy.c - 664 sys sys 1062298855 4597
@@ -13065,12 +13067,9 @@ sys/src/cmd/unix/9pfreebsd/mount_9fs/Makefile - 664 sys sys 960684604 412
 sys/src/cmd/unix/9pfreebsd/mount_9fs/crypt.c - 664 sys sys 960684604 18042
 sys/src/cmd/unix/9pfreebsd/mount_9fs/mount_9fs.8 - 664 sys sys 960684604 10864
 sys/src/cmd/unix/9pfreebsd/mount_9fs/mount_9fs.c - 664 sys sys 960684605 25118
-sys/src/cmd/unix/README - 664 sys sys 1110289527 746
-sys/src/cmd/unix/bootp - 20000000775 sys sys 944961309 0
-sys/src/cmd/unix/bootp/README - 664 sys sys 944961309 2986
-sys/src/cmd/unix/bootp/unix.bootp.tar - 664 sys sys 944961309 153600
+sys/src/cmd/unix/README - 664 sys sys 1128520385 1735
 sys/src/cmd/unix/drawterm - 20000000775 sys sys 964488190 0
-sys/src/cmd/unix/drawterm/README - 664 sys sys 1019847889 410
+sys/src/cmd/unix/drawterm/README - 664 sys sys 1128520449 373
 sys/src/cmd/unix/drawterm/README.MACOSX - 664 sys sys 1020578504 57
 sys/src/cmd/unix/drawterm/_asgetticket.c - 664 sys sys 954098597 285
 sys/src/cmd/unix/drawterm/_asrdfile.c - 664 sys sys 954098597 245
@@ -13250,12 +13249,6 @@ sys/src/cmd/unix/drawterm/windows.h - 664 sys sys 954098656 401
 sys/src/cmd/unix/drawterm/winscreen.c - 664 sys sys 954098657 11393
 sys/src/cmd/unix/drawterm/wstrtoutf.c - 664 sys sys 954098657 393
 sys/src/cmd/unix/netkey.c - 664 sys sys 1045152984 21761
-sys/src/cmd/unix/sam - 20000000775 sys sys 954263160 0
-sys/src/cmd/unix/sam/README - 664 sys sys 1110289373 306
-sys/src/cmd/unix/spin - 20000000775 sys sys 956275829 0
-sys/src/cmd/unix/spin/readme - 664 sys sys 1125514575 247
-sys/src/cmd/unix/spin/spin425.tar.gz - 664 sys sys 1125514573 330078
-sys/src/cmd/unix/tcs.shar.Z - 664 sys sys 944961315 312440
 sys/src/cmd/unix/u9fs - 20000000775 sys sys 1015092354 0
 sys/src/cmd/unix/u9fs/authnone.c - 664 sys sys 1015092351 321
 sys/src/cmd/unix/u9fs/authp9any.c - 664 sys sys 1094068304 11021
@@ -13921,7 +13914,7 @@ sys/src/libauth/authlocal.h - 664 sys sys 1014929317 87
 sys/src/libauth/httpauth.c - 664 sys sys 1017166331 1059
 sys/src/libauth/login.c - 664 sys sys 1014929318 264
 sys/src/libauth/mkfile - 664 sys sys 1063854014 455
-sys/src/libauth/newns.c - 664 sys sys 1076977148 6284
+sys/src/libauth/newns.c - 664 sys sys 1128540492 7226
 sys/src/libauth/noworld.c - 664 sys sys 1014929318 779
 sys/src/libauthsrv - 20000000775 sys sys 1015091654 0
 sys/src/libauthsrv/_asgetticket.c - 664 sys sys 1015091652 280

+ 43 - 0
dist/replica/plan9.log

@@ -21543,3 +21543,46 @@
 1128310238 3 c 386/bin/fossil/fossil - 775 sys sys 1128309083 360426
 1128339045 0 c sys/lib/dist/cmd/bargraph.c - 664 sys sys 1128338667 5951
 1128463219 0 c sys/man/1/cpu - 664 sys sys 1128462781 3804
+1128484826 0 c sys/man/1/cpu - 664 sys sys 1128483118 3804
+1128484826 1 c sys/man/1/delkey - 664 sys sys 1128483118 779
+1128484826 2 c sys/man/4/factotum - 664 sys sys 1128483118 14709
+1128484826 3 c sys/man/6/authsrv - 664 sys sys 1128483124 13304
+1128484826 4 c sys/man/8/nfsserver - 664 sys sys 1128483119 3397
+1128520833 0 c sys/src/cmd/unix/README - 664 sys sys 1128520385 1735
+1128520833 1 c sys/src/cmd/unix/drawterm/README - 664 sys sys 1128520449 373
+1128520833 2 d sys/src/cmd/unix/tcs.shar.Z - 664 sys sys 944961315 0
+1128520833 3 d sys/src/cmd/unix/spin/spin425.tar.gz - 664 sys sys 1125514573 0
+1128520833 4 d sys/src/cmd/unix/spin/readme - 664 sys sys 1125514575 0
+1128520833 5 d sys/src/cmd/unix/spin - 20000000775 sys sys 956275829 0
+1128520833 6 d sys/src/cmd/unix/sam/README - 664 sys sys 1110289373 0
+1128520833 7 d sys/src/cmd/unix/sam - 20000000775 sys sys 954263160 0
+1128520833 8 d sys/src/cmd/unix/bootp/unix.bootp.tar - 664 sys sys 944961309 0
+1128520833 9 d sys/src/cmd/unix/bootp/README - 664 sys sys 944961309 0
+1128520833 10 d sys/src/cmd/unix/bootp - 20000000775 sys sys 944961309 0
+1128540637 0 c sys/src/cmd/auth/newns.c - 664 sys sys 1128540497 962
+1128540637 1 c sys/src/libauth/newns.c - 664 sys sys 1128540492 7226
+1128558643 0 a sys/man/4/httpfile - 664 sys sys 1128556957 1233
+1128558643 1 a sys/src/cmd/ip/httpfile.c - 600 sys sys 1128556975 10037
+1128569448 0 c 386/bin/cpu - 775 sys sys 1128568175 139098
+1128569448 1 c 386/bin/exportfs - 775 sys sys 1128568175 162241
+1128569448 2 c 386/bin/import - 775 sys sys 1128568175 101371
+1128569448 3 c 386/bin/auth/cron - 775 sys sys 1128568172 143960
+1128569448 4 c 386/bin/auth/login - 775 sys sys 1128568172 104451
+1128569448 5 c 386/bin/auth/newns - 775 sys sys 1128568172 89687
+1128569448 6 c 386/bin/auth/none - 775 sys sys 1128568172 89021
+1128569448 7 c 386/bin/auth/warning - 775 sys sys 1128568173 100637
+1128569448 8 c 386/bin/aux/listen - 775 sys sys 1128568173 107968
+1128569448 9 c 386/bin/aux/listen1 - 775 sys sys 1128568174 94491
+1128569448 10 c 386/bin/aux/sshserve - 775 sys sys 1128568174 252710
+1128569448 11 c 386/bin/ip/ftpd - 775 sys sys 1128568176 170299
+1128569448 12 c 386/bin/ip/httpd/httpd - 775 sys sys 1128568177 292364
+1128569448 13 c 386/bin/ip/imap4d - 775 sys sys 1128568177 237569
+1128569448 14 c 386/bin/ip/ppp - 775 sys sys 1128568178 219956
+1128569448 15 c 386/bin/ip/rexexec - 775 sys sys 1128568178 89977
+1128569448 16 c 386/bin/ip/telnetd - 775 sys sys 1128568178 123067
+1128569448 17 c 386/bin/ip/tftpd - 775 sys sys 1128568179 130567
+1128569448 18 c 386/bin/upas/pop3 - 775 sys sys 1128568180 262187
+1128569448 19 c 386/bin/upas/send - 775 sys sys 1128568180 192895
+1128569448 20 c 386/bin/upas/smtpd - 775 sys sys 1128568181 331205
+1128569448 21 c 386/init - 775 sys sys 1128568181 101180
+1128569448 22 c 386/lib/libauth.a - 664 sys sys 1128568181 58648

+ 86 - 0
sys/man/4/httpfile

@@ -0,0 +1,86 @@
+.TH HTTPFILE 4
+.SH NAME
+httpfile \- serve a single web file
+.SH SYNOPSIS
+.B httpfile
+[
+.B -9d
+]
+[
+.B -b
+.I count
+]
+[
+.B -f
+.I file
+]
+[
+.B -m
+.I mtpt
+]
+[
+.B -s
+.I srvname
+]
+[
+.B -x
+.I net
+]
+.I url
+.SH DESCRIPTION
+.I Httpfile
+serves the web page specified by the URL
+.I url
+as a new file
+.I file
+in the directory
+.IR mtpt .
+The default
+.I file
+is the last path element of the URL,
+and the default
+.I mtpt
+is the current directory.
+.PP
+.I Httpfile
+does not download large files all at once.
+Instead, it requests 64-kilobyte blocks as they are
+needed to satisfy reads, caching a few blocks in memory at a time.
+.PP
+The 
+.B -D
+and
+.B -d
+options enable a trace of the 9P traffic
+and general debugging messages.
+.PP
+The
+.B -s
+option causes 
+.I httpfile
+to post the 9P service as
+.BI /srv/ srvname
+and disables the default mount.
+.PP
+The
+.B -x
+option specifies an alternate network directory
+.RI ( e.g., 
+.BR /net.alt ).
+.PP
+The
+.B -b
+option sets the number of file blocks kept cached in memory (default 32).
+.SH EXAMPLE
+Mount an ISO image on a web server:
+.IP
+.EX
+ip/httpfile http://www.9grid.de/plan9/plan9.iso
+9660srv
+mount /srv/9660 /n/iso plan9.iso
+.EE
+.SH SOURCE
+.B /sys/src/cmd/ip/httpfile.c
+.SH "SEE ALSO
+.IR hget (1),
+.IR webfs (4)

+ 32 - 3
sys/src/cmd/auth/newns.c

@@ -5,18 +5,39 @@
 void
 usage(void)
 {
-	fprint(2, "usage: newns [-n namespace] [cmd [args...]]\n");
+	fprint(2, "usage: newns [-ad] [-n namespace] [cmd [args...]]\n");
 	exits("usage");
 }
 
+static int
+rooted(char *s)
+{
+	if(s[0] == '/')
+		return 1;
+	if(s[0] == '.' && s[1] == '/')
+		return 1;
+	if(s[0] == '.' && s[1] == '.' && s[2] == '/')
+		return 1;
+	return 0;
+}
+
 void
 main(int argc, char **argv)
 {
-	char *nsfile;
+	extern int newnsdebug;
 	char *defargv[] = { "/bin/rc", "-i", nil };
+	char *nsfile, err[ERRMAX];
+	int add;
 
+	add = 0;
 	nsfile = "/lib/namespace";
 	ARGBEGIN{
+	case 'a':
+		add = 1;
+		break;
+	case 'd':
+		newnsdebug = 1;
+		break;
 	case 'n':
 		nsfile = ARGF();
 		break;
@@ -26,7 +47,15 @@ main(int argc, char **argv)
 	}ARGEND
 	if(argc == 0)
 		argv = defargv;
-	newns(getuser(), nsfile);
+	if (add)
+		addns(getuser(), nsfile);
+	else
+		newns(getuser(), nsfile);
 	exec(argv[0], argv);
+	if(!rooted(argv[0])){
+		rerrstr(err, sizeof err);
+		exec(smprint("/bin/%s", argv[0]), argv);
+		errstr(err, sizeof err);
+	}
 	sysfatal("exec: %s: %r", argv[0]);
 }	

+ 57 - 23
sys/src/cmd/unix/README

@@ -1,25 +1,59 @@
-This directory contains the source for programs that
-live in both the Plan 9 and Unix worlds.  The following
-programs are supplied:
 
-	u9fs - a Unix resident file server that serves the
-		Plan 9 protocol, P9.
-
-	sam - an X-windows version of the sam editor that runs
-		on most popular Unix systems and Suns, too.
-
-	bootp - program to allow a Unix machine to answer a Plan 9 bootp.
-
-	tcs.shar.Z - a compressed version of the Unix source for the
-		character set converter.
-
-	spin - on-the-fly verification program for concurrent systems.
-
-	9pfreebsd - IL and 9FS for FreeBSD 3.2.
-
-A README file in each subdirectory further explains each
-program.
-
-For a more up-to-date copy of sam and tcs, see Plan 9 from
-User Space at http://swtch.com/plan9port.
+This directory contains source for some programs that
+help Plan 9 co-exist with the non-Plan 9 world.
+
+	9pfreebsd/
+		Patches to FreeBSD 3.2 to add the IL network protocol
+		and the pre-9P2000 version of 9P.
+
+	drawterm/
+		Drawterm is a Unix and Windows program that simulates
+		a Plan 9 terminal to connect to a Plan 9 cpu server.
+		The version in this directory speaks the pre-9P2000 
+		protocols.  
+
+		A new 9P2000 version is in progress but still crashes
+		with some regularity on Unix.  It can be found at
+		  http://cvs.pdos.csail.mit.edu/cvs/drawterm/
+		or use
+		  cvs -d :pserver:anoncvs@cvs.pdos.csail.mit.edu:/cvs co drawterm
+		For more information about CVS, see
+		  http://swtch.com/plan9port/man/man1/cvs.html
+
+	u9fs/
+		U9fs is a simple 9P server that runs on Unix.
+		It serves both 9P2000 and the older 9P.
+
+	netkey.c
+		A standalone Unix version of Plan 9's netkey(1).
+
+	winstart
+	winplumb.c
+	winplumb.exe
+		Winstart is a shell script to be used with the plumber
+		to relay plumbing messages (typically URLs) to a Windows
+		machine.  It is particularly useful with VMware.
+
+The following programs at external locations may also be of interest:
+
+	Plan 9 from User Space
+		a Unix port of acme, sam, tcs, and many other Plan 9 programs
+		- http://swtch.com/plan9port
+
+	V9fs
+		a project to write 9P drivers for other operating systems
+		- 9p2000.ko is now part of the standard Linux 2.6 tree
+		- http://v9fs.sourceforge.net/
+
+	spin, the protocol verifier
+		- http://spinroot.com/
+
+	sam
+		older ports of Sam to Unix and Windows
+		- ftp://ftp.demon.co.uk/pub/unix/plan9
+		- ftp://plan9.bell-labs.com/netlib/research/
+
+	9pm
+		an old port of much of the Plan 9 tools to Windows
+		- http://plan9.bell-labs.com/plan9dist/ureg.html
 

+ 0 - 77
sys/src/cmd/unix/bootp/README

@@ -1,77 +0,0 @@
-This directory contains the source for the CMU BOOTP server.  The files
-include:
-
-README		This file
-bootpd.8	The manual page
-bootp.h		The protocol header file
-bootpd.h	The server header file
-bootpd.c	The main server module
-readfile.c	The configuration file-reading routines
-hash.h		The hash table header file
-hash.c		The hash table module
-Version.c	The version module
-newvers.sh	A shell script to generate new version numbers
-Makefile	The makefile
-bootptab	An example database file for the server
-gmods		Text describing optional gateway modifications
-
-
-Notes:
-1) BOOTP was originally designed and implemented by Bill Croft at Stanford.
-   Much of the credit for the ideas and the code goes to him.  We've added
-   code to support the vendor specific area of the packet as specified in
-   RFC1048.  We've also improved the host lookup algorithm and added some
-   extra logging.
-
-2) The server now uses syslog to do logging.  Specifically it uses the 4.3bsd
-   version.  I've #ifdef'd all of these calls.  If you are running 4.2 you
-   should compile without the -DSYSLOG switch.
-
-3) You must update your /etc/services file to contain the following two lines:
-    bootps		67/udp				# bootp server
-    bootpc		68/udp				# bootp client
-
-4) The code and the bootptab should be reasonably well commented.  If you 
-   have any questions, just let us know.
-
-Construction:
-    Make sure all of the files exist first.  If anything is missing,
-    please contact either Walt Wimer or Drew Perkins by E-mail or phone.
-    Addresses and phone numbers are listed below.
-
-    Type 'make'.  The options at present are: -DSYSLOG which enables logging
-    code, -DDEBUG which enables table dumping via signals, and -DVEND_CMU
-    which enables the CMU extensions for CMU PC/IP.
-
-    Edit the bootptab.  The man page and the comments in the file should
-    explain how to go about doing so.  If you have any problems, let me know.
-
-    Type 'make install'.  This should put all of the files in the right place.
-
-    Edit your /etc/rc.local or /etc/inetd.conf file to start up bootpd upon
-    reboot.
-
-Care and feeding:
-    If you change the interface cards on your host or add new hosts you will
-    need to update /etc/bootptab.  Just edit it as before.  Once you write
-    it back out, bootpd will notice that there is a new copy and will
-    reread it the next time it gets a request.
-
-    If your bootp clients don't get a response then several things might be
-    wrong.  Most often, the entry for that host is not in the database.
-    Check the hardware address and then check the entry and make sure
-    everything is right.  Other problems include the server machine crashing,
-    bad cables, and the like.  If your network is very congested you should
-    try making your bootp clients send additional requests before giving up.
-
-
-November 7, 1988
-
-
-Walter L. Wimer			Drew D. Perkins
-ww0n@andrew.cmu.edu		ddp@andrew.cmu.edu
-(412) 268-6252			(412) 268-8576
-
-4910 Forbes Ave
-Pittsburgh, PA  15213
-

BIN
sys/src/cmd/unix/bootp/unix.bootp.tar


+ 1 - 1
sys/src/cmd/unix/drawterm/README

@@ -5,5 +5,5 @@ of Unix.  See the manual page for more information.
 
 This drawterm still uses the old (third edition) 9P, aka 9P1.
 A 9P2000 version of drawterm and many other tools is in 
-progress.  If you are interested in helping, mail rsc@plan9.bell-labs.com.
+progress.  See ../README for details.
 

+ 0 - 10
sys/src/cmd/unix/sam/README

@@ -1,10 +0,0 @@
-Sam for Unix is now maintained by
-	Mark H. Wilkinson <mhw@kremvax.demon.co.uk>
-and
-	Bengt Kleberg <bengt@softwell.se>
-
-You can get a copy at ftp://ftp.demon.co.uk/pub/unix/plan9
-
-Sam (in its full-color new-backend glory) is also available
-as part of Plan 9 from User Space; see http://swtch.com/plan9port
-

+ 0 - 4
sys/src/cmd/unix/spin/readme

@@ -1,4 +0,0 @@
-the latest version of sources, documentation, newsletters,
-workshop announcements, etc., for the Spin system can always
-be found online at: http://spinroot.com/spin/whatispin.html
-online references live at: http://spinroot.com/spin/Man/index.html

BIN
sys/src/cmd/unix/spin/spin425.tar.gz


BIN
sys/src/cmd/unix/tcs.shar.Z


+ 87 - 36
sys/src/libauth/newns.c

@@ -14,11 +14,13 @@ enum
 static int	setenv(char*, char*);
 static char	*expandarg(char*, char*);
 static int	splitargs(char*, char*[], char*, int);
-static int	nsfile(Biobuf *, AuthRpc *);
-static int	nsop(int, char*[], AuthRpc*);
+static int	nsfile(char*, Biobuf *, AuthRpc *);
+static int	nsop(char*, int, char*[], AuthRpc*);
 static int	callexport(char*, char*);
 static int	catch(void*, char*);
 
+int newnsdebug;
+
 static int
 buildns(int newns, char *user, char *file)
 {
@@ -32,6 +34,8 @@ buildns(int newns, char *user, char *file)
 	rpc = nil;
 	/* try for factotum now because later is impossible */
 	afd = open("/mnt/factotum/rpc", ORDWR);
+	if (afd < 0 && newnsdebug)
+		fprint(2, "open /mnt/factotum/rpc: %r\n");
 	if(afd >= 0){
 		rpc = auth_allocrpc(afd);
 		if(rpc == nil){
@@ -59,7 +63,7 @@ buildns(int newns, char *user, char *file)
 		snprint(home, 2*ANAMELEN, "/usr/%s", user);
 		setenv("home", home);
 	}
-	cdroot = nsfile(b, rpc);
+	cdroot = nsfile(newns ? "newns" : "addns", b, rpc);
 	Bterm(b);
 	if(rpc){
 		close(rpc->afd);
@@ -79,12 +83,13 @@ buildns(int newns, char *user, char *file)
 }
 
 static int
-nsfile(Biobuf *b, AuthRpc *rpc)
+nsfile(char *fn, Biobuf *b, AuthRpc *rpc)
 {
 	int argc;
 	char *cmd, *argv[NARG+1], argbuf[MAXARG*NARG];
-	int cdroot = 0;
+	int cdroot;
 
+	cdroot = 0;
 	atnotify(catch, 1);
 	while(cmd = Brdline(b, '\n')){
 		cmd[Blinelen(b)-1] = '\0';
@@ -94,7 +99,7 @@ nsfile(Biobuf *b, AuthRpc *rpc)
 			continue;
 		argc = splitargs(cmd, argv, argbuf, NARG);
 		if(argc)
-			cdroot |= nsop(argc, argv, rpc);
+			cdroot |= nsop(fn, argc, argv, rpc);
 	}
 	atnotify(catch, 0);
 	return cdroot;
@@ -128,16 +133,22 @@ famount(int fd, AuthRpc *rpc, char *mntpt, int flags, char *aname)
 }
 
 static int
-nsop(int argc, char *argv[], AuthRpc *rpc)
+nsop(char *fn, int argc, char *argv[], AuthRpc *rpc)
 {
 	char *argv0;
 	ulong flags;
-	int fd;
+	int fd, i;
 	Biobuf *b;
-	int cdroot = 0;
+	int cdroot;
 
+	cdroot = 0;
 	flags = 0;
 	argv0 = 0;
+	if (newnsdebug){
+		for (i = 0; i < argc; i++)
+			fprint(2, "%s ", argv[i]);
+		fprint(2, "\n");
+	}
 	ARGBEGIN{
 	case 'a':
 		flags |= MAFTER;
@@ -160,34 +171,39 @@ nsop(int argc, char *argv[], AuthRpc *rpc)
 		b = Bopen(argv[0], OREAD);
 		if(b == nil)
 			return 0;
-		cdroot |= nsfile(b, rpc);
+		cdroot |= nsfile(fn, b, rpc);
 		Bterm(b);
-	} else if(strcmp(argv0, "clear") == 0 && argc == 0)
+	}else if(strcmp(argv0, "clear") == 0 && argc == 0)
 		rfork(RFCNAMEG);
-	else if(strcmp(argv0, "bind") == 0 && argc == 2)
-		bind(argv[0], argv[1], flags);
-	else if(strcmp(argv0, "unmount") == 0){
+	else if(strcmp(argv0, "bind") == 0 && argc == 2){
+		if(bind(argv[0], argv[1], flags) < 0 && newnsdebug)
+			fprint(2, "%s: bind: %s %s: %r\n", fn, argv[0], argv[1]);
+	}else if(strcmp(argv0, "unmount") == 0){
 		if(argc == 1)
 			unmount(nil, argv[0]);
 		else if(argc == 2)
 			unmount(argv[0], argv[1]);
-	} else if(strcmp(argv0, "mount") == 0){
+	}else if(strcmp(argv0, "mount") == 0){
 		fd = open(argv[0], ORDWR);
-		if(argc == 2)
-			famount(fd, rpc, argv[1], flags, "");
-		else if(argc == 3)
-			famount(fd, rpc, argv[1], flags, argv[2]);
+		if(argc == 2){
+			if(famount(fd, rpc, argv[1], flags, "") < 0 && newnsdebug)
+				fprint(2, "%s: mount: %s %s: %r\n", fn, argv[0], argv[1]);
+		}else if(argc == 3){
+			if(famount(fd, rpc, argv[1], flags, argv[2]) < 0 && newnsdebug)
+				fprint(2, "%s: mount: %s %s %s: %r\n", fn, argv[0], argv[1], argv[2]);
+		}
 		close(fd);
-	} else if(strcmp(argv0, "import") == 0){
+	}else if(strcmp(argv0, "import") == 0){
 		fd = callexport(argv[0], argv[1]);
 		if(argc == 2)
 			famount(fd, rpc, argv[1], flags, "");
 		else if(argc == 3)
 			famount(fd, rpc, argv[2], flags, "");
 		close(fd);
-	} else if(strcmp(argv0, "cd") == 0 && argc == 1)
+	}else if(strcmp(argv0, "cd") == 0 && argc == 1){
 		if(chdir(argv[0]) == 0 && *argv[0] == '/')
 			cdroot = 1;
+	}
 	return cdroot;
 }
 
@@ -221,25 +237,67 @@ callexport(char *sys, char *tree)
 	return fd;
 }
 
+static char*
+unquote(char *s)
+{
+	char *r, *w;
+	int inquote;
+	
+	inquote = 0;
+	for(r=w=s; *r; r++){
+		if(*r != '\''){
+			*w++ = *r;
+			continue;
+		}
+		if(inquote){
+			if(*(r+1) == '\''){
+				*w++ = '\'';
+				r++;
+			}else
+				inquote = 0;
+		}else
+			inquote = 1;
+	}
+	*w = 0;
+	return s;
+}
+
 static int
 splitargs(char *p, char *argv[], char *argbuf, int nargv)
 {
 	char *q;
 	int i, n;
 
-	n = gettokens(p, argv, nargv, " \t'\r");
+	n = gettokens(p, argv, nargv, " \t\r");
 	if(n == nargv)
 		return 0;
 	for(i = 0; i < n; i++){
 		q = argv[i];
 		argv[i] = argbuf;
 		argbuf = expandarg(q, argbuf);
-		if(!argbuf)
+		if(argbuf == nil)
 			return 0;
+		unquote(argv[i]);
 	}
 	return n;
 }
 
+static char*
+nextdollar(char *arg)
+{
+	char *p;
+	int inquote;
+	
+	inquote = 0;
+	for(p=arg; *p; p++){
+		if(*p == '\'')
+			inquote = !inquote;
+		if(*p == '$' && !inquote)
+			return p;
+	}
+	return nil;
+}
+
 /*
  * copy the arg into the buffer,
  * expanding any environment variables.
@@ -253,29 +311,22 @@ splitargs(char *p, char *argv[], char *argbuf, int nargv)
 static char *
 expandarg(char *arg, char *buf)
 {
-	char env[3+ANAMELEN], *p, *q, *x;
+	char env[3+ANAMELEN], *p, *x;
 	int fd, n, len;
 
 	n = 0;
-	while(p = utfrune(arg, L'$')){
+	while(p = nextdollar(arg)){
 		len = p - arg;
 		if(n + len + ANAMELEN >= MAXARG-1)
 			return 0;
 		memmove(&buf[n], arg, len);
 		n += len;
 		p++;
-		arg = utfrune(p, L'\0');
-		q = utfrune(p, L'/');
-		if(q && q < arg)
-			arg = q;
-		q = utfrune(p, L'.');
-		if(q && q < arg)
-			arg = q;
-		q = utfrune(p, L'$');
-		if(q && q < arg)
-			arg = q;
+		arg = strpbrk(p, "/.!'$");
+		if(arg == nil)
+			arg = p+strlen(p);
 		len = arg - p;
-		if(len >= ANAMELEN)
+		if(len == 0 || len >= ANAMELEN)
 			continue;
 		strcpy(env, "#e/");
 		strncpy(env+3, p, len);