Fix overflow handling in dd(1)

2014-06-13 Thread William Orr
This diff fixes the overflow handling in dd(1). Before, if provided an argument of SIZE_T_MAX, dd(1) would exit with dd: count: Undefined error: 0 since strtoul(3) doesn't set errno when its argument is equal to ULONG_MAX. Now, dd(1) handles SIZE_T_MAX gracefully. Index: args.c

Re: diff: Fix overflow handling in dd(1)

2014-06-22 Thread William Orr
(files_cnt--) dd_in(); } On Jun 13, 2014, at 9:26 PM, William Orr w...@worrbase.com wrote: This diff fixes the overflow handling in dd(1). Before, if provided an argument of SIZE_T_MAX, dd(1) would exit with dd: count: Undefined error: 0 since strtoul(3) doesn't

Undefined symbol in ld.so

2014-06-24 Thread William Orr
ld.so in -current isn't building right now, due to an undefined reference to _dl_realloc caused by the recent addition of _dl_reallocarray. The following diff implements _dl_realloc, largely copied from the implementation in lib/libc/stdlib/malloc.c. tested on amd64 Index: malloc.c

Re: Undefined symbol in ld.so

2014-06-24 Thread William Orr
Whoops! Sorry for the confusion; disregard. On Jun 24, 2014, at 3:31 AM, Otto Moerbeek o...@drijf.net wrote: On Tue, Jun 24, 2014 at 01:30:55AM -0700, William Orr wrote: ld.so in -current isn't building right now, due to an undefined reference to _dl_realloc caused by the recent addition

Re: lynx: disable old protocols

2014-07-10 Thread William Orr
On Jul 10, 2014, at 8:05 PM, Daniel Dickman didick...@gmail.com wrote: Patch below turns off the following ancient protocols built into lynx: bibp, finger, gopher, and news. For some urls, lynx will invoke an external command. Turn off telnet, rlogin and tn3270 urls by defining them to

Re: lynx: disable old protocols

2014-07-13 Thread William Orr
On 7/11/2014 2:03 AM, Theo de Raadt wrote: If lynx was removed from base, and only available in ports... how many of you would even know of it's existance and use it? I absolutely would use it if it were only available in ports. I only complain about gopher support being removed because lynx

[PATCH] fix overflow handling in dd(1)

2014-07-13 Thread William Orr
Hey, I sent a patch similar to this almost a month ago with no response. Feedback? Interest? This patch fixes the following: - Takes negative values - When SIZE_T_MAX was passed, returns undefined error Index: bin/dd/args.c ===

Re: [PATCH] fix overflow handling in dd(1)

2014-07-13 Thread William Orr
Sorry, the libssl patch was unintentional. I forgot to cvs up -C that one. On 7/13/2014 2:05 AM, Ted Unangst wrote: On Sun, Jul 13, 2014 at 01:52, William Orr wrote: Hey, I sent a patch similar to this almost a month ago with no response. Feedback? Interest? Yes. - num = strtoul(val

Re: [PATCH] fix overflow handling in dd(1)

2014-07-13 Thread William Orr
) { + if (cpy_cnt != 0) { while (files_cnt--) dd_in(); } On 7/13/2014 2:08 AM, William Orr wrote: Sorry, the libssl patch was unintentional. I forgot to cvs up -C that one. On 7/13/2014 2:05 AM, Ted Unangst wrote: On Sun, Jul 13, 2014 at 01:52

Re: [PATCH] fix overflow handling in dd(1)

2014-08-04 Thread William Orr
Hey, Sorry to bring this up again, but are there any other changes that need to be made to this patch? I've fixed all of the major complaints. Thanks, William Orr On 07/13/2014 02:19 AM, William Orr wrote: Here is the latest diff with the bullshit removed and the loop replaced with strchr

[PATCH] fix overflow handling in dd(1)

2014-09-11 Thread William Orr
Hey, I'm resubmitting this patch since the source tree was locked last time I submitted. Any thoughts? Thanks, William Orr Index: bin/dd/args.c === RCS file: /cvs/src/bin/dd/args.c,v retrieving revision 1.25 diff -u -b -w -p -r1.25

[PATCH] Add -d flag to du(1)

2014-09-15 Thread William Orr
Hey, This diff adds a flag to du(1) to limit the depth of results that are displayed to the user. The semantics are equivalent to FreeBSD's, where it is mutually exclusive with -a and -s, and du -d 0 is equivalent to du -s. Thoughts? William Orr Index: usr.bin/du/du.1

Re: [PATCH] Add -d flag to du(1)

2014-09-16 Thread William Orr
] [file ...]\n); + usage: du [-a | -s | -d depth] [-chkrx] [-H | -L | -P] [file ...]\n); exit(1); } On 9/15/2014 10:58 PM, William Orr wrote: Hey, This diff adds a flag to du(1) to limit the depth of results that are displayed to the user. The semantics are equivalent

Re: [PATCH] Add -d flag to du(1)

2014-09-17 Thread William Orr
On 9/16/2014 4:00 PM, Ingo Schwarze wrote: Hi, On 9/15/2014 10:58 PM, William Orr wrote: This diff adds a flag to du(1) to limit the depth of results that are displayed to the user. The semantics are equivalent to FreeBSD's, where it is mutually exclusive with -a and -s, and du -d 0

Tiny fixes to spamd

2013-08-17 Thread William Orr
Loop variables are declared as ints when they're compared to size_ts. This only becomes an issue when the config file or the output buffer becomes unreasonably large. Index: libexec/spamd/grey.c === RCS file:

Re: Tiny fixes to spamd

2013-08-17 Thread William Orr
William Orr mailto:w...@worrbase.com August 17, 2013 3:51 PM Loop variables are declared as ints when they're compared to size_ts. This only becomes an issue when the config file or the output buffer becomes unreasonably large. Index: libexec/spamd/grey.c

bump time_t/other type fixes to spamd

2013-08-20 Thread William Orr
Bump William Orr mailto:w...@worrbase.com August 17, 2013 7:03 PM Whoops, missed the downcast of time_t to int in the sscanfs. Here's a revised patch. Index: src/libexec/spamd/grey.c === RCS file: /cvs/src/libexec/spamd

Re: bump time_t/other type fixes to spamd

2013-08-20 Thread William Orr
William Orr mailto:w...@worrbase.com August 20, 2013 7:40 PM Bump Theo pointed out that it would be better to change whitecount to an int, so as to match the call to configure_pf(). Since trapcount is logically similar, and uses the same iterator variable in freeaddrlists(), I changed

PATCH: Octeon RNG support

2013-10-21 Thread William Orr
=== RCS file: dev/cn30xxrnmreg.h diff -N dev/cn30xxrnmreg.h --- /dev/null 1 Jan 1970 00:00:00 - +++ dev/cn30xxrnmreg.h 22 Oct 2013 02:55:23 - @@ -0,0 +1,50 @@ +/* $OpenBSD$ */ +/* + * Copyright (c) 2013 William Orr w...@worrbase.com + * All rights reserved

PATCH: Round 2 of octeon rng

2013-10-22 Thread William Orr
=== RCS file: dev/cn30xxrnmreg.h diff -N dev/cn30xxrnmreg.h --- /dev/null 1 Jan 1970 00:00:00 - +++ dev/cn30xxrnmreg.h 23 Oct 2013 01:22:06 - @@ -0,0 +1,40 @@ +/* $OpenBSD$ */ +/* + * Copyright (c) 2013 William Orr w...@worrbase.com

Re: PATCH: Round 2 of octeon rng

2013-10-22 Thread William Orr
On Oct 22, 2013, at 9:06 PM, Ted Unangst t...@tedunangst.com wrote: On Tue, Oct 22, 2013 at 18:31, William Orr wrote: You'll notice that there's no significant difference between the output of the two rngs. However, with octrng the dd completed in under a minute (more entropy in pool

Re: PATCH: Round 2 of octeon rng

2013-10-23 Thread William Orr
On Oct 23, 2013, at 4:38 AM, Paul Irofti p...@irofti.net wrote: Hi William, I have an almost identical diff in my tree for a driver for octeon's RNG. On which machines did you test this? I wrote mine for DSR-500. But I remember the reads had some hick-ups. Since why I did not commit

Re: PATCH: Round 2 of octeon rng

2013-10-23 Thread William Orr
On Oct 22, 2013, at 11:54 PM, Ted Unangst t...@tedunangst.com wrote: On Tue, Oct 22, 2013 at 22:05, William Orr wrote: I guess I misunderstood, as I thought that /dev/random dumped the entropy pool, and that /dev/arandom put the random data through a stream cipher so that grabbing random

small acpiac(4) update

2014-12-07 Thread William Orr
This is a small documentation update for acpiac(4). The implmentation no longer seems to poll every 10 seconds, so I've removed it from the manpage. Index: share/man/man4/acpiac.4 === RCS file: /cvs/src/share/man/man4/acpiac.4,v

ukbd.c update for older macbook airs

2014-12-12 Thread William Orr
Hey, On some macbook airs, the function keys have different functionality when the Fn key is pressed. I've added an additional munge function to handle these particular cases. Thanks, William Orr Index: sys/dev/usb/ukbd.c === RCS

[PATCH] ukbd.c cleanup and mba iso support

2015-02-04 Thread William Orr
Hey, This implements some of Alexey's comments as well as munging the grave key for macbook airs. Tested on a mba with a WELLSPRING ANSI keyboard. Thanks, William Orr Index: sys/dev/usb/ukbd.c === RCS file: /cvs/src/sys/dev/usb

Re: [PATCH] ukbd.c cleanup and mba iso support

2015-02-18 Thread William Orr
Hey, Any interest? Thanks, William Orr On 2/4/15 9:37 AM, William Orr wrote: Hey, This implements some of Alexey's comments as well as munging the grave key for macbook airs. Tested on a mba with a WELLSPRING ANSI keyboard. Thanks, William Orr Index: sys/dev/usb/ukbd.c

Re: [PATCH] ukbd.c update for older macbook airs

2015-01-13 Thread William Orr
Hey, any interest? On 12/12/2014 08:29 PM, William Orr wrote: Hey, On some macbook airs, the function keys have different functionality when the Fn key is pressed. I've added an additional munge function to handle these particular cases. Thanks, William Orr Index: sys/dev/usb/ukbd.c

Re: Multiple cmsghdrs in msghdr

2015-04-15 Thread William Orr
On 4/15/15 5:37 AM, Otto Moerbeek wrote: On Wed, Apr 15, 2015 at 11:32:11AM +0200, Mark Kettenis wrote: Date: Tue, 14 Apr 2015 21:26:25 -0400 From: William Orr w...@worrbase.com Hey, I was debugging a few CPython test failures yesterday, and I noticed that attaching multiple cmsg

[PATCH] Re: Multiple cmsghdrs in msghdr

2015-04-16 Thread William Orr
This documents the error code when passing multiple cmsg structs. Let me know if the wording needs to be improved. Index: lib/libc/sys/send.2 === RCS file: /cvs/src/lib/libc/sys/send.2,v retrieving revision 1.31 diff -u -p -r1.31

Multiple cmsghdrs in msghdr

2015-04-14 Thread William Orr
]); exit(0); case -1: err(1, fork); default: parent(sock[1]); exit(0); } } Thanks, William Orr signature.asc Description: OpenPGP digital signature

[PATCH] Additional pledge(2) documentation

2018-01-04 Thread William Orr
Hey, I was working on an application that uses pledge, and without diving into the source, I found it difficult to figure out what sysctl's are permitted at different pledge levels. This documents the set of different sysctl ops that are allowed at different pledge levels, and adds some

Re: [patch] remove uuid implementation in ldapd

2018-10-02 Thread William Orr
William Orr writes: > Hey, > > In looking through uuid generation situations on various > bsd's, I noticed that there's an additional implemetation > of uuid generation in ldapd. This one appears to generate > version 1 uuid's, which afaict from reading RFC 4530 isn

[patch] remove uuid implementation in ldapd

2018-10-02 Thread William Orr
Hey, In looking through uuid generation situations on various bsd's, I noticed that there's an additional implemetation of uuid generation in ldapd. This one appears to generate version 1 uuid's, which afaict from reading RFC 4530 isn't a requirement for a compliant ldap implementation. The

[PATCH] Documentation clarification for uuid_create(3)

2018-10-02 Thread William Orr
Hey, I've added a small clarification around uuid's generated by `uuid_create`, since DCE 1.1 doesn't explicitly specify version 4 UUIDs. This implementation differs from FreeBSD's and bitrig's as they generate version 1 UUIDs, which warrants this clarfication. Thanks Index: