diff options
author | millert <millert@openbsd.org> | 1998-07-13 02:11:10 +0000 |
---|---|---|
committer | millert <millert@openbsd.org> | 1998-07-13 02:11:10 +0000 |
commit | fb045e09d281ed1397dc719be9c074c5500913b9 (patch) | |
tree | a107f2ce8bc2d0466964858619797e6bbdd7270a /usr.sbin | |
parent | Add blurb about 'local-mac-address?' property (diff) | |
download | wireguard-openbsd-fb045e09d281ed1397dc719be9c074c5500913b9.tar.xz wireguard-openbsd-fb045e09d281ed1397dc719be9c074c5500913b9.zip |
ftpd: sleep for an indeterminate amount for non-existant logins
to simulate a crypt, like login does.
Use SEEK_* not L_* and kill some 0L's used in lseek while we're there.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bad144/bad144.c | 12 | ||||
-rw-r--r-- | usr.sbin/edquota/edquota.c | 12 | ||||
-rw-r--r-- | usr.sbin/inetd/inetd.c | 6 | ||||
-rw-r--r-- | usr.sbin/rbootd/rmpproto.c | 2 | ||||
-rw-r--r-- | usr.sbin/rwhod/rwhod.c | 4 |
5 files changed, 18 insertions, 18 deletions
diff --git a/usr.sbin/bad144/bad144.c b/usr.sbin/bad144/bad144.c index 0c733415406..3a95447e7ff 100644 --- a/usr.sbin/bad144/bad144.c +++ b/usr.sbin/bad144/bad144.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)bad144.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$Id: bad144.c,v 1.3 1997/07/27 02:33:35 deraadt Exp $"; +static char *rcsid = "$Id: bad144.c,v 1.4 1998/07/13 02:11:45 millert Exp $"; #endif not lint /* @@ -302,7 +302,7 @@ usage: i = badfile * 2; for (; i < 10 && i < dp->d_nsectors; i += 2) { if (lseek(f, dp->d_secsize * (size - dp->d_nsectors + i), - L_SET) < 0) + SEEK_SET) < 0) Perror("lseek"); if (verbose) printf("write badsect file at %d\n", @@ -352,7 +352,7 @@ struct dkbad *bad; i = badfile * 2; for (; i < 10 && i < dp->d_nsectors; i += 2) { sn = size - dp->d_nsectors + i; - if (lseek(f, sn * dp->d_secsize, L_SET) < 0) + if (lseek(f, sn * dp->d_secsize, SEEK_SET) < 0) Perror("lseek"); if (read(f, (char *) bad, dp->d_secsize) == dp->d_secsize) { if (i > 0) @@ -478,7 +478,7 @@ daddr_t s1, s2; } } for (tries = 0; tries < RETRIES; tries++) { - if (lseek(f, dp->d_secsize * s1, L_SET) < 0) + if (lseek(f, dp->d_secsize * s1, SEEK_SET) < 0) Perror("lseek"); if ((n = read(f, buf, dp->d_secsize)) == dp->d_secsize) break; @@ -489,7 +489,7 @@ daddr_t s1, s2; perror((char *)0); return(0); } - if (lseek(f, dp->d_secsize * s2, L_SET) < 0) + if (lseek(f, dp->d_secsize * s2, SEEK_SET) < 0) Perror("lseek"); if (verbose) printf("copying %d to %d\n", s1, s2); @@ -516,7 +516,7 @@ daddr_t sn; exit(20); } } - if (lseek(f, dp->d_secsize * sn, L_SET) < 0) + if (lseek(f, dp->d_secsize * sn, SEEK_SET) < 0) Perror("lseek"); if (verbose) printf("zeroing %d\n", sn); diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c index 929f28eb84e..7c76582ea83 100644 --- a/usr.sbin/edquota/edquota.c +++ b/usr.sbin/edquota/edquota.c @@ -42,7 +42,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)edquota.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$Id: edquota.c,v 1.19 1998/05/18 19:09:52 deraadt Exp $"; +static char *rcsid = "$Id: edquota.c,v 1.20 1998/07/13 02:11:47 millert Exp $"; #endif /* not lint */ /* @@ -274,7 +274,7 @@ getprivs(id, quotatype) getentry(quotagroup, GRPQUOTA)); (void)fchmod(fd, 0640); } - lseek(fd, (off_t)(id * sizeof(struct dqblk)), L_SET); + lseek(fd, (off_t)(id * sizeof(struct dqblk)), SEEK_SET); switch (read(fd, &qup->dqblk, sizeof(struct dqblk))) { case 0: /* EOF */ /* @@ -409,7 +409,7 @@ writeprivs(quplist, outfd, name, quotatype) FILE *fd; ftruncate(outfd, 0); - lseek(outfd, 0, L_SET); + lseek(outfd, 0, SEEK_SET); if ((fd = fdopen(dup(outfd), "w")) == NULL) err(1, tmpfil); (void)fprintf(fd, "Quotas for %s %s:\n", qfextension[quotatype], name); @@ -442,7 +442,7 @@ readprivs(quplist, infd) struct dqblk dqblk; char *fsp, line1[BUFSIZ], line2[BUFSIZ]; - lseek(infd, 0, L_SET); + lseek(infd, 0, SEEK_SET); fd = fdopen(dup(infd), "r"); if (fd == NULL) { warnx("can't re-read temp file!!"); @@ -549,7 +549,7 @@ writetimes(quplist, outfd, quotatype) FILE *fd; ftruncate(outfd, 0); - lseek(outfd, 0, L_SET); + lseek(outfd, 0, SEEK_SET); if ((fd = fdopen(dup(outfd), "w")) == NULL) err(1, tmpfil); (void)fprintf(fd, @@ -582,7 +582,7 @@ readtimes(quplist, infd) time_t itime, btime, iseconds, bseconds; char *fsp, bunits[10], iunits[10], line1[BUFSIZ]; - lseek(infd, 0, L_SET); + lseek(infd, 0, SEEK_SET); fd = fdopen(dup(infd), "r"); if (fd == NULL) { warnx("can't re-read temp file!!"); diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index 5b014e44ae9..ac42a79c173 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inetd.c,v 1.47 1998/06/03 08:06:01 deraadt Exp $ */ +/* $OpenBSD: inetd.c,v 1.48 1998/07/13 02:11:48 millert Exp $ */ /* $NetBSD: inetd.c,v 1.11 1996/02/22 11:14:41 mycroft Exp $ */ /* * Copyright (c) 1983,1991 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/ -static char rcsid[] = "$OpenBSD: inetd.c,v 1.47 1998/06/03 08:06:01 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: inetd.c,v 1.48 1998/07/13 02:11:48 millert Exp $"; #endif /* not lint */ /* @@ -1063,7 +1063,7 @@ setconfig() if (defhost) free(defhost); defhost = newstr("*"); if (fconfig != NULL) { - fseek(fconfig, 0L, L_SET); + fseek(fconfig, 0L, SEEK_SET); return (1); } fconfig = fopen(CONFIG, "r"); diff --git a/usr.sbin/rbootd/rmpproto.c b/usr.sbin/rbootd/rmpproto.c index 13581b4dcc8..c3e8054664d 100644 --- a/usr.sbin/rbootd/rmpproto.c +++ b/usr.sbin/rbootd/rmpproto.c @@ -457,7 +457,7 @@ SendReadRepl(rconn) * Position read head on file according to info in request packet. */ GETWORD(req->r_rrq.rmp_offset, size); - if (lseek(oldconn->bootfd, (off_t)size, L_SET) < 0) { + if (lseek(oldconn->bootfd, (off_t)size, SEEK_SET) < 0) { syslog(LOG_ERR, "SendReadRepl: lseek: %m (%s)", EnetStr(rconn)); rpl->r_rrpl.rmp_retcode = RMP_E_ABORT; diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index c2c7edae792..931557c3cb4 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: rwhod.c,v 1.10 1998/04/30 08:45:03 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rwhod.c,v 1.11 1998/07/13 02:11:51 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -307,7 +307,7 @@ onalrm(signo) goto done; } } - (void) lseek(utmpf, (off_t)0, L_SET); + (void) lseek(utmpf, (off_t)0, SEEK_SET); cc = read(utmpf, (char *)utmp, stb.st_size); if (cc < 0) { fprintf(stderr, "rwhod: %s: %s\n", |