-# passwd configuration file
+# $OpenBSD: passwd.conf,v 1.2 1997/02/16 23:45:29 deraadt Exp $
+#
+# Passwd configuration file
#
# Possible options are at the moment:
-# localcipher, ypcipher
+# localcipher, ypcipher
# they can take values of
-# old - old unix style salt of 12bit
-# newsalt - DES hash with salt of 64 bit
-# blowfish,x - Blowfish cipher, x is number of rounds
-# 128 bit salt, 4 rounds are min, 31 max
-#
+# old - old unix style salt of 12bit
+# newsalt - DES hash with salt of 64 bit
+# blowfish,x - Blowfish cipher, x is number of rounds
+# 128 bit salt, 4 rounds are min, 31 max
+
default:
localcipher=old
ypcipher=old
#ifndef lint
/*static char sccsid[] = "from: @(#)tftpd.c 5.13 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: tftpd.c,v 1.5 1996/12/22 03:41:22 tholo Exp $";
+static char rcsid[] = "$Id: tftpd.c,v 1.6 1997/02/16 23:49:21 deraadt Exp $";
#endif /* not lint */
/*
register int n = 0;
int on = 1;
int fd = 0;
+ int pid;
+ int i, j;
int c;
openlog("tftpd", LOG_PID, LOG_DAEMON);
* break before doing the above "recvfrom", inetd would
* spawn endless instances, clogging the system.
*/
- {
- int pid;
- int i, j;
-
- for (i = 1; i < 20; i++) {
- pid = fork();
- if (pid < 0) {
- sleep(i);
- /*
- * flush out to most recently sent request.
- *
- * This may drop some request, but those
- * will be resent by the clients when
- * they timeout. The positive effect of
- * this flush is to (try to) prevent more
- * than one tftpd being started up to service
- * a single request from a single client.
- */
- j = sizeof from;
- i = recvfrom(fd, buf, sizeof (buf), 0,
- (struct sockaddr *)&from, &j);
- if (i > 0) {
- n = i;
- fromlen = j;
- }
- } else {
- break;
- }
- }
+ for (i = 1; i < 20; i++) {
+ pid = fork();
if (pid < 0) {
- syslog(LOG_ERR, "fork: %m\n");
- exit(1);
- } else if (pid != 0) {
- exit(0);
- }
+ sleep(i);
+ /*
+ * flush out to most recently sent request.
+ *
+ * This may drop some request, but those
+ * will be resent by the clients when
+ * they timeout. The positive effect of
+ * this flush is to (try to) prevent more
+ * than one tftpd being started up to service
+ * a single request from a single client.
+ */
+ j = sizeof from;
+ i = recvfrom(fd, buf, sizeof (buf), 0,
+ (struct sockaddr *)&from, &j);
+ if (i > 0) {
+ n = i;
+ fromlen = j;
+ }
+ } else
+ break;
}
+ if (pid < 0) {
+ syslog(LOG_ERR, "fork: %m\n");
+ exit(1);
+ } else if (pid != 0)
+ exit(0);
+
from.sin_len = sizeof(struct sockaddr_in);
from.sin_family = AF_INET;
alarm(0);