Browse Source

Plan 9 from Bell Labs 2007-06-09

David du Colombier 17 years ago
parent
commit
9b874e8610
8 changed files with 113 additions and 49 deletions
  1. 13 14
      dist/replica/_plan9.db
  2. 11 11
      dist/replica/plan9.db
  3. 12 0
      dist/replica/plan9.log
  4. 8 2
      sys/man/1/passwd
  5. 16 2
      sys/man/1/secstore
  6. 40 15
      sys/man/8/auth
  7. 10 0
      sys/man/8/fossilcons
  8. 3 5
      sys/src/cmd/upas/vf/vf.c

+ 13 - 14
dist/replica/_plan9.db

@@ -553,7 +553,7 @@
 386/lib/libauthsrv.a - 664 sys sys 1174964431 35790
 386/lib/libbin.a - 664 sys sys 1168402363 2534
 386/lib/libbio.a - 664 sys sys 1168402363 25980
-386/lib/libc.a - 664 sys sys 1178568333 502352
+386/lib/libc.a - 664 sys sys 1181332906 502352
 386/lib/libcomplete.a - 664 sys sys 1168402364 6372
 386/lib/libcontrol.a - 664 sys sys 1168402365 274388
 386/lib/libdisk.a - 664 sys sys 1168402365 42368
@@ -562,22 +562,22 @@
 386/lib/libframe.a - 664 sys sys 1168402366 66398
 386/lib/libgeometry.a - 664 sys sys 1168402366 50470
 386/lib/libhtml.a - 664 sys sys 1176432132 229152
-386/lib/libhttpd.a - 664 sys sys 1177283321 99734
+386/lib/libhttpd.a - 664 sys sys 1181332906 99734
 386/lib/libip.a - 664 sys sys 1178826954 34710
 386/lib/libl.a - 664 sys sys 1168402367 5372
 386/lib/libmach.a - 664 sys sys 1178939757 807390
 386/lib/libmemdraw.a - 664 sys sys 1168402369 284092
 386/lib/libmemlayer.a - 664 sys sys 1168402369 47360
-386/lib/libmp.a - 664 sys sys 1176520528 79978
+386/lib/libmp.a - 664 sys sys 1181332906 79978
 386/lib/libndb.a - 664 sys sys 1178826955 64470
 386/lib/libplumb.a - 664 sys sys 1168402370 19408
 386/lib/libregexp.a - 664 sys sys 1179548041 37414
 386/lib/libscribble.a - 664 sys sys 1175972562 107238
-386/lib/libsec.a - 664 sys sys 1176520530 646724
+386/lib/libsec.a - 664 sys sys 1181332908 646724
 386/lib/libstdio.a - 664 sys sys 1176432133 126062
 386/lib/libsunrpc.a - 664 sys sys 1178826956 353148
 386/lib/libthread.a - 664 sys sys 1179548041 71932
-386/lib/libventi.a - 664 sys sys 1168402374 97858
+386/lib/libventi.a - 664 sys sys 1181332909 97858
 386/mbr - 775 sys sys 1131317338 407
 386/mkfile - 664 sys sys 948141303 46
 386/pbs - 775 sys sys 1143465402 495
@@ -6083,7 +6083,7 @@ sys/include/httpd.h - 664 sys sys 1177187803 5794
 sys/include/ip.h - 664 sys sys 1178768502 2597
 sys/include/keyboard.h - 664 sys sys 1131637696 865
 sys/include/libc.h - 664 sys sys 1168306860 19851
-sys/include/libsec.h - 664 sys sys 1124709121 9345
+sys/include/libsec.h - 664 sys sys 1181273373 8263
 sys/include/mach.h - 664 sys sys 1178892102 8758
 sys/include/memdraw.h - 664 sys sys 1091904419 5645
 sys/include/memlayer.h - 664 sys sys 1051031022 1851
@@ -7415,7 +7415,7 @@ sys/man/1/nm - 664 sys sys 1148106943 1601
 sys/man/1/ns - 664 sys sys 1163208505 895
 sys/man/1/p - 664 sys sys 944959673 504
 sys/man/1/page - 664 sys sys 1087829646 5839
-sys/man/1/passwd - 664 sys sys 1113743327 1382
+sys/man/1/passwd - 664 sys sys 1181277007 1532
 sys/man/1/patch - 664 sys sys 1145023250 2375
 sys/man/1/pcc - 664 sys sys 1015024740 3478
 sys/man/1/pic - 664 sys sys 1022625353 8229
@@ -7435,7 +7435,7 @@ sys/man/1/rio - 664 sys sys 1155362586 14707
 sys/man/1/rm - 664 sys sys 944959673 515
 sys/man/1/rwd - 664 sys sys 1042469992 2958
 sys/man/1/sam - 664 sys sys 1113743327 18295
-sys/man/1/secstore - 664 sys sys 1181069036 3770
+sys/man/1/secstore - 664 sys sys 1181275322 3913
 sys/man/1/sed - 664 sys sys 944959674 6884
 sys/man/1/seq - 664 sys sys 1063855680 1131
 sys/man/1/size - 664 sys sys 944959674 393
@@ -7491,7 +7491,7 @@ sys/man/2/abort - 664 sys sys 944959693 331
 sys/man/2/abs - 664 sys sys 944959693 461
 sys/man/2/access - 664 sys sys 1046657167 1102
 sys/man/2/addpt - 664 sys sys 958249501 2964
-sys/man/2/aes - 664 sys sys 1032058672 997
+sys/man/2/aes - 664 sys sys 1181273382 1028
 sys/man/2/allocimage - 664 sys sys 1046787977 7304
 sys/man/2/arg - 664 sys sys 1139744263 2184
 sys/man/2/arith3 - 664 sys sys 1162102967 4393
@@ -7777,7 +7777,7 @@ sys/man/8/INDEX.html - 664 sys sys 1141352367 8470
 sys/man/8/aan - 664 sys sys 1045501064 1670
 sys/man/8/aliasmail - 664 sys sys 1170818958 1350
 sys/man/8/apm - 664 sys sys 1017679308 1811
-sys/man/8/auth - 664 sys sys 1163208463 4227
+sys/man/8/auth - 664 sys sys 1181325518 4586
 sys/man/8/boot - 664 sys sys 1165623055 8357
 sys/man/8/booting - 664 sys sys 1015024984 4136
 sys/man/8/cpurc - 664 sys sys 1174792133 1541
@@ -7785,7 +7785,7 @@ sys/man/8/cron - 664 sys sys 1063858596 1867
 sys/man/8/dhcpd - 664 sys sys 1172959497 5572
 sys/man/8/disksim - 664 sys sys 1144150487 1476
 sys/man/8/drawterm - 664 sys sys 1135901219 1741
-sys/man/8/fossilcons - 664 sys sys 1179519561 18230
+sys/man/8/fossilcons - 664 sys sys 1181331315 18400
 sys/man/8/fs - 664 sys sys 1172956177 15086
 sys/man/8/fsconfig - 664 sys sys 1172956534 8878
 sys/man/8/fshalt - 664 sys sys 1173737264 862
@@ -14252,7 +14252,7 @@ sys/src/cmd/upas/unesc/mkfile - 664 sys sys 1173383407 142
 sys/src/cmd/upas/unesc/unesc.c - 664 sys sys 1173383408 969
 sys/src/cmd/upas/vf - 20000000775 sys sys 1064589607 0
 sys/src/cmd/upas/vf/mkfile - 664 sys sys 1064393881 241
-sys/src/cmd/upas/vf/vf.c - 664 sys sys 1180857236 20273
+sys/src/cmd/upas/vf/vf.c - 664 sys sys 1181326746 20235
 sys/src/cmd/usb - 20000000775 sys sys 1091205029 0
 sys/src/cmd/usb/audio - 20000000775 sys sys 1091204980 0
 sys/src/cmd/usb/audio/audiofs.c - 664 sys sys 1172903208 18518
@@ -15840,5 +15840,4 @@ 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
-sys/include/libsec.h - 664 sys sys 1181273373 8263
-sys/man/2/aes - 664 sys sys 1181273382 1028
+386/bin/upas/vf - 775 sys sys 1181359437 97389

+ 11 - 11
dist/replica/plan9.db

@@ -480,7 +480,7 @@
 386/bin/upas/token - 775 sys sys 1178568317 76393
 386/bin/upas/unesc - 775 sys sys 1176520512 60137
 386/bin/upas/unspam - 775 sys sys 1064598367 38
-386/bin/upas/vf - 775 sys sys 1180900507 97407
+386/bin/upas/vf - 775 sys sys 1181359437 97389
 386/bin/usb - 20000000775 sys sys 1019538890 0
 386/bin/usb/usbaudio - 775 sys sys 1179548037 188012
 386/bin/usb/usbd - 775 sys sys 1179548037 130769
@@ -553,7 +553,7 @@
 386/lib/libauthsrv.a - 664 sys sys 1174964431 35790
 386/lib/libbin.a - 664 sys sys 1168402363 2534
 386/lib/libbio.a - 664 sys sys 1168402363 25980
-386/lib/libc.a - 664 sys sys 1178568333 502352
+386/lib/libc.a - 664 sys sys 1181332906 502352
 386/lib/libcomplete.a - 664 sys sys 1168402364 6372
 386/lib/libcontrol.a - 664 sys sys 1168402365 274388
 386/lib/libdisk.a - 664 sys sys 1168402365 42368
@@ -562,22 +562,22 @@
 386/lib/libframe.a - 664 sys sys 1168402366 66398
 386/lib/libgeometry.a - 664 sys sys 1168402366 50470
 386/lib/libhtml.a - 664 sys sys 1176432132 229152
-386/lib/libhttpd.a - 664 sys sys 1177283321 99734
+386/lib/libhttpd.a - 664 sys sys 1181332906 99734
 386/lib/libip.a - 664 sys sys 1178826954 34710
 386/lib/libl.a - 664 sys sys 1168402367 5372
 386/lib/libmach.a - 664 sys sys 1178939757 807390
 386/lib/libmemdraw.a - 664 sys sys 1168402369 284092
 386/lib/libmemlayer.a - 664 sys sys 1168402369 47360
-386/lib/libmp.a - 664 sys sys 1176520528 79978
+386/lib/libmp.a - 664 sys sys 1181332906 79978
 386/lib/libndb.a - 664 sys sys 1178826955 64470
 386/lib/libplumb.a - 664 sys sys 1168402370 19408
 386/lib/libregexp.a - 664 sys sys 1179548041 37414
 386/lib/libscribble.a - 664 sys sys 1175972562 107238
-386/lib/libsec.a - 664 sys sys 1176520530 646724
+386/lib/libsec.a - 664 sys sys 1181332908 646724
 386/lib/libstdio.a - 664 sys sys 1176432133 126062
 386/lib/libsunrpc.a - 664 sys sys 1178826956 353148
 386/lib/libthread.a - 664 sys sys 1179548041 71932
-386/lib/libventi.a - 664 sys sys 1168402374 97858
+386/lib/libventi.a - 664 sys sys 1181332909 97858
 386/mbr - 775 sys sys 1131317338 407
 386/mkfile - 664 sys sys 948141303 46
 386/pbs - 775 sys sys 1143465402 495
@@ -7415,7 +7415,7 @@ sys/man/1/nm - 664 sys sys 1148106943 1601
 sys/man/1/ns - 664 sys sys 1163208505 895
 sys/man/1/p - 664 sys sys 944959673 504
 sys/man/1/page - 664 sys sys 1087829646 5839
-sys/man/1/passwd - 664 sys sys 1113743327 1382
+sys/man/1/passwd - 664 sys sys 1181277007 1532
 sys/man/1/patch - 664 sys sys 1145023250 2375
 sys/man/1/pcc - 664 sys sys 1015024740 3478
 sys/man/1/pic - 664 sys sys 1022625353 8229
@@ -7435,7 +7435,7 @@ sys/man/1/rio - 664 sys sys 1155362586 14707
 sys/man/1/rm - 664 sys sys 944959673 515
 sys/man/1/rwd - 664 sys sys 1042469992 2958
 sys/man/1/sam - 664 sys sys 1113743327 18295
-sys/man/1/secstore - 664 sys sys 1181069036 3770
+sys/man/1/secstore - 664 sys sys 1181275322 3913
 sys/man/1/sed - 664 sys sys 944959674 6884
 sys/man/1/seq - 664 sys sys 1063855680 1131
 sys/man/1/size - 664 sys sys 944959674 393
@@ -7777,7 +7777,7 @@ sys/man/8/INDEX.html - 664 sys sys 1141352367 8470
 sys/man/8/aan - 664 sys sys 1045501064 1670
 sys/man/8/aliasmail - 664 sys sys 1170818958 1350
 sys/man/8/apm - 664 sys sys 1017679308 1811
-sys/man/8/auth - 664 sys sys 1163208463 4227
+sys/man/8/auth - 664 sys sys 1181325518 4586
 sys/man/8/boot - 664 sys sys 1165623055 8357
 sys/man/8/booting - 664 sys sys 1015024984 4136
 sys/man/8/cpurc - 664 sys sys 1174792133 1541
@@ -7785,7 +7785,7 @@ sys/man/8/cron - 664 sys sys 1063858596 1867
 sys/man/8/dhcpd - 664 sys sys 1172959497 5572
 sys/man/8/disksim - 664 sys sys 1144150487 1476
 sys/man/8/drawterm - 664 sys sys 1135901219 1741
-sys/man/8/fossilcons - 664 sys sys 1179519561 18230
+sys/man/8/fossilcons - 664 sys sys 1181331315 18400
 sys/man/8/fs - 664 sys sys 1172956177 15086
 sys/man/8/fsconfig - 664 sys sys 1172956534 8878
 sys/man/8/fshalt - 664 sys sys 1173737264 862
@@ -14252,7 +14252,7 @@ sys/src/cmd/upas/unesc/mkfile - 664 sys sys 1173383407 142
 sys/src/cmd/upas/unesc/unesc.c - 664 sys sys 1173383408 969
 sys/src/cmd/upas/vf - 20000000775 sys sys 1064589607 0
 sys/src/cmd/upas/vf/mkfile - 664 sys sys 1064393881 241
-sys/src/cmd/upas/vf/vf.c - 664 sys sys 1180857236 20273
+sys/src/cmd/upas/vf/vf.c - 664 sys sys 1181326746 20235
 sys/src/cmd/usb - 20000000775 sys sys 1091205029 0
 sys/src/cmd/usb/audio - 20000000775 sys sys 1091204980 0
 sys/src/cmd/usb/audio/audiofs.c - 664 sys sys 1172903208 18518

+ 12 - 0
dist/replica/plan9.log

@@ -49151,3 +49151,15 @@
 1181262622 0 c sys/man/8/mkpaqfs - 664 sys sys 1181261121 890
 1181273422 0 c sys/include/libsec.h - 664 sys sys 1181273373 8263
 1181273422 1 c sys/man/2/aes - 664 sys sys 1181273382 1028
+1181277022 0 c sys/man/1/passwd - 664 sys sys 1181277007 1532
+1181277022 1 c sys/man/1/secstore - 664 sys sys 1181275322 3913
+1181277022 2 c sys/man/8/auth - 664 sys sys 1181277009 4253
+1181325623 0 c sys/man/8/auth - 664 sys sys 1181325518 4586
+1181327424 0 c sys/src/cmd/upas/vf/vf.c - 664 sys sys 1181326746 20235
+1181332823 0 c sys/man/8/fossilcons - 664 sys sys 1181331315 18400
+1181334622 0 c 386/lib/libc.a - 664 sys sys 1181332906 502352
+1181334622 1 c 386/lib/libhttpd.a - 664 sys sys 1181332906 99734
+1181334622 2 c 386/lib/libmp.a - 664 sys sys 1181332906 79978
+1181334622 3 c 386/lib/libsec.a - 664 sys sys 1181332908 646724
+1181334622 4 c 386/lib/libventi.a - 664 sys sys 1181332909 97858
+1181359823 0 c 386/bin/upas/vf - 775 sys sys 1181359437 97389

+ 8 - 2
sys/man/1/passwd

@@ -34,13 +34,14 @@ It is a substitute for a SecureNet box.
 .PP
 These commands may be run only on a terminal, to avoid
 transmitting clear text passwords over the network.
-.SH FILES
-.B /dev/key
 .SH SOURCE
 .B /sys/src/cmd/auth/passwd.c
 .br
 .B /sys/src/cmd/auth/netkey.c
 .SH "SEE ALSO"
+.I readnvram
+in
+.IR authsrv (2),
 .IR encrypt (2),
 .IR cons (3),
 .IR securenet (8)
@@ -49,3 +50,8 @@ Robert Morris and Ken Thompson,
 ``UNIX Password Security,''
 .I AT&T Bell Laboratories Technical Journal
 Vol 63 (1984), pp. 1649-1672
+.SH BUGS
+Now that
+.I cpu
+connections are always encrypted, there's no good reason
+to require that these commands be run only on terminals.

+ 16 - 2
sys/man/1/secstore

@@ -24,11 +24,13 @@ aescbc, ipso, secstore \- secstore commands
 .PP
 .B auth/aescbc
 -e
+[ -in ]
 .I <cleartext
 .I >ciphertext
 .br
 .B auth/aescbc
 -d
+[ -in ]
 .I <ciphertext
 .I >cleartext
 .PP
@@ -185,8 +187,20 @@ Also with
 newly created files are ignored.
 .PP
 .I Aescbc
-encrypts and decrypts using AES (Rijndael) in cipher
-block chaining (CBC) mode.
+encrypts (under
+.LR -e )
+and decrypts (under
+.LR -d )
+using AES (Rijndael) in cipher block chaining (CBC) mode.
+Options
+.L i
+and
+.L n
+are as per
+.IR secstore ,
+except that
+.L i
+reads from file descriptor 3.
 .SH SOURCE
 .B /rc/bin/ipso
 .br

+ 40 - 15
sys/man/8/auth

@@ -1,13 +1,11 @@
 .TH AUTH 8
 .SH NAME
-changeuser, wrkey, convkeys, convkeys2, printnetkey, status, authsrv, guard.srv, login, disable, enable \- maintain authentication databases
+changeuser, convkeys, convkeys2, printnetkey, status, enable, disable, authsrv, guard.srv, wrkey, login, none \- maintain authentication databases
 .SH SYNOPSIS
 .B auth/changeuser
 .RB [ -np ]
 .I user
 .PP
-.B auth/wrkey
-.PP
 .B auth/convkeys
 .RB [ -p ]
 .I keyfile
@@ -32,10 +30,19 @@ changeuser, wrkey, convkeys, convkeys2, printnetkey, status, authsrv, guard.srv,
 .PP
 .B auth/guard.srv
 .PP
+.B auth/wrkey
+.PP
 .B auth/login
 .I user
 .PP
 .B auth/none
+[
+.B -n
+.I namespace
+]
+.I command
+.I arg
+\&...
 .SH DESCRIPTION
 These administrative commands run only on the authentication server.
 .IR Changeuser
@@ -105,10 +112,6 @@ appends it to the file
 or
 .BR /adm/keys.who .
 .PP
-.I Wrkey
-prompts for a machine key, host owner, and host domain and stores them in
-local non-volatile RAM.
-.PP
 .I Convkeys
 re-encrypts the key file
 .IR keyfile .
@@ -117,8 +120,7 @@ Without the
 .B -p
 option
 .I convkeys
-uses the key stored in
-.B /dev/keys
+uses the key stored in NVRAM
 to decrypt the file, and encrypts it using the new key.
 By default, 
 .I convkeys
@@ -169,22 +171,40 @@ described in
 is similar.  It is called whenever a foreign (e.g. Unix) system wants
 to do a SecureNet challenge/response authentication.
 .PP
+The remaining commands need not be run on an authentication server.
+.PP
+.I Wrkey
+prompts for a machine key, host owner, and host domain and stores them in
+local non-volatile RAM.
+.PP
 .I Login
 allows a user to change his authenticated id to
 .IR user .
 .I Login
 sets up a new namespace from
-.B /lib/namespace
-and exec's
+.BR /lib/namespace ,
+starts a
+.IR factotum (4)
+under the new id and
+.IR exec s
 .IR rc (1)
 under the new id.
 .PP
 .I None
 sets up a new namespace from
-.B /lib/namespace
-and exec's its arguments
-under the new id.  It's
-an easy way to run a command as none.
+.I namespace
+(default
+.BR /lib/namespace )
+as the user
+.I none
+and
+.IR exec s
+its arguments under the new id.
+If there are no arguments, it
+.IR exec s
+.BR /bin/rc .
+It's an easy way to run a command as
+.IR none .
 .SH FILES
 .TF /sys/lib/httppasswords
 .TP
@@ -203,5 +223,10 @@ List of realms and passwords for HTTP access.
 .SH SOURCE
 .B /sys/src/cmd/auth
 .SH "SEE ALSO"
+.I readnvram
+in
+.IR authsrv (2),
 .IR keyfs (4),
 .IR securenet (8)
+.SH BUGS
+Only CPU kernels permit changing userid.

+ 10 - 0
sys/man/8/fossilcons

@@ -49,6 +49,8 @@ con /srv/fscons
 .I nproc
 ]
 .PP
+.B printconfig
+.PP
 .B srv
 [
 .B -APWdp
@@ -437,6 +439,14 @@ and
 .B -p
 options set the two variables.
 .PP
+.I Printconfig
+prints the
+.B config
+line for each configured file system
+and prints the
+.B venti
+line, if any, used to configure this file server.
+.PP
 .I Srv
 behaves like listen but uses
 .BI /srv/ name

+ 3 - 5
sys/src/cmd/upas/vf/vf.c

@@ -400,16 +400,14 @@ save(Part *p, char *file)
 static char*
 savetmp(Part *p)
 {
-	char *buf, *name;
+	char *name;
 	int fd;
 
-	buf = smprint("%s/vf.XXXXXXXXXXX", UPASTMP);
-	name = mktemp(buf);
+	name = mktemp(smprint("%s/vf.XXXXXXXXXXX", UPASTMP));
 	if((fd = create(name, OWRITE|OEXCL, 0666)) < 0){
 		fprint(2, "%s: error creating temporary file: %r\n", argv0);
 		refuse("can't create temporary file");
 	}
-	free(buf);
 	close(fd);
 	if(save(p, name) < 0){
 		fprint(2, "%s: error saving temporary file: %r\n", argv0);
@@ -426,7 +424,7 @@ savetmp(Part *p)
 		refuse("error reading temporary file");
 	}
 	Bseek(p->tmpbuf, bodyoff, 0);
-	return strdup(name);
+	return name;
 }
 
 /*