Browse Source

Plan 9 from Bell Labs 2005-05-23

David du Colombier 15 years ago
parent
commit
e2476ed1b9

+ 1 - 0
adm/timezone/Argentina

@@ -0,0 +1 @@
+ART -10800 ART -10800

+ 28 - 27
dist/replica/_plan9.db

@@ -30,7 +30,7 @@
 386/bin/ape/expr - 775 sys sys 1087442502 142097
 386/bin/ape/kill - 775 sys sys 1087442503 138039
 386/bin/ape/make - 775 sys sys 1094040081 208922
-386/bin/ape/patch - 775 sys sys 1094040082 302353
+386/bin/ape/patch - 775 sys sys 1116815420 302362
 386/bin/ape/psh - 775 sys sys 1042220689 34
 386/bin/ape/sed - 775 sys sys 1087442504 158112
 386/bin/ape/sh - 775 sys sys 1094040083 477044
@@ -110,7 +110,7 @@
 386/bin/aux/listen - 775 sys sys 1115950042 106884
 386/bin/aux/listen1 - 775 sys sys 1115950042 93419
 386/bin/aux/lpdaemon - 775 sys sys 1094040084 168085
-386/bin/aux/lpdsend - 775 sys sys 1087442507 153635
+386/bin/aux/lpdsend - 775 sys sys 1116815421 153582
 386/bin/aux/lpsend - 775 sys sys 1115950042 52540
 386/bin/aux/mapd - 775 sys sys 1115950043 190746
 386/bin/aux/mkflashfs - 775 sys sys 1115950043 67357
@@ -522,7 +522,7 @@
 386/lib - 20000000775 sys sys 1016826328 0
 386/lib/ape - 20000000775 sys sys 944969312 0
 386/lib/ape/lib9.a - 664 sys sys 1038237538 6378
-386/lib/ape/libap.a - 664 sys sys 1094040118 808954
+386/lib/ape/libap.a - 664 sys sys 1116815422 808982
 386/lib/ape/libbsd.a - 664 sys sys 1094040118 179308
 386/lib/ape/libdraw.a - 664 sys sys 1115950149 573764
 386/lib/ape/libfmt.a - 664 sys sys 1089402371 147204
@@ -556,7 +556,7 @@
 386/lib/libndb.a - 664 sys sys 1115950157 60666
 386/lib/libplumb.a - 664 sys sys 1115950157 18876
 386/lib/libregexp.a - 664 sys sys 1115950157 37464
-386/lib/libscribble.a - 664 sys sys 1115950158 107280
+386/lib/libscribble.a - 664 sys sys 1116815422 107282
 386/lib/libsec.a - 664 sys sys 1115950159 643998
 386/lib/libstdio.a - 664 sys sys 1115950159 126206
 386/lib/libsunrpc.a - 664 sys sys 1115950160 355994
@@ -722,6 +722,7 @@ adm/keys.who - 664 adm adm 1020313578 0
 adm/netkeys - 660 adm adm 1020313578 0
 adm/netkeys.who - 664 adm adm 1020313578 0
 adm/timezone - 20000000775 adm adm 1014921100 0
+adm/timezone/Argentina - 664 adm adm 1116737181 22
 adm/timezone/Australia_ACT - 664 adm adm 1020369287 1483
 adm/timezone/Australia_Broken-Hill - 664 adm adm 1020369287 1483
 adm/timezone/Australia_LHI - 664 adm adm 1020313575 1483
@@ -5440,7 +5441,7 @@ rc/bin/nroff - 775 sys sys 945617208 27
 rc/bin/patch - 20000000775 sys sys 1067803227 0
 rc/bin/patch/applied - 775 sys sys 1115941614 111
 rc/bin/patch/apply - 775 sys sys 1109511606 1285
-rc/bin/patch/create - 775 sys sys 1107957505 1404
+rc/bin/patch/create - 775 sys sys 1116737281 1428
 rc/bin/patch/diff - 775 sys sys 1109511606 474
 rc/bin/patch/email - 775 sys sys 1109511607 409
 rc/bin/patch/list - 775 sys sys 1115941576 749
@@ -8583,7 +8584,7 @@ sys/src/ape/lib/ap/plan9/sleep.c - 664 sys sys 1014921985 222
 sys/src/ape/lib/ap/plan9/sqrt.c - 664 sys sys 1014921985 759
 sys/src/ape/lib/ap/plan9/stat.c - 664 sys sys 1014921984 284
 sys/src/ape/lib/ap/plan9/sys9.h - 664 sys sys 1048644336 4251
-sys/src/ape/lib/ap/plan9/system.c - 664 sys sys 1014921983 582
+sys/src/ape/lib/ap/plan9/system.c - 664 sys sys 1116769994 595
 sys/src/ape/lib/ap/plan9/tcgetattr.c - 664 sys sys 1038237528 3070
 sys/src/ape/lib/ap/plan9/time.c - 664 sys sys 1048644336 380
 sys/src/ape/lib/ap/plan9/times.c - 664 sys sys 1014921984 730
@@ -9085,7 +9086,7 @@ sys/src/cmd/5l/span.c - 664 sys sys 1089299172 16642
 sys/src/cmd/7a - 20000000775 sys sys 944961626 0
 sys/src/cmd/7a/a.h - 664 sys sys 944961626 3088
 sys/src/cmd/7a/a.y - 664 sys sys 944961626 6581
-sys/src/cmd/7a/lex.c - 664 sys sys 1067725160 12389
+sys/src/cmd/7a/lex.c - 664 sys sys 1116769919 12410
 sys/src/cmd/7a/mkfile - 664 sys sys 944961626 202
 sys/src/cmd/7c - 20000000775 sys sys 954038668 0
 sys/src/cmd/7c/7.out.h - 664 sys sys 1089299276 2660
@@ -9317,7 +9318,7 @@ sys/src/cmd/auth/login.c - 664 sys sys 1107370153 3977
 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/none.c - 664 sys sys 1071334976 744
+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
 sys/src/cmd/auth/pemencode.c - 664 sys sys 1048614963 998
@@ -9496,7 +9497,7 @@ sys/src/cmd/aux/olefs.c - 664 sys sys 1071245775 9853
 sys/src/cmd/aux/pcmcia.c - 664 sys sys 1099761153 9213
 sys/src/cmd/aux/portmap.c - 664 sys sys 1049776133 3617
 sys/src/cmd/aux/rdwr.c - 664 sys sys 1016833876 811
-sys/src/cmd/aux/reboot.c - 664 sys sys 1014925091 1411
+sys/src/cmd/aux/reboot.c - 664 sys sys 1116769521 1429
 sys/src/cmd/aux/searchfs.c - 664 sys sys 1014925091 18176
 sys/src/cmd/aux/stub.c - 664 sys sys 1098196222 2723
 sys/src/cmd/aux/timesync.c - 664 sys sys 1107448970 25758
@@ -9530,7 +9531,7 @@ sys/src/cmd/aux/vga/io.c - 664 sys sys 1014925009 6222
 sys/src/cmd/aux/vga/mach32.c - 664 sys sys 1014925009 6004
 sys/src/cmd/aux/vga/mach64.c - 664 sys sys 1014925009 8279
 sys/src/cmd/aux/vga/mach64xx.c - 664 sys sys 1097900455 30266
-sys/src/cmd/aux/vga/main.c - 664 sys sys 1115734902 9535
+sys/src/cmd/aux/vga/main.c - 664 sys sys 1116769799 9583
 sys/src/cmd/aux/vga/mga2164w.c - 664 sys sys 1014925010 13196
 sys/src/cmd/aux/vga/mga4xx.c - 664 sys sys 1014925010 35895
 sys/src/cmd/aux/vga/mkfile - 664 sys sys 1115734903 927
@@ -9570,7 +9571,7 @@ sys/src/cmd/aux/vga/vmware.c - 664 sys sys 1020313485 4907
 sys/src/cmd/aux/vga/w30c516.c - 664 sys sys 1014925014 3158
 sys/src/cmd/aux/write.c - 664 sys sys 944960778 471
 sys/src/cmd/aux/zerotrunc.c - 664 sys sys 1063855383 318
-sys/src/cmd/awd.c - 664 sys sys 944961364 567
+sys/src/cmd/awd.c - 664 sys sys 1116815657 661
 sys/src/cmd/awk - 20000000775 sys sys 944964677 0
 sys/src/cmd/awk/awk.h - 664 sys sys 944960803 4624
 sys/src/cmd/awk/awkgram.y - 664 sys sys 944960803 13930
@@ -9604,7 +9605,7 @@ sys/src/cmd/bzip2/README - 664 sys sys 964847955 6510
 sys/src/cmd/bzip2/README.Plan9 - 664 sys sys 964847955 250
 sys/src/cmd/bzip2/bunzip2.c - 664 sys sys 1021579994 3456
 sys/src/cmd/bzip2/bzip2.c - 664 sys sys 1014926197 3459
-sys/src/cmd/bzip2/bzip2recover.c - 664 sys sys 964847955 12291
+sys/src/cmd/bzip2/bzip2recover.c - 664 sys sys 1116769301 12345
 sys/src/cmd/bzip2/lib - 20000000775 sys sys 964847967 0
 sys/src/cmd/bzip2/lib/blocksort.c - 664 sys sys 964847962 32245
 sys/src/cmd/bzip2/lib/buffcompress.c - 664 sys sys 964847962 4573
@@ -9635,7 +9636,7 @@ sys/src/cmd/bzip2/lib/randtable.c - 664 sys sys 964847967 5473
 sys/src/cmd/bzip2/lib/unix.h - 664 sys sys 964847967 136
 sys/src/cmd/bzip2/mkfile - 664 sys sys 969510789 881
 sys/src/cmd/cal.c - 664 sys sys 944961619 4206
-sys/src/cmd/calendar.c - 664 sys sys 1104939757 4205
+sys/src/cmd/calendar.c - 664 sys sys 1116769436 4221
 sys/src/cmd/cat.c - 664 sys sys 1014926693 532
 sys/src/cmd/cb - 20000000775 sys sys 1062860425 0
 sys/src/cmd/cb/cb.c - 664 sys sys 1063039630 18439
@@ -9716,7 +9717,7 @@ sys/src/cmd/cpp/include.c - 664 sys sys 959299274 2845
 sys/src/cmd/cpp/lex.c - 664 sys sys 1097900427 13595
 sys/src/cmd/cpp/macro.c - 664 sys sys 1014925275 10893
 sys/src/cmd/cpp/mkfile - 664 sys sys 944960879 178
-sys/src/cmd/cpp/nlist.c - 664 sys sys 944960879 4631
+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 1084471915 20651
@@ -11808,7 +11809,7 @@ sys/src/cmd/gzip/unzip.c - 664 sys sys 1050689595 13603
 sys/src/cmd/gzip/zip.c - 664 sys sys 1033183074 7054
 sys/src/cmd/gzip/zip.h - 664 sys sys 954778719 1428
 sys/src/cmd/hget.c - 664 sys sys 1091129591 25650
-sys/src/cmd/history.c - 664 sys sys 1109607291 6008
+sys/src/cmd/history.c - 664 sys sys 1116770200 6046
 sys/src/cmd/hoc - 20000000775 sys sys 954036932 0
 sys/src/cmd/hoc/code.c - 664 sys sys 944961000 10041
 sys/src/cmd/hoc/hoc.h - 664 sys sys 944960999 2358
@@ -11827,7 +11828,7 @@ sys/src/cmd/htmlfmt/mkfile - 664 sys sys 1034015650 297
 sys/src/cmd/htmlfmt/util.c - 664 sys sys 1015364025 1765
 sys/src/cmd/iconv.c - 664 sys sys 1039753035 1801
 sys/src/cmd/idiff.c - 664 sys sys 1014926695 6896
-sys/src/cmd/import.c - 664 sys sys 1084471566 6848
+sys/src/cmd/import.c - 664 sys sys 1116770242 6882
 sys/src/cmd/init.c - 664 sys sys 1071873627 4452
 sys/src/cmd/iostats - 20000000775 sys sys 944962001 0
 sys/src/cmd/iostats/iostats.c - 664 sys sys 1014925727 9691
@@ -11849,10 +11850,10 @@ sys/src/cmd/ip/dhcpd/ping.c - 664 sys sys 956275654 1881
 sys/src/cmd/ip/dhcpd/testlook.c - 664 sys sys 950389140 4640
 sys/src/cmd/ip/dhcpd/testlookup.c - 664 sys sys 950389140 3195
 sys/src/cmd/ip/dhcpd/testping.c - 664 sys sys 950389141 352
-sys/src/cmd/ip/ftpd.c - 664 sys sys 1101155057 33054
+sys/src/cmd/ip/ftpd.c - 664 sys sys 1116769890 33079
 sys/src/cmd/ip/ftpfs - 20000000775 sys sys 1014925642 0
 sys/src/cmd/ip/ftpfs/file.c - 664 sys sys 1014925642 4208
-sys/src/cmd/ip/ftpfs/ftpfs.c - 664 sys sys 1112563388 13760
+sys/src/cmd/ip/ftpfs/ftpfs.c - 664 sys sys 1116737713 13860
 sys/src/cmd/ip/ftpfs/ftpfs.h - 664 sys sys 1091904423 2353
 sys/src/cmd/ip/ftpfs/mkfile - 664 sys sys 1048312050 173
 sys/src/cmd/ip/ftpfs/proto.c - 664 sys sys 1112563713 30346
@@ -12069,7 +12070,7 @@ sys/src/cmd/lp/LOCK.c - 664 sys sys 1015090023 1066
 sys/src/cmd/lp/ipcopen.c - 664 sys sys 944961017 1607
 sys/src/cmd/lp/lp.rc - 775 sys sys 1022050028 5357
 sys/src/cmd/lp/lpdaemon.c - 664 sys sys 1032060412 10000
-sys/src/cmd/lp/lpdsend.c - 664 sys sys 1039145206 9527
+sys/src/cmd/lp/lpdsend.c - 664 sys sys 1116770113 9583
 sys/src/cmd/lp/lpsend.c - 664 sys sys 1015090024 6180
 sys/src/cmd/lp/lpsend.rc - 775 sys sys 953344615 361
 sys/src/cmd/lp/mkfile - 664 sys sys 953344616 535
@@ -12804,9 +12805,9 @@ sys/src/cmd/spin/tl_rewrt.c - 664 sys sys 953242989 6257
 sys/src/cmd/spin/tl_trans.c - 664 sys sys 953242990 16758
 sys/src/cmd/spin/vars.c - 664 sys sys 953242990 8412
 sys/src/cmd/spin/version.h - 664 sys sys 956275780 54
-sys/src/cmd/split.c - 664 sys sys 1038183077 3219
+sys/src/cmd/split.c - 664 sys sys 1116770353 3225
 sys/src/cmd/srv.c - 664 sys sys 1074452607 3885
-sys/src/cmd/srvfs.c - 664 sys sys 1100524152 1672
+sys/src/cmd/srvfs.c - 664 sys sys 1116770384 1702
 sys/src/cmd/srvold9p - 20000000775 sys sys 1016921011 0
 sys/src/cmd/srvold9p/9p1.h - 664 sys sys 1016921010 2413
 sys/src/cmd/srvold9p/9p1lib.c - 664 sys sys 1016921010 11446
@@ -12966,7 +12967,7 @@ sys/src/cmd/troff/n8.c - 664 sys sys 944961294 10197
 sys/src/cmd/troff/n9.c - 664 sys sys 944961294 9076
 sys/src/cmd/troff/ni.c - 664 sys sys 944961294 8492
 sys/src/cmd/troff/suftab.c - 664 sys sys 944961294 19337
-sys/src/cmd/troff/t10.c - 664 sys sys 944961294 9426
+sys/src/cmd/troff/t10.c - 664 sys sys 1116769866 9493
 sys/src/cmd/troff/t11.c - 664 sys sys 944961294 7081
 sys/src/cmd/troff/t6.c - 664 sys sys 944961294 15408
 sys/src/cmd/troff/tdef.h - 664 sys sys 984718894 18334
@@ -13246,7 +13247,7 @@ sys/src/cmd/upas/common/aux.c - 664 sys sys 1019498851 2300
 sys/src/cmd/upas/common/become.c - 664 sys sys 1015009623 430
 sys/src/cmd/upas/common/common.h - 664 sys sys 1098803897 2040
 sys/src/cmd/upas/common/config.c - 664 sys sys 944961316 254
-sys/src/cmd/upas/common/libsys.c - 664 sys sys 1113742071 14491
+sys/src/cmd/upas/common/libsys.c - 664 sys sys 1116769961 14510
 sys/src/cmd/upas/common/mail.c - 664 sys sys 944961315 1346
 sys/src/cmd/upas/common/makefile - 664 sys sys 944961315 366
 sys/src/cmd/upas/common/mkfile - 664 sys sys 1075069142 273
@@ -13310,7 +13311,7 @@ sys/src/cmd/upas/q/runq.c - 664 sys sys 1113742021 13233
 sys/src/cmd/upas/scanmail - 20000000775 sys sys 988250021 0
 sys/src/cmd/upas/scanmail/common.c - 664 sys sys 1015013177 12385
 sys/src/cmd/upas/scanmail/mkfile - 664 sys sys 1064589604 334
-sys/src/cmd/upas/scanmail/scanmail.c - 664 sys sys 1048645272 8717
+sys/src/cmd/upas/scanmail/scanmail.c - 664 sys sys 1116769691 8742
 sys/src/cmd/upas/scanmail/spam.h - 664 sys sys 988225303 1131
 sys/src/cmd/upas/scanmail/testscan.c - 664 sys sys 988225303 3497
 sys/src/cmd/upas/send - 20000000775 sys sys 1016904916 0
@@ -13318,7 +13319,7 @@ sys/src/cmd/upas/send/authorize.c - 664 sys sys 944961322 569
 sys/src/cmd/upas/send/bind.c - 664 sys sys 944961322 3252
 sys/src/cmd/upas/send/cat_mail.c - 664 sys sys 1016904916 1190
 sys/src/cmd/upas/send/dest.c - 664 sys sys 1109511268 4789
-sys/src/cmd/upas/send/filter.c - 664 sys sys 988225293 2292
+sys/src/cmd/upas/send/filter.c - 664 sys sys 1116769185 2311
 sys/src/cmd/upas/send/gateway.c - 664 sys sys 944961322 499
 sys/src/cmd/upas/send/local.c - 664 sys sys 1031707305 2584
 sys/src/cmd/upas/send/log.c - 664 sys sys 944961322 2090
@@ -13590,7 +13591,7 @@ sys/src/cmd/wikifs/wiki2html.c - 664 sys sys 1018211094 815
 sys/src/cmd/wikifs/wiki2text.c - 664 sys sys 1018211094 779
 sys/src/cmd/winwatch.c - 664 sys sys 1113312596 4869
 sys/src/cmd/xd.c - 664 sys sys 944961355 5735
-sys/src/cmd/yacc.c - 664 sys sys 984717754 57876
+sys/src/cmd/yacc.c - 664 sys sys 1116770313 57945
 sys/src/fs - 20000000775 sys sys 1015110109 0
 sys/src/fs/choline - 20000000775 sys sys 1015110109 0
 sys/src/fs/choline/9cholinefs.c - 664 sys sys 1041361226 2962
@@ -14647,7 +14648,7 @@ sys/src/libregexp/regsub.c - 664 sys sys 988225293 1133
 sys/src/libregexp/rregexec.c - 664 sys sys 1058129062 4671
 sys/src/libregexp/rregsub.c - 664 sys sys 988225293 1156
 sys/src/libscribble - 20000000775 sys sys 985636319 0
-sys/src/libscribble/graffiti.c - 664 sys sys 1014930922 7336
+sys/src/libscribble/graffiti.c - 664 sys sys 1116769753 7344
 sys/src/libscribble/graffiti.h - 664 sys sys 985554011 735
 sys/src/libscribble/hre_api.c - 664 sys sys 1091904427 27302
 sys/src/libscribble/hre_internal.h - 664 sys sys 1091904427 5155

+ 28 - 27
dist/replica/plan9.db

@@ -30,7 +30,7 @@
 386/bin/ape/expr - 775 sys sys 1087442502 142097
 386/bin/ape/kill - 775 sys sys 1087442503 138039
 386/bin/ape/make - 775 sys sys 1094040081 208922
-386/bin/ape/patch - 775 sys sys 1094040082 302353
+386/bin/ape/patch - 775 sys sys 1116815420 302362
 386/bin/ape/psh - 775 sys sys 1042220689 34
 386/bin/ape/sed - 775 sys sys 1087442504 158112
 386/bin/ape/sh - 775 sys sys 1094040083 477044
@@ -110,7 +110,7 @@
 386/bin/aux/listen - 775 sys sys 1115950042 106884
 386/bin/aux/listen1 - 775 sys sys 1115950042 93419
 386/bin/aux/lpdaemon - 775 sys sys 1094040084 168085
-386/bin/aux/lpdsend - 775 sys sys 1087442507 153635
+386/bin/aux/lpdsend - 775 sys sys 1116815421 153582
 386/bin/aux/lpsend - 775 sys sys 1115950042 52540
 386/bin/aux/mapd - 775 sys sys 1115950043 190746
 386/bin/aux/mkflashfs - 775 sys sys 1115950043 67357
@@ -522,7 +522,7 @@
 386/lib - 20000000775 sys sys 1016826328 0
 386/lib/ape - 20000000775 sys sys 944969312 0
 386/lib/ape/lib9.a - 664 sys sys 1038237538 6378
-386/lib/ape/libap.a - 664 sys sys 1094040118 808954
+386/lib/ape/libap.a - 664 sys sys 1116815422 808982
 386/lib/ape/libbsd.a - 664 sys sys 1094040118 179308
 386/lib/ape/libdraw.a - 664 sys sys 1115950149 573764
 386/lib/ape/libfmt.a - 664 sys sys 1089402371 147204
@@ -556,7 +556,7 @@
 386/lib/libndb.a - 664 sys sys 1115950157 60666
 386/lib/libplumb.a - 664 sys sys 1115950157 18876
 386/lib/libregexp.a - 664 sys sys 1115950157 37464
-386/lib/libscribble.a - 664 sys sys 1115950158 107280
+386/lib/libscribble.a - 664 sys sys 1116815422 107282
 386/lib/libsec.a - 664 sys sys 1115950159 643998
 386/lib/libstdio.a - 664 sys sys 1115950159 126206
 386/lib/libsunrpc.a - 664 sys sys 1115950160 355994
@@ -722,6 +722,7 @@ adm/keys.who - 664 adm adm 1020313578 0
 adm/netkeys - 660 adm adm 1020313578 0
 adm/netkeys.who - 664 adm adm 1020313578 0
 adm/timezone - 20000000775 adm adm 1014921100 0
+adm/timezone/Argentina - 664 adm adm 1116737181 22
 adm/timezone/Australia_ACT - 664 adm adm 1020369287 1483
 adm/timezone/Australia_Broken-Hill - 664 adm adm 1020369287 1483
 adm/timezone/Australia_LHI - 664 adm adm 1020313575 1483
@@ -5440,7 +5441,7 @@ rc/bin/nroff - 775 sys sys 945617208 27
 rc/bin/patch - 20000000775 sys sys 1067803227 0
 rc/bin/patch/applied - 775 sys sys 1115941614 111
 rc/bin/patch/apply - 775 sys sys 1109511606 1285
-rc/bin/patch/create - 775 sys sys 1107957505 1404
+rc/bin/patch/create - 775 sys sys 1116737281 1428
 rc/bin/patch/diff - 775 sys sys 1109511606 474
 rc/bin/patch/email - 775 sys sys 1109511607 409
 rc/bin/patch/list - 775 sys sys 1115941576 749
@@ -8583,7 +8584,7 @@ sys/src/ape/lib/ap/plan9/sleep.c - 664 sys sys 1014921985 222
 sys/src/ape/lib/ap/plan9/sqrt.c - 664 sys sys 1014921985 759
 sys/src/ape/lib/ap/plan9/stat.c - 664 sys sys 1014921984 284
 sys/src/ape/lib/ap/plan9/sys9.h - 664 sys sys 1048644336 4251
-sys/src/ape/lib/ap/plan9/system.c - 664 sys sys 1014921983 582
+sys/src/ape/lib/ap/plan9/system.c - 664 sys sys 1116769994 595
 sys/src/ape/lib/ap/plan9/tcgetattr.c - 664 sys sys 1038237528 3070
 sys/src/ape/lib/ap/plan9/time.c - 664 sys sys 1048644336 380
 sys/src/ape/lib/ap/plan9/times.c - 664 sys sys 1014921984 730
@@ -9085,7 +9086,7 @@ sys/src/cmd/5l/span.c - 664 sys sys 1089299172 16642
 sys/src/cmd/7a - 20000000775 sys sys 944961626 0
 sys/src/cmd/7a/a.h - 664 sys sys 944961626 3088
 sys/src/cmd/7a/a.y - 664 sys sys 944961626 6581
-sys/src/cmd/7a/lex.c - 664 sys sys 1067725160 12389
+sys/src/cmd/7a/lex.c - 664 sys sys 1116769919 12410
 sys/src/cmd/7a/mkfile - 664 sys sys 944961626 202
 sys/src/cmd/7c - 20000000775 sys sys 954038668 0
 sys/src/cmd/7c/7.out.h - 664 sys sys 1089299276 2660
@@ -9317,7 +9318,7 @@ sys/src/cmd/auth/login.c - 664 sys sys 1107370153 3977
 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/none.c - 664 sys sys 1071334976 744
+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
 sys/src/cmd/auth/pemencode.c - 664 sys sys 1048614963 998
@@ -9496,7 +9497,7 @@ sys/src/cmd/aux/olefs.c - 664 sys sys 1071245775 9853
 sys/src/cmd/aux/pcmcia.c - 664 sys sys 1099761153 9213
 sys/src/cmd/aux/portmap.c - 664 sys sys 1049776133 3617
 sys/src/cmd/aux/rdwr.c - 664 sys sys 1016833876 811
-sys/src/cmd/aux/reboot.c - 664 sys sys 1014925091 1411
+sys/src/cmd/aux/reboot.c - 664 sys sys 1116769521 1429
 sys/src/cmd/aux/searchfs.c - 664 sys sys 1014925091 18176
 sys/src/cmd/aux/stub.c - 664 sys sys 1098196222 2723
 sys/src/cmd/aux/timesync.c - 664 sys sys 1107448970 25758
@@ -9530,7 +9531,7 @@ sys/src/cmd/aux/vga/io.c - 664 sys sys 1014925009 6222
 sys/src/cmd/aux/vga/mach32.c - 664 sys sys 1014925009 6004
 sys/src/cmd/aux/vga/mach64.c - 664 sys sys 1014925009 8279
 sys/src/cmd/aux/vga/mach64xx.c - 664 sys sys 1097900455 30266
-sys/src/cmd/aux/vga/main.c - 664 sys sys 1115734902 9535
+sys/src/cmd/aux/vga/main.c - 664 sys sys 1116769799 9583
 sys/src/cmd/aux/vga/mga2164w.c - 664 sys sys 1014925010 13196
 sys/src/cmd/aux/vga/mga4xx.c - 664 sys sys 1014925010 35895
 sys/src/cmd/aux/vga/mkfile - 664 sys sys 1115734903 927
@@ -9570,7 +9571,7 @@ sys/src/cmd/aux/vga/vmware.c - 664 sys sys 1020313485 4907
 sys/src/cmd/aux/vga/w30c516.c - 664 sys sys 1014925014 3158
 sys/src/cmd/aux/write.c - 664 sys sys 944960778 471
 sys/src/cmd/aux/zerotrunc.c - 664 sys sys 1063855383 318
-sys/src/cmd/awd.c - 664 sys sys 944961364 567
+sys/src/cmd/awd.c - 664 sys sys 1116815657 661
 sys/src/cmd/awk - 20000000775 sys sys 944964677 0
 sys/src/cmd/awk/awk.h - 664 sys sys 944960803 4624
 sys/src/cmd/awk/awkgram.y - 664 sys sys 944960803 13930
@@ -9604,7 +9605,7 @@ sys/src/cmd/bzip2/README - 664 sys sys 964847955 6510
 sys/src/cmd/bzip2/README.Plan9 - 664 sys sys 964847955 250
 sys/src/cmd/bzip2/bunzip2.c - 664 sys sys 1021579994 3456
 sys/src/cmd/bzip2/bzip2.c - 664 sys sys 1014926197 3459
-sys/src/cmd/bzip2/bzip2recover.c - 664 sys sys 964847955 12291
+sys/src/cmd/bzip2/bzip2recover.c - 664 sys sys 1116769301 12345
 sys/src/cmd/bzip2/lib - 20000000775 sys sys 964847967 0
 sys/src/cmd/bzip2/lib/blocksort.c - 664 sys sys 964847962 32245
 sys/src/cmd/bzip2/lib/buffcompress.c - 664 sys sys 964847962 4573
@@ -9635,7 +9636,7 @@ sys/src/cmd/bzip2/lib/randtable.c - 664 sys sys 964847967 5473
 sys/src/cmd/bzip2/lib/unix.h - 664 sys sys 964847967 136
 sys/src/cmd/bzip2/mkfile - 664 sys sys 969510789 881
 sys/src/cmd/cal.c - 664 sys sys 944961619 4206
-sys/src/cmd/calendar.c - 664 sys sys 1104939757 4205
+sys/src/cmd/calendar.c - 664 sys sys 1116769436 4221
 sys/src/cmd/cat.c - 664 sys sys 1014926693 532
 sys/src/cmd/cb - 20000000775 sys sys 1062860425 0
 sys/src/cmd/cb/cb.c - 664 sys sys 1063039630 18439
@@ -9716,7 +9717,7 @@ sys/src/cmd/cpp/include.c - 664 sys sys 959299274 2845
 sys/src/cmd/cpp/lex.c - 664 sys sys 1097900427 13595
 sys/src/cmd/cpp/macro.c - 664 sys sys 1014925275 10893
 sys/src/cmd/cpp/mkfile - 664 sys sys 944960879 178
-sys/src/cmd/cpp/nlist.c - 664 sys sys 944960879 4631
+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 1084471915 20651
@@ -11808,7 +11809,7 @@ sys/src/cmd/gzip/unzip.c - 664 sys sys 1050689595 13603
 sys/src/cmd/gzip/zip.c - 664 sys sys 1033183074 7054
 sys/src/cmd/gzip/zip.h - 664 sys sys 954778719 1428
 sys/src/cmd/hget.c - 664 sys sys 1091129591 25650
-sys/src/cmd/history.c - 664 sys sys 1109607291 6008
+sys/src/cmd/history.c - 664 sys sys 1116770200 6046
 sys/src/cmd/hoc - 20000000775 sys sys 954036932 0
 sys/src/cmd/hoc/code.c - 664 sys sys 944961000 10041
 sys/src/cmd/hoc/hoc.h - 664 sys sys 944960999 2358
@@ -11827,7 +11828,7 @@ sys/src/cmd/htmlfmt/mkfile - 664 sys sys 1034015650 297
 sys/src/cmd/htmlfmt/util.c - 664 sys sys 1015364025 1765
 sys/src/cmd/iconv.c - 664 sys sys 1039753035 1801
 sys/src/cmd/idiff.c - 664 sys sys 1014926695 6896
-sys/src/cmd/import.c - 664 sys sys 1084471566 6848
+sys/src/cmd/import.c - 664 sys sys 1116770242 6882
 sys/src/cmd/init.c - 664 sys sys 1071873627 4452
 sys/src/cmd/iostats - 20000000775 sys sys 944962001 0
 sys/src/cmd/iostats/iostats.c - 664 sys sys 1014925727 9691
@@ -11849,10 +11850,10 @@ sys/src/cmd/ip/dhcpd/ping.c - 664 sys sys 956275654 1881
 sys/src/cmd/ip/dhcpd/testlook.c - 664 sys sys 950389140 4640
 sys/src/cmd/ip/dhcpd/testlookup.c - 664 sys sys 950389140 3195
 sys/src/cmd/ip/dhcpd/testping.c - 664 sys sys 950389141 352
-sys/src/cmd/ip/ftpd.c - 664 sys sys 1101155057 33054
+sys/src/cmd/ip/ftpd.c - 664 sys sys 1116769890 33079
 sys/src/cmd/ip/ftpfs - 20000000775 sys sys 1014925642 0
 sys/src/cmd/ip/ftpfs/file.c - 664 sys sys 1014925642 4208
-sys/src/cmd/ip/ftpfs/ftpfs.c - 664 sys sys 1112563388 13760
+sys/src/cmd/ip/ftpfs/ftpfs.c - 664 sys sys 1116737713 13860
 sys/src/cmd/ip/ftpfs/ftpfs.h - 664 sys sys 1091904423 2353
 sys/src/cmd/ip/ftpfs/mkfile - 664 sys sys 1048312050 173
 sys/src/cmd/ip/ftpfs/proto.c - 664 sys sys 1112563713 30346
@@ -12069,7 +12070,7 @@ sys/src/cmd/lp/LOCK.c - 664 sys sys 1015090023 1066
 sys/src/cmd/lp/ipcopen.c - 664 sys sys 944961017 1607
 sys/src/cmd/lp/lp.rc - 775 sys sys 1022050028 5357
 sys/src/cmd/lp/lpdaemon.c - 664 sys sys 1032060412 10000
-sys/src/cmd/lp/lpdsend.c - 664 sys sys 1039145206 9527
+sys/src/cmd/lp/lpdsend.c - 664 sys sys 1116770113 9583
 sys/src/cmd/lp/lpsend.c - 664 sys sys 1015090024 6180
 sys/src/cmd/lp/lpsend.rc - 775 sys sys 953344615 361
 sys/src/cmd/lp/mkfile - 664 sys sys 953344616 535
@@ -12804,9 +12805,9 @@ sys/src/cmd/spin/tl_rewrt.c - 664 sys sys 953242989 6257
 sys/src/cmd/spin/tl_trans.c - 664 sys sys 953242990 16758
 sys/src/cmd/spin/vars.c - 664 sys sys 953242990 8412
 sys/src/cmd/spin/version.h - 664 sys sys 956275780 54
-sys/src/cmd/split.c - 664 sys sys 1038183077 3219
+sys/src/cmd/split.c - 664 sys sys 1116770353 3225
 sys/src/cmd/srv.c - 664 sys sys 1074452607 3885
-sys/src/cmd/srvfs.c - 664 sys sys 1100524152 1672
+sys/src/cmd/srvfs.c - 664 sys sys 1116770384 1702
 sys/src/cmd/srvold9p - 20000000775 sys sys 1016921011 0
 sys/src/cmd/srvold9p/9p1.h - 664 sys sys 1016921010 2413
 sys/src/cmd/srvold9p/9p1lib.c - 664 sys sys 1016921010 11446
@@ -12966,7 +12967,7 @@ sys/src/cmd/troff/n8.c - 664 sys sys 944961294 10197
 sys/src/cmd/troff/n9.c - 664 sys sys 944961294 9076
 sys/src/cmd/troff/ni.c - 664 sys sys 944961294 8492
 sys/src/cmd/troff/suftab.c - 664 sys sys 944961294 19337
-sys/src/cmd/troff/t10.c - 664 sys sys 944961294 9426
+sys/src/cmd/troff/t10.c - 664 sys sys 1116769866 9493
 sys/src/cmd/troff/t11.c - 664 sys sys 944961294 7081
 sys/src/cmd/troff/t6.c - 664 sys sys 944961294 15408
 sys/src/cmd/troff/tdef.h - 664 sys sys 984718894 18334
@@ -13246,7 +13247,7 @@ sys/src/cmd/upas/common/aux.c - 664 sys sys 1019498851 2300
 sys/src/cmd/upas/common/become.c - 664 sys sys 1015009623 430
 sys/src/cmd/upas/common/common.h - 664 sys sys 1098803897 2040
 sys/src/cmd/upas/common/config.c - 664 sys sys 944961316 254
-sys/src/cmd/upas/common/libsys.c - 664 sys sys 1113742071 14491
+sys/src/cmd/upas/common/libsys.c - 664 sys sys 1116769961 14510
 sys/src/cmd/upas/common/mail.c - 664 sys sys 944961315 1346
 sys/src/cmd/upas/common/makefile - 664 sys sys 944961315 366
 sys/src/cmd/upas/common/mkfile - 664 sys sys 1075069142 273
@@ -13310,7 +13311,7 @@ sys/src/cmd/upas/q/runq.c - 664 sys sys 1113742021 13233
 sys/src/cmd/upas/scanmail - 20000000775 sys sys 988250021 0
 sys/src/cmd/upas/scanmail/common.c - 664 sys sys 1015013177 12385
 sys/src/cmd/upas/scanmail/mkfile - 664 sys sys 1064589604 334
-sys/src/cmd/upas/scanmail/scanmail.c - 664 sys sys 1048645272 8717
+sys/src/cmd/upas/scanmail/scanmail.c - 664 sys sys 1116769691 8742
 sys/src/cmd/upas/scanmail/spam.h - 664 sys sys 988225303 1131
 sys/src/cmd/upas/scanmail/testscan.c - 664 sys sys 988225303 3497
 sys/src/cmd/upas/send - 20000000775 sys sys 1016904916 0
@@ -13318,7 +13319,7 @@ sys/src/cmd/upas/send/authorize.c - 664 sys sys 944961322 569
 sys/src/cmd/upas/send/bind.c - 664 sys sys 944961322 3252
 sys/src/cmd/upas/send/cat_mail.c - 664 sys sys 1016904916 1190
 sys/src/cmd/upas/send/dest.c - 664 sys sys 1109511268 4789
-sys/src/cmd/upas/send/filter.c - 664 sys sys 988225293 2292
+sys/src/cmd/upas/send/filter.c - 664 sys sys 1116769185 2311
 sys/src/cmd/upas/send/gateway.c - 664 sys sys 944961322 499
 sys/src/cmd/upas/send/local.c - 664 sys sys 1031707305 2584
 sys/src/cmd/upas/send/log.c - 664 sys sys 944961322 2090
@@ -13590,7 +13591,7 @@ sys/src/cmd/wikifs/wiki2html.c - 664 sys sys 1018211094 815
 sys/src/cmd/wikifs/wiki2text.c - 664 sys sys 1018211094 779
 sys/src/cmd/winwatch.c - 664 sys sys 1113312596 4869
 sys/src/cmd/xd.c - 664 sys sys 944961355 5735
-sys/src/cmd/yacc.c - 664 sys sys 984717754 57876
+sys/src/cmd/yacc.c - 664 sys sys 1116770313 57945
 sys/src/fs - 20000000775 sys sys 1015110109 0
 sys/src/fs/choline - 20000000775 sys sys 1015110109 0
 sys/src/fs/choline/9cholinefs.c - 664 sys sys 1041361226 2962
@@ -14647,7 +14648,7 @@ sys/src/libregexp/regsub.c - 664 sys sys 988225293 1133
 sys/src/libregexp/rregexec.c - 664 sys sys 1058129062 4671
 sys/src/libregexp/rregsub.c - 664 sys sys 988225293 1156
 sys/src/libscribble - 20000000775 sys sys 985636319 0
-sys/src/libscribble/graffiti.c - 664 sys sys 1014930922 7336
+sys/src/libscribble/graffiti.c - 664 sys sys 1116769753 7344
 sys/src/libscribble/graffiti.h - 664 sys sys 985554011 735
 sys/src/libscribble/hre_api.c - 664 sys sys 1091904427 27302
 sys/src/libscribble/hre_internal.h - 664 sys sys 1091904427 5155

+ 29 - 0
dist/replica/plan9.log

@@ -19187,3 +19187,32 @@
 1116595814 5 c sys/src/cmd/aux/msexceltables.c - 664 sys sys 1116594581 13722
 1116595814 6 c sys/src/cmd/disk/format.c - 664 sys sys 1116595013 17648
 1116646225 0 c 386/bin/aux/msexceltables - 775 sys sys 1116644791 81249
+1116738043 0 a adm/timezone/Argentina - 664 adm adm 1116737181 22
+1116738043 1 c rc/bin/patch/create - 775 sys sys 1116737281 1428
+1116738043 2 c sys/src/cmd/ip/ftpfs/ftpfs.c - 664 sys sys 1116737713 13860
+1116770450 0 c sys/src/ape/lib/ap/plan9/system.c - 664 sys sys 1116769994 595
+1116770450 1 c sys/src/cmd/auth/none.c - 664 sys sys 1116769155 774
+1116770450 2 c sys/src/cmd/aux/reboot.c - 664 sys sys 1116769521 1429
+1116770450 3 c sys/src/cmd/aux/vga/main.c - 664 sys sys 1116769799 9583
+1116770450 4 c sys/src/cmd/bzip2/bzip2recover.c - 664 sys sys 1116769301 12345
+1116770450 5 c sys/src/cmd/cpp/nlist.c - 664 sys sys 1116770041 4645
+1116770450 6 c sys/src/cmd/history.c - 664 sys sys 1116770200 6046
+1116770450 7 c sys/src/cmd/ip/ftpd.c - 664 sys sys 1116769890 33079
+1116770450 8 c sys/src/cmd/lp/lpdsend.c - 664 sys sys 1116770113 9583
+1116770450 9 c sys/src/cmd/split.c - 664 sys sys 1116770353 3225
+1116770450 10 c sys/src/cmd/srvfs.c - 664 sys sys 1116770384 1702
+1116770450 11 c sys/src/cmd/troff/t10.c - 664 sys sys 1116769866 9493
+1116770450 12 c sys/src/cmd/upas/common/libsys.c - 664 sys sys 1116769961 14510
+1116770450 13 c sys/src/cmd/upas/scanmail/scanmail.c - 664 sys sys 1116769691 8742
+1116770450 14 c sys/src/cmd/upas/send/filter.c - 664 sys sys 1116769185 2311
+1116770450 15 c sys/src/cmd/7a/lex.c - 664 sys sys 1116769919 12410
+1116770450 16 c sys/src/cmd/calendar.c - 664 sys sys 1116769436 4221
+1116770450 17 c sys/src/cmd/import.c - 664 sys sys 1116770242 6882
+1116770450 18 c sys/src/cmd/yacc.c - 664 sys sys 1116770313 57945
+1116770450 19 c sys/src/libscribble/graffiti.c - 664 sys sys 1116769753 7344
+1116772250 0 c sys/src/cmd/awd.c - 664 sys sys 1116770763 645
+1116815459 0 c 386/bin/ape/patch - 775 sys sys 1116815420 302362
+1116815459 1 c 386/bin/aux/lpdsend - 775 sys sys 1116815421 153582
+1116815459 2 c 386/lib/ape/libap.a - 664 sys sys 1116815422 808982
+1116815459 3 c 386/lib/libscribble.a - 664 sys sys 1116815422 107282
+1116817259 0 c sys/src/cmd/awd.c - 664 sys sys 1116815657 661

+ 1 - 1
rc/bin/patch/create

@@ -54,7 +54,7 @@ for(i in $*){
 	chmod a+r $d/*
 }
 
-if(~ `{cat /proc/$pid/fd | awk 'NR==2{print $NF}'} */dev/cons){
+if(~ `{cat /proc/$pid/fd | awk 'NR==2{print $NF}'} */dev/cons && test -w /dev/consctl){
 	>/dev/consctl {
 		echo holdon
 		cat >$d/readme

+ 1 - 1
sys/src/ape/lib/ap/plan9/system.c

@@ -17,7 +17,7 @@ system(const char *s)
 	if(!s)
 		return 1; /* a command interpreter is available */
 	pid = fork();
-	sprintf(cmd, "/%s/bin/ape/sh", oty);
+	snprintf(cmd, sizeof cmd, "/%s/bin/ape/sh", oty);
 	if(pid == 0) {
 		execl(cmd, "sh", "-c", s, 0);
 		_exit(1);

+ 1 - 1
sys/src/cmd/7a/lex.c

@@ -81,7 +81,7 @@ main(int argc, char *argv[])
 	}
 
 child:
-	strcpy(ofile, *argv);
+	strecpy(ofile, ofile+sizeof ofile, *argv);
 	if(p = strrchr(ofile, '/')) {
 		include[0] = ofile;
 		*p++ = 0;

+ 2 - 2
sys/src/cmd/auth/none.c

@@ -23,12 +23,12 @@ main(int argc, char *argv[])
 		sysfatal("can't build namespace");
 
 	if (argc > 1) {
-		strcpy(cmd, argv[1]);
+		strecpy(cmd, cmd+sizeof cmd, argv[1]);
 		exec(cmd, &argv[1]);
 		if (strncmp(cmd, "/", 1) != 0
 		&& strncmp(cmd, "./", 2) != 0
 		&& strncmp(cmd, "../", 3) != 0) {
-			sprint(cmd, "/bin/%s", argv[1]);
+			snprint(cmd, sizeof cmd, "/bin/%s", argv[1]);
 			exec(cmd, &argv[1]);
 		}
 	} else {

+ 2 - 2
sys/src/cmd/aux/reboot.c

@@ -64,9 +64,9 @@ main(int argc, char **argv)
 
 	notify(ding);
 	if(argc > 1)
-		strcpy(file, argv[1]);
+		strecpy(file, file+sizeof file, argv[1]);
 	else{
-		p = readenv("cputype", buf, sizeof(buf));
+		p = readenv("cputype", buf, sizeof buf);
 		if(p == 0)
 			exits(0);
 		file[0] = 0;

+ 2 - 2
sys/src/cmd/aux/vga/main.c

@@ -289,9 +289,9 @@ main(int argc, char** argv)
 
 	if(iflag || lflag){
 		if(getenv(type))
-			sprint(monitordb, "/env/%s", type);
+			snprint(monitordb, sizeof monitordb, "/env/%s", type);
 		else
-			strcpy(monitordb, dbname);
+			strecpy(monitordb, monitordb+sizeof monitordb, dbname);
 
 		if(vga->vesa){
 			strcpy(monitordb, "vesa bios");

+ 25 - 21
sys/src/cmd/awd.c

@@ -1,34 +1,38 @@
 #include <u.h>
 #include <libc.h>
 
+/*
+ * like fprint but be sure to deliver as a single write.
+ * (fprint uses a small write buffer.)
+ */
+void
+xfprint(int fd, char *fmt, ...)
+{
+	char *s;
+	va_list arg;
+
+	va_start(arg, fmt);
+	s = vsmprint(fmt, arg);
+	va_end(arg);
+	if(s == nil)
+		sysfatal("smprint: %r");
+	write(fd, s, strlen(s));
+	free(s);
+}
+
 void
 main(int argc, char **argv)
 {
-	int fd, n, m;
-	char buf[1024], dir[512], *str;
+	int fd;
+	char dir[512];
 
 	fd = open("/dev/acme/ctl", OWRITE);
 	if(fd < 0)
 		exits(0);
 	getwd(dir, 512);
-	strcpy(buf, "name ");
-	strcpy(buf+5, dir);
-	n = strlen(buf);
-	if(n>0 && buf[n-1]!='/')
-		buf[n++] = '/';
-	buf[n++] = '-';
-	if(argc > 1)
-		str = argv[1];
-	else
-		str = "rc";
-	m = strlen(str);
-	strcpy(buf+n, str);
-	n += m;
-	buf[n++] = '\n';
-	write(fd, buf, n);
-	strcpy(buf, "dumpdir ");
-	strcpy(buf+8, dir);
-	strcat(buf, "\n");
-	write(fd, buf, strlen(buf));
+	if(dir[0]!=0 && dir[strlen(dir)-1]=='/')
+		dir[strlen(dir)-1] = 0;
+	xfprint(fd, "name %s/-%s\n",  dir, argc > 1 ? argv[1] : "rc");
+	xfprint(fd, "dumpdir %s\n", dir);
 	exits(0);
 }

+ 2 - 1
sys/src/cmd/bzip2/bzip2recover.c

@@ -279,7 +279,8 @@ Int32 main ( Int32 argc, Char** argv )
    UInt32      buffHi, buffLo, blockCRC;
    Char*       p;
 
-   strcpy ( progName, argv[0] );
+   strncpy ( progName, argv[0], sizeof progName );
+   progName[sizeof progName-1] = 0;
    inFileName[0] = outFileName[0] = 0;
 
    fprintf ( stderr, "bzip2recover 1.0: extracts blocks from damaged .bz2 files.\n" );

+ 2 - 2
sys/src/cmd/calendar.c

@@ -74,10 +74,10 @@ main(int argc, char *argv[])
 
 	for(i=0; i<argc || (i==0 && argc==0); i++){
 		if(i==0 && argc==0)
-			snprint(buf, sizeof(buf),
+			snprint(buf, sizeof buf,
 				"/usr/%s/lib/calendar", getuser());
 		else
-			strcpy(buf, argv[i]);
+			strecpy(buf, buf+sizeof buf, argv[i]);
 		fd = open(buf, OREAD);
 		if(fd<0 || Binit(&in, fd, OREAD)<0){
 			fprint(2, "calendar: can't open %s: %r\n", buf);

+ 1 - 1
sys/src/cmd/cpp/nlist.c

@@ -83,7 +83,7 @@ setup(int argc, char **argv)
 	 * (Note that includelist is searched from high end to low)
 	 */
 	if ((objtype = getenv("objtype"))){
-		sprintf(nbuf, "/%s/include", objtype);
+		snprintf(nbuf, sizeof nbuf, "/%s/include", objtype);
 		includelist[1].file = nbuf;
 		includelist[1].always = 1;
 	} else {

+ 2 - 2
sys/src/cmd/history.c

@@ -97,7 +97,7 @@ ysearch(char *file, char *ndump)
 		ndump = "dump";
 
 	tm = localtime(time(0));
-	sprint(buf, "/n/%s/%.4d/", ndump, tm->year+1900);
+	snprint(buf, sizeof buf, "/n/%s/%.4d/", ndump, tm->year+1900);
 	if(access(buf, AREAD) < 0) {
 		if(verb)
 			print("mounting dump %s\n", ndump);
@@ -124,7 +124,7 @@ ysearch(char *file, char *ndump)
 	else{
 		print("%s %s %lld [%s]\n", prtime(dir->mtime), file, dir->length, dir->muid);
 		started = 1;
-		strcpy(pair[1], file);
+		strecpy(pair[1], pair[1]+sizeof pair[1], file);
 	}
 	free(dir);
 	otime = starttime(sflag);

+ 2 - 2
sys/src/cmd/import.c

@@ -333,9 +333,9 @@ filter(int fd, char *cmd, char *host)
 	if ((s = strchr(newport, '!')) == nil)
 		sysfatal("filter: illegally formatted port %s\n", newport);
 
-	strcpy(buf, netmkaddr(host, "tcp", "0"));
+	strecpy(buf, buf+sizeof buf, netmkaddr(host, "tcp", "0"));
 	pbuf = strrchr(buf, '!');
-	strcpy(pbuf, s);
+	strecpy(pbuf, buf+sizeof buf, s);
 
 	if(debug) 
 		fprint(2, "filter: remote port %s\n", newport);

+ 1 - 1
sys/src/cmd/ip/ftpd.c

@@ -217,7 +217,7 @@ main(int argc, char **argv)
 	/* figure out which binaries to bind in later */
 	arg = getenv("cputype");
 	if(arg)
-		strcpy(cputype, arg);
+		strecpy(cputype, cputype+sizeof cputype, arg);
 	else
 		strcpy(cputype, "mips");
 	snprint(bindir, sizeof(bindir), "/bin/%s/bin", cputype);

+ 2 - 0
sys/src/cmd/ip/ftpfs/ftpfs.c

@@ -178,6 +178,8 @@ main(int argc, char *argv[])
 
 		close(p[1]);
 		fmtinstall('F', fcallfmt); /* debugging */
+		fmtinstall('D', dirfmt); /* expected by %F */
+		fmtinstall('M', dirmodefmt); /* expected by %F */
 		io();
 		quit();
 		break;

+ 4 - 4
sys/src/cmd/lp/lpdsend.c

@@ -231,15 +231,15 @@ netmkaddr(char *linear, char *defnet, char *defsrv)
 	if(cp == 0){
 		if(defnet==0){
 			if(defsrv)
-				sprintf(addr, "net!%s!%s", linear, defsrv);
+				snprintf(addr, sizeof addr, "net!%s!%s", linear, defsrv);
 			else
-				sprintf(addr, "net!%s", linear);
+				snprintf(addr, sizeof addr, "net!%s", linear);
 		}
 		else {
 			if(defsrv)
-				sprintf(addr, "%s!%s!%s", defnet, linear, defsrv);
+				snprintf(addr, sizeof addr, "%s!%s!%s", defnet, linear, defsrv);
 			else
-				sprintf(addr, "%s!%s", defnet, linear);
+				snprintf(addr, sizeof addr, "%s!%s", defnet, linear);
 		}
 		return addr;
 	}

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

@@ -116,8 +116,7 @@ nextfile(void)
 			fprint(2, "split: file %szz not split\n",stem);
 		canopen = 0;
 	} else {
-		strcpy(name, stem);
-		strcat(name, suff);
+		snprint(name, sizeof name, "%s%s", stem, suff);
 		if(++suff[1] > 'z') 
 			suff[1] = 'a', ++suff[0];
 		openf();

+ 2 - 2
sys/src/cmd/srvfs.c

@@ -79,9 +79,9 @@ main(int argc, char **argv)
 		exits("OK");
 	}
 	if(argv[0][0] == '/')
-		strcpy(buf, argv[0]);
+		strecpy(buf, buf+sizeof buf, argv[0]);
 	else
-		sprint(buf, "/srv/%s", argv[0]);
+		snprint(buf, sizeof buf, "/srv/%s", argv[0]);
 	fd = create(buf, OWRITE, perm);
 	if(fd < 0){
 		fprint(2, "can't create %s: %r\n", buf);

+ 5 - 3
sys/src/cmd/troff/t10.c

@@ -47,8 +47,10 @@ void t_ptinit(void)
 
 	/* open table for device, */
 	/* read in resolution, size info, font info, etc., set params */
-	if ((p = getenv("TYPESETTER")) != 0)
-		strcpy(devname, p);
+	if ((p = getenv("TYPESETTER")) != 0){
+		strncpy(devname, p, sizeof devname);
+		devname[sizeof devname-1] = 0;
+	}
 	if (termtab[0] == 0)
 		strcpy(termtab, DWBfontdir);
 	if (fontdir[0] == 0)
@@ -58,7 +60,7 @@ void t_ptinit(void)
 	hyf = 1;
 	lg = 1;
 
-	sprintf(buf, "/dev%s/DESC", devname);
+	snprintf(buf, sizeof buf, "/dev%s/DESC", devname);
 	strcat(termtab, buf);
 	if (getdesc(termtab) < 0) {
 		ERROR "can't open DESC file %s", termtab WARN;

+ 1 - 1
sys/src/cmd/upas/common/libsys.c

@@ -429,7 +429,7 @@ sysname_read(void)
 		cp = alt_sysname_read();
 	if(cp == 0 || *cp == 0)
 		cp = "kremvax";
-	strcpy(name, cp);
+	strecpy(name, name+sizeof name, cp);
 	return name;
 }
 extern char *

+ 1 - 1
sys/src/cmd/upas/scanmail/scanmail.c

@@ -102,7 +102,7 @@ main(int argc, char *argv[])
 				usage();
 			argc--;
 			argv++;
-			strcpy(patfile, *argv);
+			strecpy(patfile, patfile+sizeof patfile, *argv);
 			break;
 		case 'q':			/* queue name */
 			if(argv[0][2] ||  argv[1] == 0)

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

@@ -48,7 +48,7 @@ main(int argc, char *argv[])
 	}
 
 	dp = d_new(s_copy(argv[0]));
-	strcpy(file, argv[1]);
+	strecpy(file, file+sizeof file, argv[1]);
 	cp = findbody(s_to_c(mp->body));
 	for(i = 2; i < argc; i += 2){
 		p = regcomp(argv[i]);

+ 5 - 5
sys/src/cmd/yacc.c

@@ -2111,26 +2111,26 @@ openup(char *stem, int dflag, int vflag, int ytab, char *ytabc)
 	char buf[256];
 
 	if(vflag) {
-		sprint(buf, "%s.%s", stem, FILEU);
+		snprint(buf, sizeof buf, "%s.%s", stem, FILEU);
 		foutput = Bopen(buf, OWRITE);
 		if(foutput == 0)
 			error("cannot open %s", buf);
 	}
 	if(yydebug) {
-		sprint(buf, "%s.%s", stem, FILEDEBUG);
+		snprint(buf, sizeof buf, "%s.%s", stem, FILEDEBUG);
 		if((fdebug = Bopen(buf, OWRITE)) == 0)
 			error("can't open %s", buf);
 	}
 	if(dflag) {
-		sprint(buf, "%s.%s", stem, FILED);
+		snprint(buf, sizeof buf, "%s.%s", stem, FILED);
 		fdefine = Bopen(buf, OWRITE);
 		if(fdefine == 0)
 			error("can't create %s", buf);
 	}
 	if(ytab == 0)
-		sprint(buf, "%s.%s", stem, OFILE);
+		snprint(buf, sizeof buf, "%s.%s", stem, OFILE);
 	else
-		strcpy(buf, ytabc);
+		strecpy(buf, buf+sizeof buf, ytabc);
 	ftable = Bopen(buf, OWRITE);
 	if(ftable == 0)
 		error("cannot open table file %s", buf);

+ 2 - 4
sys/src/libscribble/graffiti.c

@@ -187,13 +187,11 @@ graffiti_load_recognizers(struct graffiti *pg)
 	/* ...then figure out where the classifiers are... */
 	if ( (homedir = (char*)getenv("home")) == nil ) {
 		if(0)fprint(2, "no homedir, using = %s\n", REC_DEFAULT_USER_DIR);
-		strcpy(pg->cldir, REC_DEFAULT_USER_DIR);
+		strecpy(pg->cldir, pg->cldir+sizeof pg->cldir, REC_DEFAULT_USER_DIR);
 		usingDefault = true;
 	} else {
 		if(0)fprint(2, "homedir = %s\n", homedir);
-		strcpy(pg->cldir, homedir);
-		strcat(pg->cldir, "/"); 
-		strcat(pg->cldir, CLASSIFIER_DIR); 
+		snprint(pg->cldir, sizeof pg->cldir, "%s/%s", homedir, CLASSIFIER_DIR);
 		usingDefault = false;
 	}