Browse Source

Plan 9 from Bell Labs 2007-08-28

David du Colombier 13 years ago
parent
commit
32cae386ed
8 changed files with 62 additions and 37 deletions
  1. 6 6
      dist/replica/_plan9.db
  2. 6 6
      dist/replica/plan9.db
  3. 9 0
      dist/replica/plan9.log
  4. 5 5
      sys/man/2/aes
  5. 11 9
      sys/man/2/des
  6. 9 5
      sys/man/8/ipserv
  7. 16 5
      sys/src/cmd/ip/ftpd.c
  8. 0 1
      sys/src/libc/386/387/mkfile

+ 6 - 6
dist/replica/_plan9.db

@@ -289,7 +289,7 @@
 386/bin/ip/dhcpclient - 775 sys sys 1178568281 92992
 386/bin/ip/dhcpd - 775 sys sys 1186112227 151324
 386/bin/ip/dhcpleases - 775 sys sys 1186112228 85106
-386/bin/ip/ftpd - 775 sys sys 1181507267 170562
+386/bin/ip/ftpd - 775 sys sys 1188245204 170817
 386/bin/ip/gping - 775 sys sys 1179372093 182147
 386/bin/ip/hogports - 775 sys sys 1148500655 42914
 386/bin/ip/httpd - 20000000775 sys sys 1068385801 0
@@ -7497,7 +7497,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 1181273382 1028
+sys/man/2/aes - 664 sys sys 1188253121 1057
 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
@@ -7520,7 +7520,7 @@ sys/man/2/cputime - 664 sys sys 1015091518 713
 sys/man/2/ctime - 664 sys sys 954378853 2547
 sys/man/2/ctype - 664 sys sys 1079535676 2611
 sys/man/2/debugger - 664 sys sys 944959696 8629
-sys/man/2/des - 664 sys sys 1187231239 3505
+sys/man/2/des - 664 sys sys 1188253121 3609
 sys/man/2/dial - 664 sys sys 1175725019 6594
 sys/man/2/dirread - 664 sys sys 1015091519 1901
 sys/man/2/disk - 664 sys sys 1015091519 3188
@@ -7802,7 +7802,7 @@ sys/man/8/gpsfs - 664 sys sys 1165623047 4918
 sys/man/8/httpd - 664 sys sys 1187893163 6866
 sys/man/8/init - 664 sys sys 944959679 1430
 sys/man/8/ipconfig - 664 sys sys 1177100280 7984
-sys/man/8/ipserv - 664 sys sys 1095862383 4375
+sys/man/8/ipserv - 664 sys sys 1188191285 4411
 sys/man/8/kfscmd - 664 sys sys 1182192559 4514
 sys/man/8/listen - 664 sys sys 1181790503 3658
 sys/man/8/lp - 664 sys sys 954614702 2491
@@ -12490,7 +12490,7 @@ sys/src/cmd/ip/dhcpd/ping.c - 664 sys sys 1185920220 1209
 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 1178127705 33168
+sys/src/cmd/ip/ftpd.c - 664 sys sys 1188195412 33395
 sys/src/cmd/ip/ftpfs - 20000000775 sys sys 1048312051 0
 sys/src/cmd/ip/ftpfs/file.c - 664 sys sys 1014925642 4208
 sys/src/cmd/ip/ftpfs/ftpfs.c - 664 sys sys 1116737713 13860
@@ -14846,7 +14846,7 @@ sys/src/libc/386/387/atan.s - 664 sys sys 944961709 56
 sys/src/libc/386/387/atan2.s - 664 sys sys 944961709 70
 sys/src/libc/386/387/exp.s - 664 sys sys 944961709 344
 sys/src/libc/386/387/log.s - 664 sys sys 944961709 302
-sys/src/libc/386/387/mkfile - 664 sys sys 1045336041 157
+sys/src/libc/386/387/mkfile - 664 sys sys 1188195399 147
 sys/src/libc/386/387/sin.s - 664 sys sys 944961709 95
 sys/src/libc/386/387/sqrt.s - 664 sys sys 944961709 128
 sys/src/libc/386/387/tan.s - 664 sys sys 944961709 91

+ 6 - 6
dist/replica/plan9.db

@@ -289,7 +289,7 @@
 386/bin/ip/dhcpclient - 775 sys sys 1178568281 92992
 386/bin/ip/dhcpd - 775 sys sys 1186112227 151324
 386/bin/ip/dhcpleases - 775 sys sys 1186112228 85106
-386/bin/ip/ftpd - 775 sys sys 1181507267 170562
+386/bin/ip/ftpd - 775 sys sys 1188245204 170817
 386/bin/ip/gping - 775 sys sys 1179372093 182147
 386/bin/ip/hogports - 775 sys sys 1148500655 42914
 386/bin/ip/httpd - 20000000775 sys sys 1068385801 0
@@ -7497,7 +7497,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 1181273382 1028
+sys/man/2/aes - 664 sys sys 1188253121 1057
 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
@@ -7520,7 +7520,7 @@ sys/man/2/cputime - 664 sys sys 1015091518 713
 sys/man/2/ctime - 664 sys sys 954378853 2547
 sys/man/2/ctype - 664 sys sys 1079535676 2611
 sys/man/2/debugger - 664 sys sys 944959696 8629
-sys/man/2/des - 664 sys sys 1187231239 3505
+sys/man/2/des - 664 sys sys 1188253121 3609
 sys/man/2/dial - 664 sys sys 1175725019 6594
 sys/man/2/dirread - 664 sys sys 1015091519 1901
 sys/man/2/disk - 664 sys sys 1015091519 3188
@@ -7802,7 +7802,7 @@ sys/man/8/gpsfs - 664 sys sys 1165623047 4918
 sys/man/8/httpd - 664 sys sys 1187893163 6866
 sys/man/8/init - 664 sys sys 944959679 1430
 sys/man/8/ipconfig - 664 sys sys 1177100280 7984
-sys/man/8/ipserv - 664 sys sys 1095862383 4375
+sys/man/8/ipserv - 664 sys sys 1188191285 4411
 sys/man/8/kfscmd - 664 sys sys 1182192559 4514
 sys/man/8/listen - 664 sys sys 1181790503 3658
 sys/man/8/lp - 664 sys sys 954614702 2491
@@ -12490,7 +12490,7 @@ sys/src/cmd/ip/dhcpd/ping.c - 664 sys sys 1185920220 1209
 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 1178127705 33168
+sys/src/cmd/ip/ftpd.c - 664 sys sys 1188195412 33395
 sys/src/cmd/ip/ftpfs - 20000000775 sys sys 1048312051 0
 sys/src/cmd/ip/ftpfs/file.c - 664 sys sys 1014925642 4208
 sys/src/cmd/ip/ftpfs/ftpfs.c - 664 sys sys 1116737713 13860
@@ -14846,7 +14846,7 @@ sys/src/libc/386/387/atan.s - 664 sys sys 944961709 56
 sys/src/libc/386/387/atan2.s - 664 sys sys 944961709 70
 sys/src/libc/386/387/exp.s - 664 sys sys 944961709 344
 sys/src/libc/386/387/log.s - 664 sys sys 944961709 302
-sys/src/libc/386/387/mkfile - 664 sys sys 1045336041 157
+sys/src/libc/386/387/mkfile - 664 sys sys 1188195399 147
 sys/src/libc/386/387/sin.s - 664 sys sys 944961709 95
 sys/src/libc/386/387/sqrt.s - 664 sys sys 944961709 128
 sys/src/libc/386/387/tan.s - 664 sys sys 944961709 91

+ 9 - 0
dist/replica/plan9.log

@@ -50034,3 +50034,12 @@
 1187901004 0 c sys/src/cmd/acme/util.c - 664 sys sys 1187899854 7994
 1187926203 0 c 386/bin/acme - 775 sys sys 1187925279 431027
 1187937004 0 c sys/src/cmd/ip/httpd/authorize.c - 664 sys sys 1187936238 2405
+1188192603 0 c sys/man/8/ipserv - 664 sys sys 1188191285 4411
+1188192603 1 c sys/src/cmd/ip/ftpd.c - 664 sys sys 1188191278 33356
+1188196204 0 c sys/src/cmd/ip/ftpd.c - 664 sys sys 1188195412 33395
+1188196204 1 c sys/src/libc/386/387/mkfile - 664 sys sys 1188195399 147
+1188246606 0 c 386/bin/ip/ftpd - 775 sys sys 1188245204 170817
+1188250205 0 c sys/src/libsec/port/des3ECB.c - 664 sys sys 1188250674 925
+1188252005 0 c sys/src/libsec/port/des3ECB.c - 664 sys sys 988225292 917
+1188253803 0 c sys/man/2/aes - 664 sys sys 1188253121 1057
+1188253803 1 c sys/man/2/des - 664 sys sys 1188253121 3609

+ 5 - 5
sys/man/2/aes

@@ -10,19 +10,19 @@ setupAESstate, aesCBCencrypt, aesCBCdecrypt - advanced encryption standard (rijn
 .br
 .B #include <libsec.h>
 .PP
+.in +0.5i
+.ti -0.5i
 .B
 void	setupAESstate(AESstate *s, uchar key[], int keybytes, uchar *ivec)
 .PP
 .B
-void	aesCBCencrypt(uchar*, int, AESstate*)
+void	aesCBCencrypt(uchar *p, int len, AESstate *s)
 .PP
 .B
-void	aesCBCdecrypt(uchar*, int, AESstate*)
-.PP
+void	aesCBCdecrypt(uchar *p, int len, AESstate *s)
 .SH DESCRIPTION
-.PP
 DES is being replaced by Rijndael, also known as AES, as the preferred
-block ciper.
+block cipher.
 .IR setupAESstate ,
 .IR aesCBCencrypt ,
 and

+ 11 - 9
sys/man/2/des

@@ -20,34 +20,36 @@ void	block_cipher(ulong *schedule, uchar *data, int decrypting)
 void	setupDESstate(DESstate *s, uchar key[8], uchar *ivec)
 .PP
 .B
-void	desCBCencrypt(uchar*, int, DESstate*)
+void	desCBCencrypt(uchar *p, int len, DESstate *s)
 .PP
 .B
-void	desCBCdecrypt(uchar*, int, DESstate*)
+void	desCBCdecrypt(uchar *p, int len, DESstate *s)
 .PP
 .B
-void	desECBencrypt(uchar*, int, DESstate*)
+void	desECBencrypt(uchar *p, int len, DESstate *s)
 .PP
 .B
-void	desECBdecrypt(uchar*, int, DESstate*)
+void	desECBdecrypt(uchar *p, int len, DESstate *s)
 .PP
+.in +0.5i
+.ti -0.5i
 .B
-void	triple_block_cipher(ulong keys[3][32], uchar*, int)
+void	triple_block_cipher(ulong expanded_key[3][32], uchar text[8], int ende)
 .PP
 .B
 void	setupDES3state(DES3state *s, uchar key[3][8], uchar *ivec)
 .PP
 .B
-void	des3CBCencrypt(uchar*, int, DES3state*)
+void	des3CBCencrypt(uchar *p, int len, DES3state *s)
 .PP
 .B
-void	des3CBCdecrypt(uchar*, int, DES3state*)
+void	des3CBCdecrypt(uchar *p, int len, DES3state *s)
 .PP
 .B
-void	des3ECBencrypt(uchar*, int, DES3state*)
+void	des3ECBencrypt(uchar *p, int len, DES3state *s)
 .PP
 .B
-void	des3ECBdecrypt(uchar*, int, DES3state*)
+void	des3ECBdecrypt(uchar *p, int len, DES3state *s)
 .PP
 .B
 void	key_setup(uchar[7], ulong[32])

+ 9 - 5
sys/man/8/ipserv

@@ -13,7 +13,7 @@ telnetd, rlogind, rexexec, ftpd \- Internet remote access daemons
 .B ip/rexexec
 .PP
 .B ip/ftpd
-.RB [ -eadp ]
+.RB [ -aAde ]
 .RB [ -n
 .IR namepace-file ]
 .PP
@@ -149,16 +149,20 @@ The options are:
 .TP
 .B a
 allow anonymous access
-.TP
-.B n
-the namespace for anonymous users (default
-.BR /lib/namespace.ftp )
+.B A
+allow
+.I only
+anonymous access
 .TP
 .B d
 write debugging output to standard error
 .TP
 .B e
 treat any user as anonymous
+.TP
+.B n
+the namespace for anonymous users (default
+.BR /lib/namespace.ftp )
 .PP
 To preserve intended protections in shared file trees,
 any directory containing a file

+ 16 - 5
sys/src/cmd/ip/ftpd.c

@@ -167,6 +167,14 @@ logit(char *fmt, ...)
 	werrstr(errstr, sizeof errstr);
 }
 
+static void
+usage(void)
+{
+	syslog(0, "ftp", "usage: %s [-aAde] [-n nsfile]", argv0);
+	fprint(2, "usage: %s [-aAde] [-n nsfile]\n", argv0);
+	exits("usage");
+}
+
 /*
  *  read commands from the control stream and dispatch
  */
@@ -181,9 +189,6 @@ main(int argc, char **argv)
 	int i;
 
 	ARGBEGIN{
-	case 'd':
-		debug++;
-		break;
 	case 'a':		/* anonymous OK */
 		anon_ok = 1;
 		break;
@@ -191,13 +196,18 @@ main(int argc, char **argv)
 		anon_ok = 1;
 		anon_only = 1;
 		break;
+	case 'd':
+		debug++;
+		break;
 	case 'e':
 		anon_ok = 1;
 		anon_everybody = 1;
 		break;
 	case 'n':
-		namespace = ARGF();
+		namespace = EARGF(usage());
 		break;
+	default:
+		usage();
 	}ARGEND
 
 	/* open log file before doing a newns */
@@ -214,12 +224,13 @@ main(int argc, char **argv)
 	strcpy(mailaddr, "?");
 	id = getpid();
 
-	/* figure out which binaries to bind in later */
+	/* figure out which binaries to bind in later (only for none) */
 	arg = getenv("cputype");
 	if(arg)
 		strecpy(cputype, cputype+sizeof cputype, arg);
 	else
 		strcpy(cputype, "mips");
+	/* shurely /%s/bin */
 	snprint(bindir, sizeof(bindir), "/bin/%s/bin", cputype);
 
 	Binit(&in, 0, OREAD);

+ 0 - 1
sys/src/libc/386/387/mkfile

@@ -6,7 +6,6 @@ OFILES=\
 	atan.$O\
 	tan.$O\
 	atan2.$O\
-	sqrt.$O\
 	exp.$O\
 	asin.$O\
 	log.$O\