Re: Simplify less(1) off_t formatting

2016-01-13 Thread Nicholas Marriott
I like the idea, but I don't like calling them ap_off_t and offttoa, I'd just keep ap_pos and postoa and remove the linenum functions. On Tue, Jan 12, 2016 at 11:50:51PM -0500, Michael McConville wrote: > I'm working on bigger simplifications for less's string formatting, but > this is a good

patch: udp "len < 0" check in dhcrelay

2016-01-13 Thread Stuart Henderson
dhcpd, dhclient and dhcrelay have not-quite-in-sync versions of packet.c; the one in dhcrelay is missing this check present in the others. OK to add it? Index: packet.c === RCS file: /cvs/src/usr.sbin/dhcrelay/packet.c,v retrieving

Re: ntpd.conf and Google

2016-01-13 Thread Renaud Allard
On 01/13/2016 06:10 AM, Theo de Raadt wrote: $ fgrep constraint /etc/ntpd.conf constraints from "https://www.google.com; $ www.google.com and other Google services are not accessible from countries like China or Vietnam. It's easy enough for people to change their ntpd.conf if necessary but

ppp_tty uiomove() conversion

2016-01-13 Thread Martin Natano
Below the uiomove() conversion for net/ppp_tty.c. M_TRAILINGSPACE() returns int, but the result can't be negative, so using u_int for the return value should be fine. Index: net/ppp_tty.c === RCS file: /cvs/src/sys/net/ppp_tty.c,v

spec_vnops.c uiomove() conversion

2016-01-13 Thread Martin Natano
Below the conversion to uiomove() for kern/spec_vnops.c. This diff prevents truncation of uio_resid when passed to min(). Index: kern/spec_vnops.c === RCS file: /cvs/src/sys/kern/spec_vnops.c,v retrieving revision 1.84 diff -u -p -u

Re: patch for security.html

2016-01-13 Thread Theo Buehler
committed, thanks On Wed, Jan 13, 2016 at 12:35:34PM +, Sevan Janiyan wrote: > Hi, > Attached patch removes references to vendors and generalises by > referring to "most vendors" (Sun & SGI no longer exist as the company > they once were and this saves from maintaining a list). > Links to

5.8 ifconfig vlan test

2016-01-13 Thread Alexander Bluhm
Hi, When creating, changing and destroying vlan interfaces multiple times, root can crash the OpenBSD 5.8 kernel with ifconfig. The code in -current has been implemented differently, so this fix only applies to 5.8. As I cannot test it with -current machines, could someone with OpenBSD 5.8 and

Re: [PATCH] Missing break in audio.c

2016-01-13 Thread Theo Buehler
On Wed, Jan 13, 2016 at 06:03:17PM +0200, Ville Valkonen wrote: > looks like there's a missing break in audio.c, since error gets assigned > twice and not read in between. You're right, but this has already been fixed in -current a few days ago:

[less] start simplifying message buffer logic

2016-01-13 Thread Michael McConville
message is a global static char[2048]. If I understand correctly (I've been playing with this for a while): * message is the user command result message displayed at the bottom (e.g. "Pattern not found (press RETURN)") * message is initialized to all NUL bytes because it's static * the

[calendar] Addition of a United Kingdom holiday file

2016-01-13 Thread Craig Skinner
Hello there, Following on from a bit of discussion on & off misc@, below is an attempt at a United Kingdom calendar file, with major items already in calendar.holiday ommitted. e.g. New Year's Day, although it is an offical bank/public holiday.

Re: Simplify less(1) off_t formatting

2016-01-13 Thread Michael McConville
Nicholas Marriott wrote: > I like the idea, but I don't like calling them ap_off_t and offttoa, > I'd just keep ap_pos and postoa and remove the linenum functions. Does this look good? Index: less.h === RCS file:

[diff] IFQ has its own protection

2016-01-13 Thread David Hill
Hello - IFQ has its own protection, so no need for splnet/splx. if_gif.c - use for (;;) to match the other drivers. Index: net/if_gif.c === RCS file: /cvs/src/sys/net/if_gif.c,v retrieving revision 1.83 diff -u -p -r1.83 if_gif.c

tty uiomove() conversion

2016-01-13 Thread Martin Natano
Below the conversion from uiomovei() to uiomove() for kern/tty.c and kern/tty_pty.c. 'cc' consistently contains small, non-negative integer values, so leaving the type as int should be ok. It could as well be changed to size_t, but I don't see a benefit in doing so for that particular case, except

Re: Simplify less(1) off_t formatting

2016-01-13 Thread Nicholas Marriott
Looks good, ok nicm On Wed, Jan 13, 2016 at 05:42:56PM -0500, Michael McConville wrote: > Nicholas Marriott wrote: > > I like the idea, but I don't like calling them ap_off_t and offttoa, > > I'd just keep ap_pos and postoa and remove the linenum functions. > > Does this look good? > > >

[patch] which(1): out of bounds read

2016-01-13 Thread Max Fillinger
If PATH starts with "/:", which(1) reads outside of allocated memory. Maybe that caused the non-reproduceable coredump mentioned in [0]? The function progname sets path = strdup(path) and pathcpy = path and runs the following loop: > while ((p = strsep(, ":")) != NULL) { > if (*p ==

[patch]: Small which(1) man page error

2016-01-13 Thread Max Fillinger
The man page says that which(1) works with unset PATH environment variable, as long as the argument is a pathname. However: $ unset PATH $ /usr/bin/which /usr/bin/which which: can't get $PATH from environment: Undefined error: 0 Index: usr.bin/which/which.1

Re: gcc typo

2016-01-13 Thread Michael McConville
Jan Schreiber wrote: > this looks like a typo in gcc. Committed. Thanks! > Index: gnu/gcc/gcc/config/mt/mt.c > === > RCS file: /cvs/src/gnu/gcc/gcc/config/mt/mt.c,v > retrieving revision 1.1.1.1 > diff -u -p -r1.1.1.1 mt.c > ---

Re: [patch] which(1): out of bounds read

2016-01-13 Thread Philippe Meunier
Max Fillinger wrote: >If PATH starts with "/:", which(1) reads outside of allocated memory. >Maybe that caused the non-reproduceable coredump mentioned in [0]? I think you're right as I did have / at the beginning of my PATH when which(1) coredumped on me. I was planning to look at it today but

Re: [PATCH] octeon.html

2016-01-13 Thread Gleydson Soares
committed, thanks!

[PATCH] Missing break in audio.c

2016-01-13 Thread Ville Valkonen
Hello, looks like there's a missing break in audio.c, since error gets assigned twice and not read in between. --- sys/dev/audio.c.oldWed Jan 13 17:55:32 2016 +++ sys/dev/audio.cWed Jan 13 17:55:48 2016 @@ -1704,6 +1704,7 @@ audioclose(dev_t dev, int flags, int ifmt, struct proc

Re: [PATCH] unsignedness comparison in brconfig.c

2016-01-13 Thread Theo de Raadt
> no need to check if unsigned value is smaller than zero. Please see the > attached patch. > > Gmail likely mangles the inlined patch but here it goes: > --- brconfig.c.oldWed Jan 13 16:35:39 2016 > +++ brconfig.cWed Jan 13 16:36:26 2016 > @@ -563,7 +563,7 @@ bridge_ifcost(const char

Re: Increasing ppp/tty buffer sizes

2016-01-13 Thread Theo de Raadt
> On Wed, 13 Jan 2016, Theo de Raadt wrote: > > - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; > > + tp->t_ispeed = tp->t_ospeed = 100; > > > > I don't think that is the right thing to do, without some testing. > > That is directly visible in the program running on