Re: change nc(1) port range delimiter

2018-12-22 Thread Ted Unangst
Theo de Raadt wrote: > If you are going to introduce such complicated semantics, please > include a proposal for the manual page change so that we can see > if this can be simply described. Being dimply described in the > manual page is a marker for whether a change is suitable. Stealing some

Re: change nc(1) port range delimiter

2018-12-22 Thread Ted Unangst
Daniel Jakots wrote: > Hi, > > With nc(1) you can do: > nc -zv example.com 80 > or > nc -zv example.com http > which does the same. This works well unless the service name has a dash: > $ nc -zv example.com syslog-tls > nc: service "tls" unknown > > This is because nc(1) is able to do some port

Re: mandoc -T html default style

2018-12-22 Thread Ted Unangst
Ingo Schwarze wrote: > What about making -O style= *compulsory* unless "option style" is > defined in man.conf(5)? Just error out when no style sheet is > configured? That can be combined with inlining the full set of > rules when -O style=inline is explicitly specified. This seems

Re: mandoc -T html default style

2018-12-21 Thread Ted Unangst
Ingo Schwarze wrote: > 2. When calling "mandoc -T html" without specifying "-O style=", > fall back to "-O style=/var/www/htdocs/mandoc.css" by default. > That might be sensible because it is adequate for local > viewing of the file, which is likely intended with files > generated

Re: mandoc -T html default style

2018-12-20 Thread Ted Unangst
Raphael Graf wrote: > The diff inserts some space above the footer. > This improves readability and makes it similar to the other output formats. > > Here is an example found in the wild, demonstrating the problem: > https://webassembly.github.io/wabt/doc/wasm-objdump.1.html So I think one

Re: diff: fix missing include guard in dev/biovar.h

2018-12-19 Thread Ted Unangst
Jan Klemkow wrote: > I run into double definition problems because of a missing include guard > in dev/biovar.h. The diff below should fix that issue. Where and how? I don't like adding guards blindly because it leads to laziness and eventually the include situation is a giant tangled mess. Each

Re: request for testing: patch for boot loader out of mem

2018-12-15 Thread Ted Unangst
Otto Moerbeek wrote: > That would boil down to this, > > ok? ok with me

Re: make build as root fails when SUDO=doas

2018-12-14 Thread Ted Unangst
Marc Espie wrote: > Well, apart from the bike-shedding, it seems like the most correct > short-term solution. > > So I will commit it tomorrow, unless someone has an actual better idea. Nobody answered if SUDO_CLEAN is actualy set. I checked. It's not. Index: Makefile

Re: request for testing: patch for boot loader out of mem

2018-12-13 Thread Ted Unangst
Otto Moerbeek wrote: > int > biosd_diskio(int rw, struct diskinfo *dip, u_int off, int nsect, void *buf) > { > - return biosd_io(rw, >bios_info, off, nsect, buf); > + int i, n, ret; > + > + /* > + * Avoid doing too large reads, the bounce buffer used by biosd_io() > + *

Re: kdump -f -

2018-12-12 Thread Ted Unangst
Klemens Nanni wrote: > On Tue, Dec 11, 2018 at 10:31:37PM -0500, Ted Unangst wrote: > > I have some trace files that are gzipped to save space. (They compress > > really > > well.) It would be convenient if I could simply zcat them into kdump for > > inspection. > F

Re: make build as root fails when SUDO=doas

2018-12-11 Thread Ted Unangst
Marc Espie wrote: > There is a kind of mixed model there. > > Because make build still goes thru regress for obj and cleandir > > Yet the rest of the build doesn't! > > So, if we agree that it needs to stay the way it currently is, then > the SUDO in that Makefile might trigger while running as

kdump -f -

2018-12-11 Thread Ted Unangst
I have some trace files that are gzipped to save space. (They compress really well.) It would be convenient if I could simply zcat them into kdump for inspection. This patch allows -f - to read from stdin. (Curiously, kdump always reads from stdin, but uses freopen on the trace file.) Unsure

Re: make build as root fails when SUDO=doas

2018-12-11 Thread Ted Unangst
Marc Espie wrote: > > > - try to remove the files normally first > > > rm -f ${SUDO_CLEAN} || test -z "${SUDO}" || ${SUDO} rm -f > > > ${SUDO_CLEAN} > > > > > > this should actually fix the issue. > > > > > > Any other directory with that problem ? > > > > that fix the issue and the

Re: allow weak passwd

2018-12-11 Thread Ted Unangst
Mark Kettenis wrote: > > From: "Ted Unangst" > > Date: Mon, 10 Dec 2018 14:14:08 -0500 > > Content-Type: text/plain; charset=utf-8 > > > > So I was actually looking at the passwd check rules because I wanted > > to add a flag to disable the 3 bad

Re: make build as root fails when SUDO=doas

2018-12-10 Thread Ted Unangst
Solene Rapenne wrote: > Not sure how to fix it. Maybe people shouldn't try to compile as root when > having SUDO=doas set and then, it's not an issue anymore? yeah, i would say this is an issue of your own making. you ask to use doas, make is going to use doas.

allow weak passwd

2018-12-10 Thread Ted Unangst
So I was actually looking at the passwd check rules because I wanted to add a flag to disable the 3 bad passwords then ok whatever. This adds passwd -w to allow user to skip the default 3 warnings and just do what they want. If, by chance, you have configured warnings in login.conf then they

ksh mail check

2018-12-09 Thread Ted Unangst
if MAIL is unset, we can short circuit the check a little bit. Index: mail.c === RCS file: /cvs/src/bin/ksh/mail.c,v retrieving revision 1.24 diff -u -p -r1.24 mail.c --- mail.c 25 Jun 2018 15:22:30 - 1.24 +++ mail.c

pwd_check tweak

2018-12-09 Thread Ted Unangst
These patterns try to detect a1a1a1 style passwords. By making the regex a bit more flexible we can just use one. Also now catches mMmMmM fwiw. Index: pwd_check.c === RCS file: /cvs/src/usr.bin/passwd/pwd_check.c,v retrieving

Re: Importing FreeBSD eMMC code

2018-12-06 Thread Ted Unangst
Heppler, J. Scott wrote: > Is there interest in installing/booting OpenBSD on eMMC? this is expected to work.

ktrace buglet

2018-12-06 Thread Ted Unangst
ktrace -C will return an error if you don't have a ktrace.out file because sys_ktrace tries to open it whenever it has a filename, even if it won't be used. I think it is more consistent to require it be null, so that we aren't opening files we won't be using. man page and utility diff below.

Re: [Patch] Specify unit for 'every' in ifstated.conf.5

2018-12-06 Thread Ted Unangst
Jason McIntyre wrote: > On Thu, Dec 06, 2018 at 10:21:47PM +1100, Ross L Richardson wrote: > > > > The number is in seconds, but that's currently not specified. > > > > Wording which preserved "frequency" but made sense with "seconds" > > eluded me, so I changed things to refer to "interval". >

find -not

2018-12-05 Thread Ted Unangst
Seen in the wild. Alias for ! that's friendlier to the shell. Index: find.1 === RCS file: /cvs/src/usr.bin/find/find.1,v retrieving revision 1.95 diff -u -p -r1.95 find.1 --- find.1 1 Aug 2018 07:09:15 - 1.95 +++

apmd debug

2018-11-30 Thread Ted Unangst
Developers who shall remain anonymous were confused by the behavior of apmd -d because the behavior of apmd -d is confusing. It doesn't do anything like any other daemon in the system when running with -d. This introduces a logmsg function to replace syslog, which will either syslog or printf

Re: apmd status at suspend/resume

2018-11-29 Thread Ted Unangst
Klemens Nanni wrote: > On Thu, Nov 29, 2018 at 02:50:58PM -0500, Ted Unangst wrote: > > I would find it useful to know battery percentage at the time of suspend and > > resume. This makes it possible to see how much battery was consumed while > > sleeping. I don't think this

apmd status at suspend/resume

2018-11-29 Thread Ted Unangst
I would find it useful to know battery percentage at the time of suspend and resume. This makes it possible to see how much battery was consumed while sleeping. I don't think this is much noisier than things already are. Index: apmd.c

dns over https for rebound

2018-11-29 Thread Ted Unangst
6 tedu Exp $ */ +/* + * Copyright (c) 2018 Ted Unangst + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE I

Re: fuse_parse_cmd_line.3 patch

2018-11-28 Thread Ted Unangst
Edgar Pettijohn III wrote: > remove a bunch of `_' where there shouldn't be `_'s please resend without nonbreaking spaces breaking the diff.

Re: NMEA: add more gps sensor values (altitude, precision...)

2018-11-03 Thread Ted Unangst
Mark Kettenis wrote: > SENSOR_VELOCITY would make sense. It should be m/s with some > appropriate scaling. We don't need to represent speeds higer than > 299792458 m/s, so micrometers per second would be a good choice. is it reasonable to use mm/s so that distance and velocity are consistent?

Re: getent: prefer usernames over UIDs

2018-11-01 Thread Ted Unangst
Klemens Nanni wrote: > Prompted by tedu@'s recent reply, here's a fix for getent(1) to lookup > keys as UIDs only if the username lookup fails to prevent clobbering > numerical usernames. yes, this is how it should be. please fix group lookup as well.

Re: top: accept UIDs

2018-11-01 Thread Ted Unangst
Klemens Nanni wrote: > On Thu, Nov 01, 2018 at 02:56:38PM -0400, Ted Unangst wrote: > > this looks to be in the wrong order. if 1000 is a username, that should be > > matched first before numeric lookup. > Preferring UIDs indeed clobbers usernames with the respective nu

Re: top: accept UIDs

2018-11-01 Thread Ted Unangst
Klemens Nanni wrote: > This makes `top -U 0' and "u-1000" work. > > Overview: > > "kn" ok"10kn"ok if "10kn" exists else error > "-kn"ok"-10kn" ok if "10kn" exists else error > "1000" ok"--1000" error, negative UID and "-1000" not valid >

Re: lib/libfuse: Handle signals that get sent to any thread

2018-10-29 Thread Ted Unangst
Rian Hunter wrote: > Another gentle bump on this patch: this looks about right.

Re: doas(1): Exit Status

2018-10-12 Thread Ted Unangst
Dave Cameron wrote: > doas(1) currently states: > -clip- > EXIT STATUS > The doas utility exits 0 on success, and >0 if an error occurs. It may > fail for one of the following reasons: > > o The config file /etc/doas.conf could not be parsed. > o The user attempted to run

Re: [patch] rebound: add NULL pointer checks

2018-09-10 Thread Ted Unangst
Anton Lindqvist wrote: > > > > Since it's a daemon I guess it makes sense to continue execution instead > > > > of dying. However, we should make sure to not leak memory along the > > > > error paths. Also, log something when preloading the cache fails. > > Committed, I settled on using goto.

Re: Libressl question

2018-05-30 Thread Ted Unangst
Brent Cook wrote: > On Mon, Feb 12, 2018 at 09:27:16AM -0600, ed...@pettijohn-web.com wrote: > > Has there been any discussion of packaging libtls separately from libressl > > for portable use? With my limited skills I was able to write a program to > > talk to smtpd and starttls using nothing

Re: Error in adding system call in OpenBSD 6.3

2018-04-23 Thread Ted Unangst
Neeraj Pal wrote: > > In file included from /usr/src/sys/kern/sys_test.c:4: > /usr/src/sys/sys/syscallargs.h:153:13: error: unknown type name > 'socklen_t'; did you mean '__socklen_t'? Your includes are in the wrong or some are missing. I think you should start by adding code to a file that

Re: Error in adding system call in OpenBSD 6.3

2018-04-23 Thread Ted Unangst
Neeraj Pal wrote: > 4) echo "file kern/sys_hello.c" >> /usr/src/sys/conf/files > > 5) cd /usr/src/sys/arch/amd64/compile/CUSTOM.MP/ > > 6) make obj && make -j4 > > And, then, It throws an error given below, > > " > ld -T ld.script -X --warn-common -nopie -o bsd ${SYSTEM_HEAD} vers.o ${OBJS} >

Re: map stack problem with "homemade" stackguard

2018-04-16 Thread Ted Unangst
Sebastien Marie wrote: > Assuming the check on protection is a bit too restrictive, and it is > fine to have some chunks with PROT_NONE, I think we want something like: are readonly stacks meaningful? if so, we should fix that too now instead of waiting. > > Index: uvm/uvm_map.c >

Re: Stop ping telling world its pid

2018-04-12 Thread Ted Unangst
Job Snijders wrote: > I’m not great at math, with a 16 bit random value, wouldn’t we start > running into ID collisions around 256 concurrent ping processes? Perhaps > that already is the case today and this patch does nothing to improve that, > but also doesn’t make it worse. what we need is an

Re: try to map 64-bit mem space first

2018-04-10 Thread Ted Unangst
Mark Kettenis wrote: > We should allways use mmio instead of io if possible. The cascading > if statements are a bit ugly, but I can't come up with a better solution. mapped = 0; if (pcimap() == 0) mapped = 1; if (!mapped && pcimap() == 0)

Re: Kernel size beyond 16 MB on amd64

2018-03-13 Thread Ted Unangst
Franco Fichtner wrote: > What can we do to help? Write smaller code...

Re: Blowfish_expand0state invocation order

2018-03-08 Thread Ted Unangst
Delan Azabani wrote: > Are there any interesting reasons behind this difference (aside from > a simple mistake in either the implementation or the paper)? > > Does the difference in order have any cryptanalytic implications (it > would surprise me if there were, but I’m not really a

Re: getentropy does not explicit_bzero if copyout fails

2018-02-21 Thread Ted Unangst
Mateusz Guzik wrote: > As the subject states. By the time the code gets to copyout, buf is > already populated. Clearing it only if copyout succeeds looks like a > braino, thus the following trivial proposal: If the secret random data is not copied out, it will not be used, and there's nothing to

Re: Introduce killjobc()

2018-02-09 Thread Ted Unangst
Martin Pieuchot wrote: > Diff below moves some job control bits out of exit1(). It is extracted > from guenther@'s proctreelk diff. It's currently a noop so I'd like to > get it in to reduce the locking diff. > > ok? i misread subject as kill objc, but ok anyway.

Re: Make systat(1) list ordering

2018-02-07 Thread Ted Unangst
Martijn van Duren wrote: > Some manpage nits found by jmc. heh, was about to say the same. not a big systat user, but i don't see why not. ok > > Index: engine.c > === > RCS file: /cvs/src/usr.bin/systat/engine.c,v > retrieving

Re: sys_socket() plumbing

2018-02-07 Thread Ted Unangst
Martin Pieuchot wrote: > Diff below shuffles sys_socket() to look like sys_socketpair(). > > The goal is to do socket operations first in both functions. Since > they don't need the KERNEL_LOCK(), we will be able to mark the syscalls > NOLOCK and only grab it before messing with file

Re: git a/ b/ diffs vs /dev/null

2017-12-20 Thread Ted Unangst
Theo Buehler wrote: > The diff below only skips 6 letters if they actually are '--- a/' or > '+++ b/' and seems to do the trick for me in various scenarios. asymptotically approaching correct, i like it.

Re: Use ENFILE errno instead of ENOMEM in pipespace()

2017-12-18 Thread Ted Unangst
Alexander Kuleshov wrote: > pipe()/pipe2() system calls may fail now with ENOMEM error during creation in > pipe_create() -> pipespace(). The bellow diff replaces ENOMEM with ENFILE > errno which is already documented for pipe()/pipe2() to decrease amount of > possible errno(s) with similar

Re: hide wpakey from root by default

2017-11-26 Thread Ted Unangst
Jeremie Courreges-Anglas wrote: > > I don't think anything has been committed regarding this issue, right? this looks ok to me.

Re: hide wpakey from root by default

2017-11-17 Thread Ted Unangst
Stefan Sperling wrote: > Or is modifying ifconfig sufficient? > We are more concerned about textual display rather than the > kernel/userland ioctl boundary, correct? > > The option list for ifconfig is [-AaC]. Plenty of letters available. > We could add: > >-P Show authentication details

Re: faster printf

2017-11-16 Thread Ted Unangst
Ingo Schwarze wrote: > [EILSEQ] > A wide-character code that does not correspond to a valid > character has been detected. > > That means that the functions are *required* to fail ("shall fail") > if encoding errors can be detected, that -1 must be returned, and > that errno must

Re: maxproc limits

2017-10-06 Thread Ted Unangst
Stuart Henderson wrote: > I have been bumping into maxproc limits a lot recently on my > workstation. While I do have quite a lot of processes at times, I don't > think I have quite been tripping into the limits of number of actual > processes. > > It seems that perhaps threads are counted

Re: malloc.c: better double free check

2017-09-23 Thread Ted Unangst
Otto Moerbeek wrote: > Hi, > > Malloc maintains a list if 16 slots of chunks to be freed. On free a > chunk is put in a random slot and the existing chunk in that slot is > actually freed. Currently, the code only checks the slot selected for > a double free. > > This diff adds code to check all

Re: [patch] ftp(1): change mtime for http/https links

2017-09-23 Thread Ted Unangst
Raf Czlonka wrote: > This is unrelated to your diff but what I do instead is to check > the BUILDINFO file - it's tiny and all the information you need, > is already there. While we're on the subject, I'll point out that sometimes only the base sets change, but not the x sets. If you download

Re: [patch] Add -z and -Z to apmd for automatic suspend/hibernate

2017-08-28 Thread Ted Unangst
Jesper Wallin wrote: > On Tue, Aug 15, 2017 at 07:24:47PM -0400, Ted Unangst wrote: > > this looks good. will commit soon. > > > > (one nit, i'll correct, is man page options are upper case first.) > > Sorry if this comes on as a bit pushy, but any news here? I don't

two doas parse.y tweaks

2017-08-27 Thread Ted Unangst
make things a little more convenient. a backslash indicates escape, which we don't need to support for keywords. so always set nonkw for those tokens. this lets "permit \permit" work. there are no keywords after the args keyword, so we can create a lexer backdoor. this lets "permit user cmd ls

Re: [patch] Add -z and -Z to apmd for automatic suspend/hibernate

2017-08-15 Thread Ted Unangst
Jesper Wallin wrote: > On Sun, Aug 13, 2017 at 09:52:22AM +0200, Martijn van Duren wrote: > > I've also been bitten by this a couple of times, but you can also solve > > this via the sensorsd framework, which is how I've done it. > > Yeah, someone on IRC also suggested sensorsd or even ksh and a

Re: [patch] Add -z and -Z to apmd for automatic suspend/hibernate

2017-08-15 Thread Ted Unangst
Jesper Wallin wrote: > On Mon, Aug 14, 2017 at 05:12:05PM +0200, Klemens Nanni wrote: > > Personally I'd also prefer having this in apmd(8) rather than some other > > daemon or script. Some comments: > > > > You should pass optarg instead of errstr to error(). Either ways error() > > will still

Re: Please test: HZ bump

2017-08-14 Thread Ted Unangst
Ted Unangst wrote: > Martin Pieuchot wrote: > > I'd like to improve the fairness of the scheduler, with the goal of > > mitigating userland starvations. For that the kernel needs to have > > a better understanding of the amount of executed time per task. > > > >

Re: Please test: HZ bump

2017-08-14 Thread Ted Unangst
Martin Pieuchot wrote: > I'd like to improve the fairness of the scheduler, with the goal of > mitigating userland starvations. For that the kernel needs to have > a better understanding of the amount of executed time per task. > > The smallest interval currently usable on all our architectures

Re: [patch] Add -z and -Z to apmd for automatic suspend/hibernate

2017-08-14 Thread Ted Unangst
Klemens Nanni wrote: > > + case 'z': > > + autoaction = AUTO_SUSPEND; > > + autolimit = strtonum(optarg, 1, 100, ); > > + if (errstr != NULL) > > + error("invalid percent: %s", errstr); > > +

Re: no seqpacket in nfs

2017-08-13 Thread Ted Unangst
Alexander Bluhm wrote: > On Sun, Aug 13, 2017 at 05:20:05PM -0400, Ted Unangst wrote: > > - if (nmp->nm_sotype != SOCK_STREAM) > > - panic("nfscon sotype"); > > + } else { > > + panic("nfscon sotype&quo

no seqpacket in nfs

2017-08-13 Thread Ted Unangst
discovered this looking at something else. we don't and won't support seqpacket for nfs sockets. perhaps a bit more can be cleaned up too. i don't think we support any stream sockets that don't require connections, etc... Index: nfs_socket.c

fktrace

2017-08-11 Thread Ted Unangst
adds fktrace syscall. currently with same behavior (regular files only) as existing code. tested with ktrace and... #include #include #include #include #include int main() { int fd; fd = open("ledump", O_CREAT, 0666); syscall(113, fd, KTROP_SET, KTRFAC_NAMEI,

vmd vioblk writer thread

2017-08-10 Thread Ted Unangst
this moves writes into a thread. we need to do reads too, but the write side is much easier... could use a little more testing. Index: virtio.c === RCS file: /cvs/src/usr.sbin/vmd/virtio.c,v retrieving revision 1.49 diff -u -p

Re: Improve the accuracy of the TSC frequency calibration (Was: Calculate the frequency of the tsc timecounter)

2017-08-07 Thread Ted Unangst
Adam Steen wrote: > I initially thought the calibration would take place at line 470 of > amd64/identcpu.c > (https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/amd64/amd64/identcpu.c?annotate=1.87) > > But I looked into using the acpihpet directly but it is never exposed > outside of

Re: Fix libexec/ld.so/dlclose regress

2017-08-03 Thread Ted Unangst
Joerg Sonnenberger wrote: > On Wed, Aug 02, 2017 at 09:03:30PM +0200, Mark Kettenis wrote: > > Couldn't convince clang not to inline duplicateFun() into bbTest2(). > > Splitting things out in a seperate file avoids the issue. Fixes the > > regression test. > > Have you tried the combiniation of

Re: clang ld.so regress failures

2017-08-01 Thread Ted Unangst
Mark Kettenis wrote: > FAIL libexec/ld.so/dlclose/test1/prog3/prog3 > > This fails because clang doesn't respect ELF interposition: > > http://lists.llvm.org/pipermail/llvm-dev/2016-November/107625.html > > We generally frown upon interposition so I can have some sympathy > for their

Re: [patch] httpd: don't add date header if already set

2017-07-30 Thread Ted Unangst
Florian Obser wrote: > OK florian@ > > p.s. whoever commits this please add extra ( ) around the && term, > Apparently clang no longer supports operator precedence *sigh*. > > I'm wondering if it also warns for a * b + c > > /usr/src/usr.sbin/httpd/server_fcgi.c:665:56: warning: '&&' within

Re: printf(3) return value on ENOMEM

2017-07-26 Thread Ted Unangst
Ingo Schwarze wrote: > So i say in all cases above, return -1, set ENOMEM, and it doesn't > matter much whether anything is printed, except that asprintf(3) > must of course free(3) any allocated memory before returning and > set the pointer to NULL. yeah. the number of bytes returned seems like

Re: kill: Use __dead, declare functions static

2017-07-24 Thread Ted Unangst
Klemens Nanni wrote: > usage() never returns, all functions are to be used within this unit > only. > > Since changes are conflicting, I'll wait for this diff first, but I'd > like to remove the void casts for fprintf and use getprogname(3) over > __progname as well. > > Feedback? Comments? I

Re: crypt_checkpass.3: mention additional failure case for crypt_newhash

2017-07-21 Thread Ted Unangst
Scott Cheloha wrote: > crypt_newhash(3) will return -1 and set errno to EINVAL if hashsize is > too small to accommodate bcrypt's hash space. I imagine this would > also be the case if anything other than bcrypt were supported. i went ahead and reworked the page a bit. i think it clarifies a few

Re: introduction of an additional non-POSIX function in libpthread

2017-07-18 Thread Ted Unangst
David CARLIER wrote: > Hi. > > I sent a diff originally to a smaller audience but finally decided to post > it in the mailing list. > So it is to introduce the pthread_set_name_np's counterpart so > pthread_get_name_np. > Some softwares use it (NSPR for example) and anyway internally in my >

Re: RFC 7217: random but stable addresses (take 2)

2017-07-13 Thread Ted Unangst
David Gwynne wrote: > secondly, im always wary of truncating hash output in case it throws away > some of the guarantees it's supposed to provide. if you cut sha512 output > down to an 8th of its size, is it 8 times easier to calculate a collision, or > more than 8 times easier? sha384 being a

Re: remove CPU_LIDSUSPEND/machdep.lidsuspend

2017-07-11 Thread Ted Unangst
Martin Natano wrote: > Go ahead replacing machdep.lidsuspend with cpu.lidaction. OpenBSD 6.1 > contains both MIBs, so there is a clear path for migration. i have updated my sysctl.conf. fire away!

Re: Remove accents from fortunes

2017-07-11 Thread Ted Unangst
Ingo Schwarze wrote: > Hi, > > Ted Unangst wrote on Tue, Jul 11, 2017 at 09:41:36AM -0400: > > > and it always sucks to lose information if somebody went to the > > trouble of recording the necessary accents already. > > So here is a patch that makes putting U

Re: Remove accents from fortunes

2017-07-11 Thread Ted Unangst
Anthony J. Bentley wrote: > "Ted Unangst" writes: > > Anthony J. Bentley wrote: > > > Hi, > > > > > > "Punctuation followed by backspace" hasn't been the right way to enter > > > accents for a long time. > > &g

Re: Remove accents from fortunes

2017-07-11 Thread Ted Unangst
Anthony J. Bentley wrote: > Hi, > > "Punctuation followed by backspace" hasn't been the right way to enter > accents for a long time. hard to see what the diff is doing since i coudn't see the backspaces. :) do we want to delete them? or replace them with proper utf-8 sequences?

Re: Use getprogname(3) in style(9)

2017-07-10 Thread Ted Unangst
Matthew Martin wrote: > Since __progname is not exposed in stdlib.h, use getprogname(3) instead. > While here remove the useless cast. yes. i also removed the declaration a few lines above. > If this is ok, I'd like to also replace the uses of __progname > throughout the tree with getprogname().

Re: Use modesetting driver on i965 and up

2017-07-10 Thread Ted Unangst
Mark Kettenis wrote: > This diff has been in snaps for a while now. This matches what > several major Linux distros do. > > ok? for those of us who haven't memorized hex PCI IDs, can we add a comment indicating the codename of the cutoff? broadwell or skylake or whatever? everything becomes

libevent vs ktrace

2017-07-09 Thread Ted Unangst
i've found ktrace of libevent to be a little noisy and hard to read because it always passes in a changes pointer to kevent, even with a count of 0. this is just a tiny change to pass NULL in that case, so that kdump doesn't spit out big hex numbers at me. Index: kqueue.c

Re: Standard conformance of strtol(3)

2017-07-05 Thread Ted Unangst
Olivier Antoine wrote: > Hi all, > > Recently a bug has been identified in Tor: > > https://trac.torproject.org/projects/tor/ticket/22789 > > As comments were made, questions were raised about the use of strtol(3), > the different interpretations of the standard and their implementation. > >

Re: Missed ifconfig [[-]txpower dBm] option for 802.11

2017-07-04 Thread Ted Unangst
Denis wrote: > Looking for ifconfig '[[-]txpower dBm]' option which was present in > OpenBSD 5.4 amd64. Try to find 'txpower' on 6.0 amd64 but seems it > missed out. > > Actively using it to match power for 802.11 card and it's RF recipient > (post amp). What mechanism of output power matching is

rebound listen address

2017-07-02 Thread Ted Unangst
I received a similar diff from Angelos a while back, though I turned it down on the grounds that rebound wasn't ready to be a recursive resolver. But I think we're in better shape now. This adds a -l address option to specify the listening address, turning rebound into a lightweight partial

systemd compat for doas

2017-07-02 Thread Ted Unangst
If the username starts with a digit, but isn't a number, treat it like root. Index: doas.c === RCS file: /cvs/src/usr.bin/doas/doas.c,v retrieving revision 1.72 diff -u -p -r1.72 doas.c --- doas.c 27 May 2017 09:51:07 -

Re: brconfig: Unify/fix strtoul(3) handling

2017-07-01 Thread Ted Unangst
Ricardo Mestre wrote: > Of course the diff still may make sense if working with different bases, > apart from 10, is not required anymore. i had a glance through and didn't see any that made sense to keep support for octal or hex. was hoping a more serious brconfig user would also take a look at

Re: proposal: syspatch -v

2017-06-29 Thread Ted Unangst
Peter Piwowarski wrote: > At present, what exactly was patched is not immediately obvious from > syspatch output, which could be annoying for administrators who want to > take some action based on what was changed (restart daemons linked to > patched libraries, etc). Could a -v option for syspatch

Re: ssl.8 and subject altnames

2017-06-28 Thread Ted Unangst
Stuart Henderson wrote: > On 2017/06/27 18:11, Ted Unangst wrote: > > so chrome at least has gotten pretty uppity about certs that lack subject > > altnames. > > Oh that's going to be hilarious. There are at least valid reasons for > doing this (e.g. nameConstraints don'

ssl.8 and subject altnames

2017-06-28 Thread Ted Unangst
so chrome at least has gotten pretty uppity about certs that lack subject altnames. following the instructions in ssl.8 is no longer sufficient. here's a short hint about how to fix this. Index: ssl.8 === RCS file:

Re: Attempt to simplify file(1)

2017-06-27 Thread Ted Unangst
Bryan Steele wrote: > OpenBSD's file(1) implementation was written by nicm@, first introduced > in 5.8, the inital design included a privileged parent process which > forked an unprivileged child which would handle potentially unsafe > file parsing. > > It also had 'sandboxing' using systrace(4),

Re: lock(1): use crypt_checkpass(3) for one-off keys

2017-06-26 Thread Ted Unangst
Scott Cheloha wrote: > Hi, > > Using strcmp(3) to check a password is just asking for a timing > attack. > > I admit that setting up such an attack on a custom lock(1) key at, > say, a physical terminal would be cumbersome, so maybe this is just > paranoia. > > However, passwords *do* get

Re: [PATCH] cp(1): add -v option for verbosity

2017-06-25 Thread Ted Unangst
Job Snijders wrote: > On Sun, Jun 25, 2017 at 02:06:20PM +0200, Job Snijders wrote: > > This patch adds a -v option to cp(1) for more verbose output. > > NetBSD/FreeBSD/DragonFly/OSX's cp(1) with "-v" print file names without > the single quotes, which might indeed be more appealing to the eye:

Re: [PATCH] ffs: always assign random inode generation numbers

2017-06-25 Thread Ted Unangst
Dmitry Chestnykh wrote: > Hello, > > In ffs_inode_alloc(), inode generation numbers are incremented after > being assigned an initial random value. Since the di_gen field is a > signed integer, it may overflow, causing undefined behavior (this is > unlikely to ever happen, though). > > This

Re: Fix xf86-video-intel driver

2017-06-23 Thread Ted Unangst
Jonathan Gray wrote: > On Sat, Jun 24, 2017 at 11:20:00AM +1000, Jonathan Gray wrote: > > On Sat, Jun 24, 2017 at 03:00:19AM +0200, Mark Kettenis wrote: > > > The code doesn't fully initialize the structure, which was extended to > > > include a flags member at some point. Since the pending

Re: ktrace: Allow appending to FIFOs

2017-06-20 Thread Ted Unangst
Klemens Nanni wrote: > I wanted to quickly debug some program without actually dumping to disk > by using FIFOs, however ktrace(2) wouldn't accept anything but regular > files. > > Are there any pitfalls or limitations I am currently not aware of that > justify this strict behaviour? oh, neat,

Re: inteldrm: add a handler for the WSDISPLAYIO_GINFO ioctl

2017-06-18 Thread Ted Unangst
Frederic Cambus wrote: > On Sat, Jun 17, 2017 at 05:27:38PM -0400, Ted Unangst wrote: > > > > Add a handler for the WSDISPLAYIO_GINFO ioctl in inteldrm, allowing > > > to retrieve basic information about a framebuffer display. > > [...] > > > why?

Re: inteldrm: add a handler for the WSDISPLAYIO_GINFO ioctl

2017-06-17 Thread Ted Unangst
Frederic Cambus wrote: > Hi tech@, > > Add a handler for the WSDISPLAYIO_GINFO ioctl in inteldrm, allowing > to retrieve basic information about a framebuffer display. > > When running wsconsctl on a machine with inteldrm support, this now > returns those additional fields: > >

Re: Static linking without PIE

2017-06-14 Thread Ted Unangst
Charles Collicutt wrote: > On 14 June 2017 at 19:22, Ted Unangst <t...@tedunangst.com> wrote: > > > Charles Collicutt wrote: > > > That works, thank you. gcc-local(1) only mentions -nopie as an option for > > > the linker, so I thought it ought to be passed

Re: Static linking without PIE

2017-06-14 Thread Ted Unangst
Charles Collicutt wrote: > On 14 June 2017 at 17:34, Ted Unangst <t...@tedunangst.com> wrote: > > > gcc -static -nopie -o foo foo.c > > > > That works, thank you. gcc-local(1) only mentions -nopie as an option for > the linker, so I thought it ought to be pa

Re: Better handling of short reads

2017-06-14 Thread Ted Unangst
Mike Belopuhov wrote: > On Wed, Jun 14, 2017 at 11:43 -0400, Ted Unangst wrote: > > Mike Belopuhov wrote: > > > still looking forward to replies to the original set of changes. > > > > i'm a little in between. on the one hand, yes, ok, it's good that we don't >

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