Re: clang 15 and zlib

2022-12-28 Thread Todd C . Miller
OK millert@ as well. There is no point in trying to fix this locally when upstream zlib will be changing it in the near(?) future. - todd

Re: iostat(8): implement periodic display with setitimer(2)

2022-12-28 Thread Todd C . Miller
On Wed, 28 Dec 2022 11:15:50 -0500, Scott Cheloha wrote: > Neither are arbitrary. > > The current maximum of one hundred million seconds is based on the old > nanosleep(2) limit prior to the 6.5 release. It was a documented > limit; see the manpage from the 6.4 release: > > http://man.openbsd.org

Re: iostat(8): implement periodic display with setitimer(2)

2022-12-28 Thread Todd C . Miller
On Wed, 28 Dec 2022 06:51:52 -0600, Scott Cheloha wrote: > On Sat, Dec 10, 2022 at 08:09:15AM -0600, Scott Cheloha wrote: > > As with e.g. kstat(1), implementing a periodic display with > > nanosleep(2) causes the display interval to drift. Doing it with > > setitimer(2) prevents drift. > > > >

Re: systat(1): vmstat: use actual elapsed time in dinfo()

2022-12-28 Thread Todd C . Miller
On Tue, 13 Dec 2022 11:20:46 -0600, Scott Cheloha wrote: > In systat(1)'s vmstat view, dinfo() uses the global "naptime" as an > elapsed time when computing rates. > > The problem is that naptime isn't the actual elapsed time. For > example, if you force a view update by hitting the spacebar, the

Re: macppc: ansify some code (fix clang 15 errors)

2022-12-26 Thread Todd C . Miller
On Tue, 27 Dec 2022 03:20:55 +0100, Jeremie Courreges-Anglas wrote: > This should fix warnings in the macppc build (kernel + bootloader) with > clang 15 (-Wdeprecated-non-prototype). Not build tested (no macppc > machine at hand) but should be safe. ok? OK millert@ - todd

Re: libsa: ansify some pxe code

2022-12-26 Thread Todd C . Miller
On Tue, 27 Dec 2022 03:11:58 +0100, Jeremie Courreges-Anglas wrote: > These functions trip up -Wdeprecated-non-prototype (clang 15). We'll > probably use -Wno-deprecated-non-prototype until zlib gets fixed > upstream but let's clean up the code first. > > zlib2ansi doesn't find other errors in sy

Re: LLVM 15: mismatched bound errors

2022-12-26 Thread Todd C . Miller
On Tue, 27 Dec 2022 01:47:25 +0100, Jeremie Courreges-Anglas wrote: > That's for the kernel part. libsa diff below, ok? Of course. OK millert@ - todd

Re: copystr(9) vs strlcpy

2022-12-25 Thread Todd C . Miller
On Sun, 25 Dec 2022 17:21:50 +, Miod Vallat wrote: > Now, there are three uses of copystr() left in the kernel, and two of > them ignore the return value of copystr(), and do not need the length of > the result to be returned. > > These two can be trivially replaced with strlcpy() calls. Sure

Re: LLVM 15: mismatched bound errors

2022-12-24 Thread Todd C . Miller
On Sat, 24 Dec 2022 12:52:59 +0100, Patrick Wildt wrote: > Right, sorry for derailing the thread with a different discussion. > Here's a diff only for the array/ptr changes. OK millert@ After some testing this seems to only affect code where the prototype and the function declaration use a mix o

Re: LLVM 15: mismatched bound errors

2022-12-22 Thread Todd C . Miller
On Thu, 22 Dec 2022 02:08:42 +0100, Jeremie Courreges-Anglas wrote: > https://github.com/jcourreges/openbsd-src/commit/4862df383ccb8a8e03d5c11b4f > b739b6a3a5a7c7 > > Sadly making the size available in the declaration doesn't seem to be > clang any smarter (yet?). clang won't warn about passing

Re: LLVM 15: mismatched bound errors

2022-12-20 Thread Todd C . Miller
On Tue, 20 Dec 2022 23:44:08 +0100, Patrick Wildt wrote: > clang complains when the function is declared with a fixed array size in > a parameter while the prototype is unbounded, like this: > > /usr/src/sys/net/pf.c:4353:54: error: argument 'sns' of type 'struct pf_src_n > ode *[4]' with mismatch

Re: args vs arg ... in manuals

2022-12-20 Thread Todd C . Miller
On Tue, 20 Dec 2022 10:35:19 +, Jason McIntyre wrote: > also some things will use argument vs arg. for example ssh(1). do you > propose to change those? I have no strong opinion on "arg" vs. "argument". It probably makes sense to standardize on whichever is most prevalent in our documentatio

Re: args vs arg ... in manuals

2022-12-20 Thread Todd C . Miller
On Tue, 20 Dec 2022 09:36:39 +, Klemens Nanni wrote: > Both styles are used, but I argue that the former fails to distinguish > between > $ program 'args in one shell word' > and > $ program one arg per shell word > > It's a minor thing, imho, but perhaps we can decide for one and

Re: acme-client: use timegm() instead of mktime()

2022-12-15 Thread Todd C . Miller
On Thu, 15 Dec 2022 18:16:11 +0100, Theo Buehler wrote: > This should probably been part of my last diff, but I noticed it only > on commit... acme-client contains the same mistake as rpki-client had: > all times in certificates are expressed in GMT, so using the TZ dependent > output of mktime()

Re: pause.3: misc cleanup

2022-12-10 Thread Todd C . Miller
Updated patch looks good to me. - todd

Re: Introduce `sb_state' and move SS_CANTSENDMORE to SBS_CANTSENDMORE

2022-12-09 Thread Todd C . Miller
On Fri, 09 Dec 2022 19:48:02 +0300, Vitaliy Makkoveev wrote: > This time, socket's buffer lock requires solock() to be held. I'm > working on standalone socket's buffer locking, and I want to commit some > bits. I mean SS_CANTSENDMORE and SS_CANTRCVMORE socket's state bits, > which I want to turn

Re: userspace: remove vestigial '?' cases from getopt(3) loops

2022-12-04 Thread Todd C . Miller
On Sun, 04 Dec 2022 15:58:22 -0600, Scott Cheloha wrote: > On Mon, Dec 05, 2022 at 06:37:49AM +1000, David Gwynne wrote: > > On Sat, Dec 03, 2022 at 08:14:37PM -0600, Scott Cheloha wrote: > > > There are nearly a hundred vestigial question mark cases in the > > > top-level getopt(3) loops of vario

Re: userspace: remove vestigial '?' cases from getopt(3) loops

2022-12-04 Thread Todd C . Miller
On Sat, 03 Dec 2022 20:14:37 -0600, Scott Cheloha wrote: > There are nearly a hundred vestigial question mark cases in the > top-level getopt(3) loops of various programs. You know, this: > > switch (ch) { > /* ... */ > case '?': > default: > usage(); >

Re: Some ENTRY_NB for libc/arch/i386

2022-12-03 Thread Todd C . Miller
On Sat, 03 Dec 2022 17:46:40 +0100, Theo Buehler wrote: > A while ago I added ENTRY_NB to i386 to fix some warnings in libm. Turns > out that libc also has a few of them on i386, diff below fixes the > > warning: bcopy changed binding to STB_WEAK > > for bcmp, bzero, bcopy, brk, sbrk. > > http://b

Re: midicat(1): use err(3)

2022-11-30 Thread Todd C . Miller
On Wed, 30 Nov 2022 09:20:26 -0600, Scott Cheloha wrote: > Couple related things: > > - Use err(3) everywhere. > > For many of these errors we are not currently printing the errno > string. Is there any reason not to do so? The errno string is > useful. OK > - Set ifile/ofile to "stdin"/

Re: dhcpleased, resolvd, slaacd: accurate lock error message

2022-11-27 Thread Todd C . Miller
On Sun, 27 Nov 2022 12:41:23 +, Klemens Nanni wrote: > On Sat, Nov 26, 2022 at 07:33:40PM -0700, Theo de Raadt wrote: > > Yes, that is understandable and suggests "no need to panic". > > Sure, I wasn't sure yet as to whether this is the only way open(2) can > yield EAGAIN (in this use case), b

Re: dhcpleased, resolvd, slaacd: accurate lock error message

2022-11-26 Thread Todd C . Miller
On Sat, 26 Nov 2022 11:09:58 -0700, "Theo de Raadt" wrote: > But "Resource temporarily unavailable" has absolutely no meaning to > anyone who will try to do this by hand, it is better for the message > to interpret the situation so that someone can understand. Agreed, it would be friendlier to fo

Re: ed: Make use of stderr compliant with POSIX

2022-11-18 Thread Todd C . Miller
On Sun, 25 Sep 2022 13:12:44 +0200, =?UTF-8?Q?S=C3=B6ren?= Tempel wrote: > Currently, the OpenBSD ed implementation incorrectly writes information > to standard error that should be written to standard out (as per POSIX). > > For the read and write command the POSIX standard states the following:

Re: relayd: always call va_end

2022-11-09 Thread Todd C . Miller
Yes, OK millert@ - todd

Re: pause.3: misc cleanup

2022-11-09 Thread Todd C . Miller
On Wed, 09 Nov 2022 16:47:22 +, Scott Cheloha wrote: > I think this could use some sprucing. > > NAME > > - "stop until signal" -> "wait for a signal" > > Feels more natural to me. OK > DESCRIPTION > > - It's "the calling thread" that blocks, not "a process". > > - Nothing is "forced". > >

Re: ftp: strnvis redirect uri

2022-11-09 Thread Todd C . Miller
On Wed, 09 Nov 2022 17:33:54 +0100, Claudio Jeker wrote: > Like this? Yes, OK millert@ - todd

Re: ftp: allow for more spaces in http headers

2022-11-09 Thread Todd C . Miller
On Wed, 09 Nov 2022 16:21:46 +0100, Claudio Jeker wrote: > This is the changes that I added to rpki-client http.c which I have not > yet merged into ftp(1) OK millert@ - todd

Re: ftp: strnvis redirect uri

2022-11-09 Thread Todd C . Miller
On Wed, 09 Nov 2022 15:46:06 +, Florian Obser wrote: > 200 might be a bit short for an URL, no? Perhaps stravis(3) is a better choice then? - todd

Re: ftp: strnvis redirect uri

2022-11-09 Thread Todd C . Miller
On Wed, 09 Nov 2022 16:34:20 +0100, Claudio Jeker wrote: > The redirect URI is untrusted input so strnvis it first before printing > it. OK millert@ - todd

[no subject]

2022-11-08 Thread Todd C . Miller
On Tue, 08 Nov 2022 18:05:24 +, Klemens Nanni wrote: > Subject: Document ifc_list immutability Sure. OK millert@ - todd

Re: libcrypto: fix leak in BN_mpi2bn()

2022-11-08 Thread Todd C . Miller
On Tue, 08 Nov 2022 18:33:48 +0100, Tobias Heider wrote: > If ain == NULL then a points to newly malloced memory which should be > freed when BN_bin2bn() fails. We don't have an "ain" function argument in LibreSSL so you will need a larger diff. Perhaps something like this (untested). - todd

Re: usbdevs(8) getopt tweak

2022-10-27 Thread Todd C . Miller
On Fri, 28 Oct 2022 12:03:15 +1000, David Gwynne wrote: > usbdevs has "?" in the optstring is passes to getopt, but doesn't handle > it specially. this is unnecessarily different to everything else in the > tree, so i want to remove it. ok? Sure, OK millert@ - todd

compress: remove cat_opts and decomp_opts, add static

2022-10-22 Thread Todd C . Miller
The cat_opts and decomp_opts fields in struct compressor are unused so just remove them. Also mark functions unused outside of main.c as static. - todd Index: usr.bin/compress/main.c === RCS file: /cvs/src/usr.bin/compress/main.c,v

Re: sparc64: constify ddb instruction table

2022-10-21 Thread Todd C . Miller
On Fri, 21 Oct 2022 22:55:57 +0200, Mark Kettenis wrote: > Be careful. By moving more stuff into .rodata, you may overflow the > .text/.rodata block. Make sure you build and test the kernels and > also test an actual bsd.rd. Do we know exactly what these limits are? If so, couldn't we test for

Re: smtpd bug in Received: header with one recipient

2022-10-19 Thread Todd C . Miller
I took another look at this and it seems correct to me. We should not really be using tx->evp.rcpt after the it has been added to the tx->rcpts list. I plan to commit it unless there are objections. - todd

Re: gunzip: support .zip files with a single member

2022-10-17 Thread Todd C . Miller
!= NULL; i++) { if (strcmp(suf, suffixes[i]) == 0) return (suf - 1); Index: usr.bin/compress/zipopen.c === RCS file: usr.bin/compress/zipopen.c diff -N usr.bin/compress/zip

Re: gunzip: support .zip files with a single member

2022-10-13 Thread Todd C . Miller
On Thu, 13 Oct 2022 14:14:28 -0600, "Todd C. Miller" wrote: > GNU gzip support uncompressing .zip files that contain a single > member. This can be very convenient when dealing with email > attachments that use zip instead of gzip to compress a single file > (I'm loo

Re: gunzip: support .zip files with a single member

2022-10-13 Thread Todd C . Miller
On Fri, 14 Oct 2022 10:26:33 +1100, Jonathan Gray wrote: > I can't think of another reason for the single file limit. It must be. > > With most of the changes under SMALL or not built, ramdisks still fit? It should, none of the new code is compiled for the ramdisk version. - todd

Re: gunzip: support .zip files with a single member

2022-10-13 Thread Todd C . Miller
On Fri, 14 Oct 2022 09:41:18 +1100, Jonathan Gray wrote: > The extracted file has the name of the zip archive without '.zip' > instead of the name of the file in the zip archive. > > Is that the behaviour of GNU gunzip? It isn't what I expected. Yes, that is what GNU zip does too. If you use th

gunzip: support .zip files with a single member

2022-10-13 Thread Todd C . Miller
rators; *sep != '\0'; sep++) { if ((suf = strrchr(infile, *sep)) == NULL) Index: usr.bin/compress/zipopen.c =========== RCS file: usr.bin/compress/zipopen.c diff -N usr.bin/compress/zipopen.c --- /dev/null 1 Jan 1970 0

Re: ps.1: control terminal -> controlling terminal

2022-10-13 Thread Todd C . Miller
On Thu, 13 Oct 2022 14:21:11 +0100, Jason McIntyre wrote: > hi. i'm not super up on the terminology here, but i do see we still have > other pages that talk about "control terminal". if any developer wants > to signal a clear desire to make such changes we can do that. The current term is "contro

Re: sparc64: ofwboot: no incremental builds due to broken libsa/libz dep

2022-10-11 Thread Todd C . Miller
On Wed, 12 Oct 2022 03:01:04 +0400, Klemens Nanni wrote: > sparc64 also has its own under stand/, > or do you mean that the alpha one is worse than the sparc64? Oh yes, the alpha one is needlessly complicated. I suppose this is not surprising considering the source. - todd

Re: sparc64: ofwboot: no incremental builds due to broken libsa/libz dep

2022-10-11 Thread Todd C . Miller
This problem is not confined to sparc64 is it? At least macppc seems to have the same issue. Some, like amd64 and i386, cheat and just pull in the 4 source files from the libz directory. It looks like alpha has its own libz and libsa directories which seems even worse. - todd

Re: ksh: errexit executes ERR trap twice

2022-10-11 Thread Todd C . Miller
On Mon, 10 Oct 2022 20:58:29 -, Klemens Nanni wrote: > The ERR trap is supposed to be run once, regardless of errexit: > > $ ksh -c 'trap "echo ERR" ERR; false' > ERR > $ ksh -c 'trap "echo ERR" ERR; false' -e > ERR > ERR > > This duplication is a regression of th

Re: ksh: trigger ERR trap on permanent I/O redirection failure

2022-10-08 Thread Todd C . Miller
On Sat, 08 Oct 2022 16:01:18 -, Klemens Nanni wrote: > Account for this to make permanent redirection failure trigger the ERR > trap: > > $ ./obj/ksh -c 'trap "echo ERR" ERR ; exec >/' > ksh: cannot create /: Is a directory > ERR > > Also add three new regress cases covering

Re: install.sub: Replace temporary file with variable

2022-10-04 Thread Todd C . Miller
On Tue, 04 Oct 2022 17:58:15 -, Klemens Nanni wrote: > On Tue, Sep 27, 2022 at 09:32:15AM -0600, Todd C. Miller wrote: > > On Tue, 27 Sep 2022 11:28:59 -0400, Josiah Frentsos wrote: > > > > > From ksh(1): > > > > > > [[ expression ]]

Re: install.sub: sh is not make, use newlines

2022-10-04 Thread Todd C . Miller
On Tue, 04 Oct 2022 18:17:02 -, Klemens Nanni wrote: > On Tue, Sep 20, 2022 at 11:19:38AM +, Klemens Nanni wrote: > > sh(1) happily accepts newlines inside double quotes just like in the > > script itself: > > > > $ sh -c "echo foo > > > echo bar" > > foo > > bar > > > >

Re: tftpd: add -R for read-only mode/reduced pledges

2022-10-04 Thread Todd C . Miller
On Tue, 04 Oct 2022 09:24:04 -, Klemens Nanni wrote: > > we were read-only believers a long time ago, and it seems the world has > > caught up to our way of thinking so yes maybe it is time to make it an > > option you must specify. > > I like the idea, then -c should logically imply -w. Look

Re: tzset(3): update man page to reality

2022-10-03 Thread Todd C . Miller
On Mon, 03 Oct 2022 13:27:05 -0600, "Todd C. Miller" wrote: > We did not document tzname, timezone or daylight and the rules > regarding pathnames was not entirely clear. > > I think it is worth mentioning that unless your program calls > chroot(2), you probably d

tzset(3): update man page to reality

2022-10-03 Thread Todd C . Miller
We did not document tzname, timezone or daylight and the rules regarding pathnames was not entirely clear. I think it is worth mentioning that unless your program calls chroot(2), you probably don't need to call tzset(3). Opinions? - todd Index: lib/libc/time/tzset.3 ==

Re: rarpd: unveil /tftpboot only if needed

2022-10-02 Thread Todd C . Miller
On Sun, 02 Oct 2022 12:33:21 -, Klemens Nanni wrote: > -t Only honour a request if the server (the host that rarpd is > running on) can "boot" the target; that is, if a file or > directory called /tftpboot/ipaddr exists, where ipaddr is the > ta

Re: wc(1): add -L flag to write length of longest line

2022-09-30 Thread Todd C . Miller
On Thu, 29 Sep 2022 23:30:54 -0400, Daniel Dickman wrote: > > On Sep 29, 2022, at 8:24 PM, Joerg Sonnenberger wrote: > > > > On Thu, Sep 29, 2022 at 08:39:16PM +1000, Jonathan Gray wrote: > >> wc counts items in files. Finding the longest item indeed sounds > >> like a task better suited to aw

Re: install.sub: Replace temporary file with variable

2022-09-27 Thread Todd C . Miller
On Tue, 27 Sep 2022 11:28:59 -0400, Josiah Frentsos wrote: > From ksh(1): > > [[ expression ]] > Similar to the test and [ ... ] commands (described later), with > the following exceptions: > > o Field splitting and file name generation are not >

Re: install.sub: Replace temporary file with variable

2022-09-27 Thread Todd C . Miller
On Tue, 27 Sep 2022 13:49:10 -, Klemens Nanni wrote: > The double quotes retain the newlines; without them column(1) would > print a single line (possibly longer than 80 chars). Don't you also need double quotes around $_CKPATCH: if [[ -n $_CKPATCH ]]; then in case it contains mult

Re: sysupgrade - Reading from socket: Undefined error: 0

2022-09-20 Thread Todd C . Miller
On Tue, 20 Sep 2022 08:50:10 +0200, Florian Obser wrote: > Is this somehow coming from the non-blocking connect diff? I can't spot > it though... I don't think so, the ktrace shows that read(2) is returning 0 long after connect. If the socket was left in non-blocking mode I could see that causin

Re: sysupgrade - timezone

2022-09-19 Thread Todd C . Miller
There was a bad diff in that snapshot that caused tzset() to ignore /etc/localtime. - todd

Re: sysupgrade - timezone

2022-09-19 Thread Todd C . Miller
On Mon, 19 Sep 2022 23:06:13 +0200, Hrvoje Popovski wrote: > after sysupgrade I'm having GMT > > OpenBSD 7.2 (GENERIC.MP) #736: Mon Sep 19 17:56:55 GMT 2022 > r620-1# date > Mon Sep 19 21:01:14 GMT 2022 > > r620-1# ls -apl /etc/localtime > lrwxr-xr-x 1 root wheel 33 Feb 10 2022 /etc/localtime

Re: ksh.1: == in [[ does pattern matching as well

2022-09-13 Thread Todd C . Miller
OK millert@ for the revised diff. - todd

Re: ksh.1: == in [[ does pattern matching as well

2022-09-13 Thread Todd C . Miller
On Tue, 13 Sep 2022 19:26:47 -, Klemens Nanni wrote: > install.sub uses [[ foo == f*o ]] extensively, yet ksh(1) only documents > pattern matching for the = and != operators. Think of the wasted bytes in install.sub! > Just like with [, = and == behave the same in [[ last time I checked. > >

Re: ftp(1) connection timeouts and hostnames with multiple addresses

2022-09-13 Thread Todd C . Miller
On Tue, 13 Sep 2022 20:21:58 +0100, Stuart Henderson wrote: > Oh great, that works very nicely for this use case, thank you. Connecting > via a proxy also still works as I'd expect. I'm basically OK with that > diff though I'd like to test the installer (I have some mkb/mkr running > now). Great.

Re: ftp(1) connection timeouts and hostnames with multiple addresses

2022-09-13 Thread Todd C . Miller
On Sat, 09 Jul 2022 12:53:17 +0100, Stuart Henderson wrote: > I'm trying to teach ftp(1) to do something like gui web browsers do > and reduce the HTTP/HTTPS connection timeout from the default (75 seconds) > if there are multiple addresses behind a hostname. > > There's an existing connection tim

Re: top(1): remove last vestiges of "last pid"

2022-09-09 Thread Todd C . Miller
On Fri, 09 Sep 2022 20:19:26 -0500, Scott Cheloha wrote: > millert@ removed most of the "last pid" pieces from top(1) in 1997: > > http://cvsweb.openbsd.org/src/usr.bin/top/machine.c?rev=1.7&content-type=text > /x-cvsweb-markup > > Some small bits remain, though. Can we remove the rest? Sure. O

Re: init(8): signal handler boolean needs to be "volatile"

2022-09-09 Thread Todd C . Miller
On Fri, 09 Sep 2022 14:05:46 -0500, Scott Cheloha wrote: > The variable "clang" is modified from a signal handler. It should be > of type sig_atomic_t and it needs to be volatile. Right. OK millert@ - todd

Re: installboot: reflect script failure in exit code

2022-09-08 Thread Todd C . Miller
On Thu, 08 Sep 2022 20:04:58 -, Klemens Nanni wrote: > Here's the full diff to fsck and newfs failure on all architectures. > > This is a regular programming issue around system(3) that has nothing to > do with bootloaders or installboot per se. > > I'd be great to get this in to make further

Re: add sendmmsg and recvmmsg systemcalls

2022-08-30 Thread Todd C . Miller
On Wed, 31 Aug 2022 00:19:20 +0200, Moritz Buhl wrote: > On Tue, Aug 30, 2022 at 10:59:43PM +0200, Claudio Jeker wrote: > > And nsd in base. It seems unbound does not use recvmmsg. > > After 'make -f Makefile.bsd-wrapper config' recvmmsg is picked up. > The config compile test currently defines N

Re: libutil: opendev: require block/character devices

2022-08-25 Thread Todd C . Miller
On Thu, 25 Aug 2022 11:50:31 -, Klemens Nanni wrote: > And this should use the ternary operator, as this would still succeed > if path is a character device even though OPENDEV_BLCK was passed. Sure. OK millert@ - todd

Re: libutil: opendev: require block/character devices

2022-08-25 Thread Todd C . Miller
On Thu, 25 Aug 2022 05:36:53 -, Klemens Nanni wrote: > Ah yes, the failure check does not return early but falls through, so > all further logic needs to check fd and/or errno (like the isduid() case > already does). OK millert@ - todd

Re: libutil: opendev: require block/character devices

2022-08-24 Thread Todd C . Miller
On Wed, 24 Aug 2022 20:06:00 -, Klemens Nanni wrote: > Feedback? Am I missing anything? If fstat(2) fails you should not try to access sb. Perhaps: if (((dflags & OPENDEV_BLCK) && ... should be an "else if (..." Otherwise looks OK to me. - todd

Re: vnconfig: fix usage

2022-08-19 Thread Todd C . Miller
On Fri, 19 Aug 2022 18:47:26 -, Klemens Nanni wrote: > Can also do just that. > > For install media it could be worth it since a single fprintf(3) call > saves some bits in text, but vnconfig(8) is not on amy install media... Your original diff is OK with me, sorry if that wasn't clear. - t

Re: vnconfig: zap useless cast

2022-08-19 Thread Todd C . Miller
On Fri, 19 Aug 2022 18:35:26 -, Klemens Nanni wrote: > opendev(3) takes a const char *, just what getinfo() provides. > > I see no point in casting away the const; no amd64 object change. OK millert@ - todd

Re: vnconfig: fix usage

2022-08-19 Thread Todd C . Miller
On Fri, 19 Aug 2022 18:32:12 -, Klemens Nanni wrote: > The manual has it right about -k and -K being mutually exclusive; > adapt the internal text. > > Merge the printf calls while here. OK millert@ for making usage match the manual. - todd

Re: installboot: clarify how -p only sets up the filesystem

2022-08-18 Thread Todd C . Miller
On Thu, 18 Aug 2022 18:53:41 -, Klemens Nanni wrote: > root is now initalised before the verbose check so it is independent of > -v usage and happens after prepare code, indicating that -p does not > care about -r. OK millert@ - todd

Re: installboot: clarify how -p only sets up the filesystem

2022-08-18 Thread Todd C . Miller
On Thu, 18 Aug 2022 11:51:19 -, Klemens Nanni wrote: > I've checked all usage combination of flags and arguments, the new code > does what the new synopsis says. I agree with the general direction but have one concern. See inline. - todd > Index: installboot.c > ==

Re: Remove unneeded kern.nselcoll sysctl

2022-08-14 Thread Todd C . Miller
On Sun, 14 Aug 2022 11:13:35 -, Visa Hankala wrote: > Remove unneeded kern.nselcoll sysctl. > > The last use of this sysctl in base was removed over two weeks ago. > Debian Code Search does not show any uses of the KERN_NSELCOLL macro. OK millert@ - todd

Re: renice(8): don't succeed after 256 errors

2022-08-11 Thread Todd C . Miller
On Thu, 11 Aug 2022 17:55:08 -0500, Scott Cheloha wrote: > Fix is to just set error instead of incrementing it. Sure. OK millert@ - todd

Re: store pf rules in a tree

2022-08-10 Thread Todd C . Miller
On Wed, 10 Aug 2022 14:38:16 -, Stefan Butz wrote: > this mail includes a patch to store pf rules in a red-black tree. > Currently they are stored in a linked list. > My system configured with 16000 rules takes about 10 minutes > to print them out using `pfctl -sr`. > This patch decreases the

Re: alpha: remove misaligned access emulation code

2022-08-09 Thread Todd C . Miller
On Tue, 09 Aug 2022 19:39:31 -, Miod Vallat wrote: > The alpha part contains code in the kernel to handle unaligned memory > accesses from userland programs, to prevent them from dying in horrible > SIGBUS. > > This made sense in the '90s, but since then people have learned to work > with stri

Re: fgetln->getline in games/* (Was: Re: quiz(6): fully switch to getline(3))

2022-08-08 Thread Todd C . Miller
Looks fine to me, though the free(answer) before exit(0) in quiz.c is not needed. OK millert@ - todd

Re: patch: change swblk_t type and use it in blist

2022-08-05 Thread Todd C . Miller
On Sat, 06 Aug 2022 02:19:31 +0200, Jeremie Courreges-Anglas wrote: > This seems fair, but maybe we should just zap the type from sys/types.h and > define it only in sys/blist.h, as done in DragonflyBSD? Fine with me. It is a non-standard type not used by base. - todd

Re: dmesg(8): fail if given positional arguments

2022-08-02 Thread Todd C . Miller
On Tue, 02 Aug 2022 11:52:33 -0500, Scott Cheloha wrote: > dmesg(8) doesn't use any positional arguments. It's a usage error if > any are present. Sure. Ok millert@ - todd

Re: echo(1): check for stdio errors

2022-07-30 Thread Todd C . Miller
On Sat, 30 Jul 2022 18:19:02 -0500, Scott Cheloha wrote: > Bump. The standard's error cases for fflush(3) are identical to those > for fclose(3): > > https://pubs.opengroup.org/onlinepubs/9699919799/functions/fflush.html > https://pubs.opengroup.org/onlinepubs/9699919799/functions/fclose.html > >

Re: echo(1): check for stdio errors

2022-07-11 Thread Todd C . Miller
On Sun, 10 Jul 2022 20:58:35 -0900, Philip Guenther wrote: > Three thoughts: > 1) Since stdio errors are sticky, is there any real advantage to checking > each call instead of just checking the final fclose()? Will that really catch all errors? From what I can tell, fclose(3) can succeed even if

Re: ftp(1) connection timeouts and hostnames with multiple addresses

2022-07-09 Thread Todd C . Miller
Instead of the existing alarm() mechanism, how about using timeout_connect() from usr.bin/nc/netcat.c? - todd

Re: obsolete dump options syntax

2022-06-02 Thread Todd C . Miller
On Thu, 02 Jun 2022 07:54:02 -0600, "Theo de Raadt" wrote: > I'm fine with a / check, but it also needs documenting. While there can't > we say at least one option must be supplied? How about this? - todd Index: sbin/dump/dump.8

Re: obsolete dump options syntax

2022-06-02 Thread Todd C . Miller
On Thu, 02 Jun 2022 07:43:15 -0600, "Theo de Raadt" wrote: > Hmm, but consider these cases > > dump home > > or > > mkdir 0af > dump 0af > > or > > cd /dev && dump rsd0a True, those would not be handled but isn't the most common usage to pass a fully-qualified path or a device name? The biggest

Re: obsolete dump options syntax

2022-06-02 Thread Todd C . Miller
On Thu, 02 Jun 2022 14:36:16 +0200, Jan Stary wrote: > That results in the above. What obsolete options format > is this trying to accomodate? The manpage doesn't say - > the options it describes are perfectly getopt()-likable. > Looking at the CVS log, this was already "obsolete" > in the origina

Re: tar extract to stdout

2022-05-26 Thread Todd C . Miller
Our tar's -O flag is only used when creating an archive, it is unused for extraction. I'd prefer that we use the same option letter as GNU tar and bsdtar for this. - todd

Re: librthread: validate timespec inputs with timespecisvalid(3)

2022-05-14 Thread Todd C . Miller
On Sat, 14 May 2022 09:31:26 -0500, Scott Cheloha wrote: > ok? OK millert@ - todd

Re: eliminate use of fseek(3) inside libc

2022-05-13 Thread Todd C . Miller
On Fri, 13 May 2022 19:33:58 -0700, Philip Guenther wrote: > Diff below converts the last three such uses** and then updates the symbol > naming for fseek to block attempts to reference it in the future so uses > don't accidentally crawl back in. OK millert@ - todd

Re: Mark pw_error __dead in util.h

2022-05-11 Thread Todd C . Miller
On Tue, May 03, 2022 at 10:37:36PM -0500, Matthew Martin wrote: > The function is already marked __dead in passwd.c, so appears to just be > an oversight. Committed, thanks. - todd

Re: kstat(1): implement wait with setitimer(2)

2022-05-02 Thread Todd C . Miller
On Mon, 02 May 2022 20:39:07 -0500, Scott Cheloha wrote: > Whenever I block signals, deraadt@ rises up out of the floorboards and > says "I hate masking signals, don't do that." > > ... but if millert@ is still fine with the attached patch, which does > sigprocmask(2), I'll go ahead with it. > > >

Re: Merge swap-backed and object-backed inactive lists

2022-05-02 Thread Todd C . Miller
On Mon, 02 May 2022 18:39:17 +0200, Martin Pieuchot wrote: > Let's simplify the existing logic and use a single list for inactive > pages. uvmpd_scan_inactive() already does a lot of check if it finds > a page which is swap-backed. This will be improved in a next change. That looks fine to me.

Re: no gawking in makesyscalls

2022-05-01 Thread Todd C . Miller
On Sun, 01 May 2022 00:48:17 -0400, "Ted Unangst" wrote: > I don't think we need to concern ourselves with cross awk compatibility here. > > Despite the misleading comment, /usr/bin/awk supports toupper. This must have been to support very old versions of awk (pre-nawk) since toupper and tolower

Re: kstat(1): implement wait with setitimer(2)

2022-04-29 Thread Todd C . Miller
On Thu, 28 Apr 2022 20:54:02 -0500, Scott Cheloha wrote: > Once again, using nanosleep(2) here to print the stats periodically is > flawed. The period will drift. Using setitimer(2)/sigsuspend(2) is > better. Yes, I agree that an interval timer is a better fit. > While here: > > - We don't nee

Re: obscure vi crash, fix

2022-04-22 Thread Todd C . Miller
On Fri, 22 Apr 2022 17:38:56 +0200, Theo Buehler wrote: > I would use an extra variable. The simplification alone is a good > argument to do it: Yes, that is nicer. OK millert@ - todd

vi: apply expandtab to the output of a ! command

2022-04-22 Thread Todd C . Miller
[I originally sent this a year ago but didn't follow up.] This is consistent with vim's expandtab behavior. >From nvi2 (Craig Leres): https://github.com/lichray/nvi2/commit/7d3f43559026e0927032a105b217850feaefec66 I know most of us don't use expandtab but it is helpful when dealing with a codeba

Re: obscure vi crash, fix

2022-04-22 Thread Todd C . Miller
Another thing I noticed while testing the fix is that in cl_term_init() while processing the command mapping there is a missing NULL check. However, the check _is_ present for the input mapping loop. The following diff makes the two loops consistent. I'm not sure whether this is worth doing since

Re: obscure vi crash, fix

2022-04-21 Thread Todd C . Miller
On Thu, 21 Apr 2022 09:35:44 -0700, Jeremy Mates wrote: > The cause is an unguarded use of the NULL output pointer. I am pretty > sure an .exrc cannot cause this condition (map rhs requires > something, not nothing) only recompiling with a NULL output string > for some command. > > One fix is to g

Re: login_fbtab glob

2022-04-20 Thread Todd C . Miller
On Wed, 20 Apr 2022 09:18:20 -0500, joshua stein wrote: > I like it. Here's the full diff: OK millert@ - todd

Re: const openpty et al.

2022-04-20 Thread Todd C . Miller
On Tue, 19 Apr 2022 21:30:25 -0500, Matthew Martin wrote: > On Thu, Apr 07, 2022 at 06:11:45PM -0500, Matthew Martin wrote: > > const the termp and winp arguments for openpty and related. This matches > > the prototypes for openpty and forkpty in glibc and musl libc. > > ping; has an ok from tb@ [

<    1   2   3   4   5   6   7   8   9   10   >