Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-05 Thread Nicholas Marriott
5, 2015 at 09:50:48AM +0000, Nicholas Marriott wrote: > > I don't know why cvs and rcs xmalloc.c has ended up so different. > > It's not just about cvs and rcs: > > /usr/src/usr.bin/cvs/xmalloc.c > /usr/src/usr.bin/diff/xmalloc.c > /usr/src/usr.bin/file/xmalloc.c > /

Re: less time

2015-11-05 Thread Nicholas Marriott
ok On Thu, Nov 05, 2015 at 05:45:15PM -0500, Ted Unangst wrote: > time_t is not a long. > > > Index: funcs.h > === > RCS file: /cvs/src/usr.bin/less/funcs.h,v > retrieving revision 1.9 > diff -u -p -r1.9 funcs.h > --- funcs.h 5

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-05 Thread Nicholas Marriott
Looks good, ok nicm On Thu, Nov 05, 2015 at 05:35:22PM +0100, Tobias Stoeckmann wrote: > On Thu, Nov 05, 2015 at 03:57:26PM +0000, Nicholas Marriott wrote: > > I like this a lot. > > > > There are some trivial differences in the various xmalloc.h as well, and >

Re: cron: clean up includes

2015-11-04 Thread Nicholas Marriott
Looks great, ok nicm On Wed, Nov 04, 2015 at 08:50:37AM -0700, Todd C. Miller wrote: > This changes cron from including all headers in every file to only > including what each .c file needs. I have not removed cron.h since > it will be used in a future clean up of the internal .h files. > >

Re: at: remove privs.h

2015-11-03 Thread Nicholas Marriott
Looks good to me, ok nicm On Mon, Nov 02, 2015 at 02:26:15PM -0700, Todd C. Miller wrote: > at(1) tries to run as little code as possible with privileges. This > creates a false sense of security since if there is an overflow an > attacker can easily change the effective gid anyway. > > The

Re: Drop register keyword from less(1)

2015-11-02 Thread Nicholas Marriott
On Mon, Nov 02, 2015 at 09:32:46AM -0700, Todd C. Miller wrote: > On Mon, 02 Nov 2015 09:16:07 +0000, Nicholas Marriott wrote: > > > I looked briefly at this and it wouldn't be that hard. However, while it > > would be fantastic to clean up all the crap from less, it isn't cl

Re: crontab: use setegid() instead of swap functions

2015-11-02 Thread Nicholas Marriott
Looks good to me, ok nicm On Mon, Nov 02, 2015 at 11:35:21AM -0700, Todd C. Miller wrote: > Using setegid() directly makes the code easier to read. > Some of these calls will be removed in a later diff. > > - todd > > Index: crontab.c >

Re: cvs(1) simplification

2015-11-02 Thread Nicholas Marriott
Sure, but this idiom is all over the place in opencvs, are you going to change the rest? On Mon, Nov 02, 2015 at 12:31:14PM -0500, Michael McConville wrote: > Don't bother mallocing a statically-sized 1,024-byte chunk of mem, for > simplicity and speed. > > ok? > > > Index:

Re: cvs(1) simplification

2015-11-02 Thread Nicholas Marriott
: > Nicholas Marriott wrote: > > Sure, but this idiom is all over the place in opencvs, are you going to > > change the rest? > > As Theo mentioned recently, there's an inherent tradeoff here. Stack > allocation is faster at runtime and easier to write. However, we miss

Re: Drop register keyword from less(1)

2015-11-02 Thread Nicholas Marriott
On Mon, Nov 02, 2015 at 11:48:07AM -0500, Michael McConville wrote: > Todd C. Miller wrote: > > On Mon, 02 Nov 2015 09:16:07 +, Nicholas Marriott wrote: > > > I looked briefly at this and it wouldn't be that hard. However, > > > while it would be fantastic to clea

Re: Drop register keyword from less(1)

2015-11-02 Thread Nicholas Marriott
On Sun, Nov 01, 2015 at 06:22:53PM -0700, Todd C. Miller wrote: > If we are going to diverge from upstream less, a better starting > point would be https://github.com/gdamore/less-fork > > See also http://garrett.damore.org/2014_09_01_archive.html > > If you decide to tackle that you'll also

Re: [PATCH] rcs: buf_free/rcsnum_free

2015-11-02 Thread Nicholas Marriott
Any other oks for this? On Sun, Nov 01, 2015 at 08:58:27AM +0800, Michael W. Bombardieri wrote: > Thanks again for checking this. > Correcting ci.c ... > > On Fri, Oct 30, 2015 at 03:53:58PM +0000, Nicholas Marriott wrote: > > Sorry, the one I pointed ou

Re: [PATCH] rcs: buf_free/rcsnum_free

2015-11-01 Thread Nicholas Marriott
sd.org Server: Concurrent Versions System (CVS) > 1.11.1p1 (client/server) > mirror.planetunix.net Server: Concurrent Versions System (CVS) > 1.12.13 (client/server) > > On Fri, Oct 30, 2015 at 10:26:31AM +, Nicholas Marriott wrote: > > I think it is never

Re: [PATCH] rcs: buf_free/rcsnum_free

2015-11-01 Thread Nicholas Marriott
On Sun, Nov 01, 2015 at 01:10:21PM +0100, Tobias Stoeckmann wrote: > On Sun, Nov 01, 2015 at 11:17:40AM +, Stuart Henderson wrote: > > On 2015/11/01 08:03, Nicholas Marriott wrote: > > > Some did for a while but it has some nasty bugs and nobody is working on > > &g

Re: Drop register keyword from less(1)

2015-11-01 Thread Nicholas Marriott
No, I don't think we should do this because it will make updating to upstream less more difficult, and it is painful enough as it is. On Sun, Nov 01, 2015 at 02:25:58PM -0500, Michael McConville wrote: > Every one of these is in a var declaration, so a megadiff is probably > the easiest way to

Re: [PATCH] rcs: buf_free/rcsnum_free

2015-10-30 Thread Nicholas Marriott
I think it is never going to rise from the dead. Original message From: Tobias Stoeckmann <tob...@stoeckmann.org> Date:30/10/2015 10:06 (GMT+00:00) To: "Michael W. Bombardieri" <m...@ii.net> Cc: Nicholas Marriott <nicholas.marri...@gmail.com>,t

Re: [PATCH] rcs: buf_free/rcsnum_free

2015-10-30 Thread Nicholas Marriott
by checkin_init or checkin_update, in which case it shouldn't be freed, so this check needs to stay the same. The rest is ok nicm On Fri, Oct 30, 2015 at 08:52:02AM +0800, Michael W. Bombardieri wrote: > On Thu, Oct 29, 2015 at 10:54:09AM +, Nicholas Marriott wrote: > > Hi > > > > Yo

Re: Finally use ksh's areallocarray()

2015-10-29 Thread Nicholas Marriott
Like it, ok nicm On Thu, Oct 29, 2015 at 02:25:10PM -0400, Michael McConville wrote: > With help from Theo Buehler. ok? > > > Index: c_sh.c > === > RCS file: /cvs/src/bin/ksh/c_sh.c,v > retrieving revision 1.53 > diff -u -p -r1.53

Re: cron: use vis() instead of home-grown version for logs

2015-10-29 Thread Nicholas Marriott
ok nicm On Thu, Oct 29, 2015 at 03:35:42PM -0600, Todd C. Miller wrote: > Cron has a homegrown vis-like function for logging commands. > We have vis(3) so let's use it instead... > > - todd > > Index: do_command.c > === > RCS

Re: [PATCH] rcs: buf_free/rcsnum_free

2015-10-29 Thread Nicholas Marriott
Hi You missed ci.c:316 and a few in rcs.c and rcsdiff.c On Thu, Oct 29, 2015 at 04:50:56PM +0800, Michael W. Bombardieri wrote: > Hi tech@, > > In case it's considered useful... > Submitting patch to shave a few lines from rcs(1) by allowing > buf_free() and rcsnum_free() to ignore NULL

Re: utf8 hack for ls

2015-10-27 Thread Nicholas Marriott
Hi I can tell you for certain that I would use mbwidth() and mbvis() in tmux. Functions to answer things like "is this string valid UTF-8?" and "how many codepoints is this string?" would also be good. If the consensus is to use the locale.h goo I will do that but I would prefer something

Re: does anoybody use ul?

2015-10-23 Thread Nicholas Marriott
Well, it does work: printf 'A\bA_\bB'|ul I still think it is not useful, I say kill it. On Fri, Oct 23, 2015 at 03:47:56AM -0400, Ted Unangst wrote: > ul appears somewhat useless for its intended purpose. > > echo _xxx_ | ul does not result in underlined text in an xterm, so I doubt > many

Re: utf8 hack for ls

2015-10-23 Thread Nicholas Marriott
Hi This doesn't account for UTF-8 double width characters, so they will still throw the column widths off? On Fri, Oct 23, 2015 at 08:42:52AM -0400, Ted Unangst wrote: > So, third diff to ponder as we evaluate this approach. This one also uses a > u8len() function to help get the column widths

Re: does anoybody use ul?

2015-10-23 Thread Nicholas Marriott
On Fri, Oct 23, 2015 at 05:11:42AM -0400, Ted Unangst wrote: > Nicholas Marriott wrote: > > Well, it does work: > > > > printf 'A\bA_\bB'|ul > > > > I still think it is not useful, I say kill it. > > Oh! Is that how you use it? The man page doesn't explain

Re: utf8 hack for ls

2015-10-23 Thread Nicholas Marriott
Ah right this makes sense to me On Fri, Oct 23, 2015 at 09:13:02AM -0400, Ted Unangst wrote: > Nicholas Marriott wrote: > > Hi > > > > This doesn't account for UTF-8 double width characters, so they will > > still throw the column widths off? > > right. maybe

Re: unused macros in ksh

2015-10-23 Thread Nicholas Marriott
The patch is mangled so it doesn't apply, but ok nicm On Thu, Oct 22, 2015 at 08:53:48PM -0400, Michael McConville wrote: > Beat me to it. ok mmcc@ > > Ilya Kaliman wrote: > > === > > RCS file: /cvs/src/bin/ksh/shf.c,v > >

Re: tmux(1): Use-after-free in capture-pane

2015-10-16 Thread Nicholas Marriott
Whoops, you are right there. Applied, thanks! On Fri, Oct 16, 2015 at 09:34:33AM +0200, Theo Buehler wrote: > On a recent amd64 snapshot I ran into this: > > (inside a tmux session session) > $ tmux new-window > $ tmux capture-pane -S - > $ tmux save-buffer /tmp/mybuf > $ hexdump -Cv /tmp/mybuf

Re: tame() error handling diff

2015-10-06 Thread Nicholas Marriott
soning below. Please excuse my wordiness, I'm just not genetically > capable of being brief... > > > On 2015-10-06 00:05, Nicholas Marriott wrote: > > I think it should just return whatever copyinstr does and not go > > swapping around error numbers, we don't do that an

Re: tame() error handling diff

2015-10-06 Thread Nicholas Marriott
this is ok with me On Tue, Oct 06, 2015 at 12:25:57PM +0200, Benny Lofgren wrote: > Hi Nicholas, > > On 2015-10-06 09:56, Nicholas Marriott wrote: > > I am not convinced, changing errno like this is gratuitous. We actually > > do do it elsewhere, but IMO that is unneces

Re: tame() error handling diff

2015-10-05 Thread Nicholas Marriott
Hi I think it should just return whatever copyinstr does and not go swapping around error numbers, we don't do that anywhere else. On Mon, Oct 05, 2015 at 11:15:33PM +0200, Benny Lofgren wrote: > Hi guys, > > I was playing around with tame() today, and have a couple of minor > suggestions: >

Re: flex++ and lex are synonyms for flex(1) in flex.1

2015-09-20 Thread Nicholas Marriott
The .Nm part yes, but but flex++ is not a synonym, flex generates different output when called as flex++. This is already mentioned in the later section on C++. On Sat, Sep 19, 2015 at 10:29:12PM -0400, Rob Pierce wrote: > Does this makes sense? I took the same approach used in chpass.1. > >

Re: Remove useless NULL casts from mv(1)

2015-09-14 Thread Nicholas Marriott
These used to be necessary but now that NULL is (void *)0 they aren't. I'd be inclined to keep them anyway - with the cast it is clearly not a bug, without is not so clear. There are also loads of them and it'd be a lot of churn to fix them all, for no real advantage. But I don't feel strongly

ksh remove Tflag

2015-09-14 Thread Nicholas Marriott
Hi As far as I can tell there haven't been any new bits added for almost 20 years, so I expect we can do without the Tflag typedef. ok? Index: proto.h === RCS file: /cvs/src/bin/ksh/proto.h,v retrieving revision 1.35 diff -u -p

bye bye ksh/ksh_limval.h

2015-09-14 Thread Nicholas Marriott
ok? Index: PROJECTS === RCS file: /cvs/src/bin/ksh/PROJECTS,v retrieving revision 1.7 diff -u -p -r1.7 PROJECTS --- PROJECTS28 Nov 2013 10:33:37 - 1.7 +++ PROJECTS14 Sep 2015 07:53:30 - @@ -109,6 +109,3 @@

Re: Floating point #define in ksh

2015-09-14 Thread Nicholas Marriott
llnum = va_arg(args, int); + else + llnum = va_arg(args, unsigned int); + } switch (c) { case 'd': case 'i': On Sun, Sep 13, 2015 at 10:27:37AM

Re: Floating point #define in ksh

2015-09-13 Thread Nicholas Marriott
On Sat, Sep 12, 2015 at 08:45:43PM -0400, Michael McConville wrote: > Nicholas Marriott wrote: > > Works for me. ok anyone? > > > > I think ksh_limval.h can go entirely after this, per the note in > > PROJECTS. > > I also just found this gem. It only has one use,

Re: More minor ksh stuff

2015-09-12 Thread Nicholas Marriott
Hi Why do you need to move tty_close? It is prototyped in tty.h which is included at the start of your diff. The other changes look good. On Sat, Sep 12, 2015 at 03:17:53PM -0400, Michael McConville wrote: > * move tty_close() up so that we can call it in tty_init() > * bump tfd's assignment

Re: Floating point #define in ksh

2015-09-12 Thread Nicholas Marriott
Works for me. ok anyone? I think ksh_limval.h can go entirely after this, per the note in PROJECTS. On Sat, Sep 12, 2015 at 03:00:02PM -0400, Michael McConville wrote: > Nicholas Marriott wrote: > > I would kill it. FPBUF_SIZE and DMAXEXP can go too. > > Here's the diff

Re: Floating point #define in ksh

2015-09-12 Thread Nicholas Marriott
I would kill it. FPBUF_SIZE and DMAXEXP can go too. On Fri, Sep 11, 2015 at 11:41:40PM -0400, Michael McConville wrote: > Michael McConville wrote: > > FP has been undefined for at least ten years, and probably forever. > > It's used to conditionally add two small sections and one large > >

Re: ksh INT32 type

2015-09-10 Thread Nicholas Marriott
I think all of these except perhaps Coproc_id would be better as plain int not int32_t. The typedefs could probably die completely (definitely Tflag anyway) but separate diff. On Wed, Sep 09, 2015 at 08:27:14PM -0400, Michael McConville wrote: > I may be totally off base here, but: > > INT32's

Re: ksh INT32 type

2015-09-10 Thread Nicholas Marriott
t.[1] > Pointed out in private to and ok by nicm@ > > [1]http://marc.info/?l=openbsd-tech=144112883814618=2 > > On 09/10/15 11:05, Nicholas Marriott wrote: > >I think all of these except perhaps Coproc_id would be better as plain > >int not int32_t. > > > >

Re: Dropping needless globals (ksh)

2015-09-10 Thread Nicholas Marriott
looks good to me, any other ok? null is serious poo and really needs to go as well On Thu, Sep 10, 2015 at 10:45:46AM -0400, Michael McConville wrote: > Does this look good? I'm not sure why these globals existed. > > It looks like it's going to take a little more than search-and-replace > to

Re: Dropping needless globals (ksh)

2015-09-10 Thread Nicholas Marriott
Hi On Thu, Sep 10, 2015 at 04:33:07PM -0600, Todd C. Miller wrote: > On Thu, 10 Sep 2015 23:26:53 +0100, Nicholas Marriott wrote: > > > looks good to me, any other ok? > > > > null is serious poo and really needs to go as well > > Beware! Some of these values a

Re: Remove NULL checks before free()

2015-09-09 Thread Nicholas Marriott
Hi I personally don't see a particular need for this, it's something that can be tidied up as people make other changes in the area. Certainly you are trying to touch a lot of different places at once here which is usually not the best approach even for something minor. You'd probably be better

Re: UTF-8 string filtering

2015-09-04 Thread Nicholas Marriott
Hi I like this and I would use it in tmux (I have utf8_strvis which is not as strict). The code looks good on a quick read but I'm not a Unicode expert either. I'd like to see useful UTF-8 stuff go into libutil or somewhere common, but I guess perhaps the time of the UTF-8 hackathon in October

Re: ssh agent authentication for doas

2015-07-26 Thread Nicholas Marriott
Fair enough, thanks. On Sun, Jul 26, 2015 at 07:19:06PM +1000, David Gwynne wrote: On 26 Jul 2015, at 7:07 pm, Nicholas Marriott nicholas.marri...@gmail.com wrote: Hi I can't say I know a lot about bsdauth so maybe this is a stupid question, but could this work as a login_

Re: ssh agent authentication for doas

2015-07-26 Thread Nicholas Marriott
Hi I can't say I know a lot about bsdauth so maybe this is a stupid question, but could this work as a login_* authentication method instead of doas doing it? On Sun, Jul 26, 2015 at 06:43:57PM +1000, David Gwynne wrote: this is rough, but enough to start a discussion. this lets doas

Re: softdep by default on AMD64

2015-07-24 Thread Nicholas Marriott
generally reliable HAHAHAHAHA On Thu, Jul 23, 2015 at 09:31:59PM -0400, Michael McConville wrote: On Thu, Jul 23, 2015 at 06:49:55PM -0600, Theo de Raadt wrote: There was a great discussion about softdep recently: https://marc.info/?t=14216401691r=1w=2 It needs extra

Re: tame(1), like nice(1) but for permissions

2015-07-20 Thread Nicholas Marriott
Hi I'm not sure I can think of many uses for this, tame is not something you are intended to just apply blindly, do you have any use cases? I think the -aCcdghIiRSptuw approach is a bad idea and it would be better to do it with named flags like -o abort,cmsg,cpath. Maybe take a look at

Re: [patch]diff: xstrdup wrappes strdup(3)

2015-06-17 Thread Nicholas Marriott
Any ok for this, and the same for rcs? (And ssh?) On Wed, Jun 17, 2015 at 08:42:04PM +0200, Fritjof Bornebusch wrote: Hi tech@, as requested by nicm@, xstrdup calls strdup(3) now. Regards, --F. Index: xmalloc.c ===

Re: [patch]rcs: no null check before free(3)

2015-06-17 Thread Nicholas Marriott
Fixed, thanks On Wed, Jun 17, 2015 at 09:51:38AM +0200, Fritjof Bornebusch wrote: Hi tech@, just saw I missed removing the null check before calling free(3), sorry. Regards, --F. Index: ci.c === RCS file:

Re: [patch]rcs: xstrdup just wrappes strdup

2015-06-17 Thread Nicholas Marriott
On Wed, Jun 17, 2015 at 01:25:07PM +0200, Fritjof Bornebusch wrote: On Mon, Jun 15, 2015 at 10:22:27AM +0100, Nicholas Marriott wrote: What about diff and ssh and file? They all use the a copy of the same xmalloc.c. Personally, I would recommend that xstrdup just calls strdup(3

Re: [patch]rcs: usage functions above the main ones

2015-06-15 Thread Nicholas Marriott
this seems fine to me On Sun, Jun 14, 2015 at 10:38:40PM +0200, Fritjof Bornebusch wrote: Hi tech@, most of the tools implements the *usage* function above the *main* function. This patch makes it more consistent to these tools and where the different *usage* functions are implemented

Re: [patch]rcs: xstrdup just wrappes strdup

2015-06-15 Thread Nicholas Marriott
What about diff and ssh and file? They all use the a copy of the same xmalloc.c. On Mon, Jun 15, 2015 at 10:00:01AM +0200, Fritjof Bornebusch wrote: Hi, thanks for the hint. This one should do the trick. Index: xmalloc.c

Re: [patch]rcs: xstrdup just wrappes strdup

2015-06-15 Thread Nicholas Marriott
On Mon, Jun 15, 2015 at 10:09:39AM +0200, Fritjof Bornebusch wrote: On Sun, Jun 14, 2015 at 05:02:05PM -0600, Theo de Raadt wrote: But I am not sure about this change. xmalloc.c came from ssh (and is also used by file and diff). Would it be better to keep it in sync? How portable is

Re: [patch]rcs: xstrdup just wrappes strdup

2015-06-14 Thread Nicholas Marriott
Convention is usually to do err(1, strdup) with no additional text if using err rather than errx. But I am not sure about this change. xmalloc.c came from ssh (and is also used by file and diff). Would it be better to keep it in sync? How portable is strdup? On Sun, Jun 14, 2015 at 01:38:33PM

Re: [patch]rcs: remove xfree

2015-06-13 Thread Nicholas Marriott
Hi. You missed date.y: date.y: In function 'yyerror': date.y:497: error: implicit declaration of function 'xfree' On Sat, Jun 13, 2015 at 12:43:29AM +0200, Fritjof Bornebusch wrote: Hi tech@, Without PGP / SMIME stuff, sorry. a couple of months ago I removed the if condition in the

Re: [patch]rcs: remove xfree

2015-06-13 Thread Nicholas Marriott
looks good to me now, ok anyone? On Sat, Jun 13, 2015 at 03:43:47PM +0200, Fritjof Bornebusch wrote: On Sat, Jun 13, 2015 at 09:33:59AM +0100, Nicholas Marriott wrote: Hi. You missed date.y: date.y: In function 'yyerror': date.y:497: error: implicit declaration of function 'xfree

Re: [patch]rcs: remove xfree

2015-06-13 Thread Nicholas Marriott
Applied now, thanks. On Sat, Jun 13, 2015 at 09:06:23PM +0100, Nicholas Marriott wrote: looks good to me now, ok anyone? On Sat, Jun 13, 2015 at 03:43:47PM +0200, Fritjof Bornebusch wrote: On Sat, Jun 13, 2015 at 09:33:59AM +0100, Nicholas Marriott wrote: Hi. You missed date.y

Re: file(1): is this reasonable?

2015-06-04 Thread Nicholas Marriott
/usr/ports/pobj/unzip-6.0 then permit native-sendmsg: sockaddr match /non-existent filename: * then deny[enoent] We could add this I think: native-sendmsg: sockaddr eq unknown then permit On Thu, Jun 04, 2015 at 10:47:47PM +0100, Nicholas Marriott wrote: Hi On Thu, Jun 04

Re: file(1): is this reasonable?

2015-06-04 Thread Nicholas Marriott
Hi On Thu, Jun 04, 2015 at 03:39:45PM -0600, Theo de Raadt wrote: Is it just to avoid adding sendmsg to the ports systrace policy? Why not add it - maybe not globally but just for file? sendmsg with a CMSG fd passing in/out of such a jail is a bad thing. The systrace policy already allows

Re: file(1): is this reasonable?

2015-06-04 Thread Nicholas Marriott
On Thu, Jun 04, 2015 at 02:29:50PM -0700, patrick keshishian wrote: On Thu, Jun 04, 2015 at 10:20:35PM +0100, Nicholas Marriott wrote: Hi I think having two different main()s is silly. Why not keep the privsep and everything else but just skip the systrace bits? Well, part

Re: file(1): is this reasonable?

2015-06-04 Thread Nicholas Marriott
Why not just do this? Index: sandbox.c === RCS file: /cvs/src/usr.bin/file/sandbox.c,v retrieving revision 1.7 diff -u -p -r1.7 sandbox.c --- sandbox.c 29 May 2015 15:58:34 - 1.7 +++ sandbox.c 4 Jun 2015 21:27:32 -

Re: file(1): is this reasonable?

2015-06-04 Thread Nicholas Marriott
file shouldn't need chflagsat? Otherwise I think this is fine. On Thu, Jun 04, 2015 at 03:29:06PM -0700, patrick keshishian wrote: On Thu, Jun 04, 2015 at 11:06:38PM +0100, Nicholas Marriott wrote: /usr/ports/infrastructure/db/systrace.filter has these: native-recvmsg: permit

Re: file(1): is this reasonable?

2015-06-04 Thread Nicholas Marriott
Alright. I will apply the file(1) bit so it works if already systraced but you will need to go to the ports guys to get the policy opened up. Thanks On Thu, Jun 04, 2015 at 03:44:43PM -0700, patrick keshishian wrote: On Thu, Jun 04, 2015 at 11:37:33PM +0100, Nicholas Marriott wrote: file

Re: file(1): is this reasonable?

2015-06-04 Thread Nicholas Marriott
Hi I think having two different main()s is silly. Why not keep the privsep and everything else but just skip the systrace bits? On Thu, Jun 04, 2015 at 02:09:43PM -0700, patrick keshishian wrote: On Thu, Jun 04, 2015 at 12:46:14PM -0600, Theo de Raadt wrote: Trying to get file to work under

Re: [patch] file(1) determine file type of stdin

2015-05-29 Thread Nicholas Marriott
(label, /dev/stdin:); + else + xasprintf(label, %s:, inf-path); printf(%-*s %s\n, (int)width, label, inf-result); free(label); } On Fri, May 29, 2015 at 12:00:36PM +0100, Nicholas Marriott wrote: Hi Why do you want to set

Re: [patch] file(1) determine file type of stdin

2015-05-29 Thread Nicholas Marriott
Whoops, you're right there. I think it is a leftover, I don't think it is the right thing to do. On Fri, May 29, 2015 at 01:32:12PM +0200, S??bastien Marie wrote: On Fri, May 29, 2015 at 12:00:36PM +0100, Nicholas Marriott wrote: Hi Why do you want to set O_NONBLOCK at all

Re: [patch] file(1) adjust size in fill_buffer

2015-05-29 Thread Nicholas Marriott
Good spot - fixed, thanks. On Fri, May 29, 2015 at 12:27:19PM +0200, S??bastien Marie wrote: Hi, While working on file(1) for permit standard input type determination, I investigate why when /dev/stdin is used, the output was 'data'. It seems that the fill_buffer function don't adjust

Re: [patch] file(1) determine file type of stdin

2015-05-29 Thread Nicholas Marriott
Hi Why do you want to set O_NONBLOCK at all? On Fri, May 29, 2015 at 12:32:06PM +0200, S??bastien Marie wrote: On Thu, May 28, 2015 at 11:52:22PM +0100, Nicholas Marriott wrote: Hi Can you make a patch against -current? Your source tree seems pretty out of date. arg, my bads

Re: [patch] file(1) determine file type of stdin

2015-05-29 Thread Nicholas Marriott
at 11:31:37PM +0100, Nicholas Marriott wrote: Hi We deliberately do not support FIFOs because they will block forever if nothing is writing and using file(1) on FIFOs seems unnecessary, the old file(1) had a hack to get around this with poll(2) but we're not going to do that. So I think we

Re: [patch] file(1) determine file type of stdin

2015-05-28 Thread Nicholas Marriott
Hi Can you make a patch against -current? Your source tree seems pretty out of date. Yes please check the return values from fcntl and fstat. On Thu, May 28, 2015 at 08:37:02PM +0200, S??bastien Marie wrote: Hi, It was possible, using the previous file(1) version, to determine the file

Re: file: crash with invalid magic file (+ patch)

2015-04-25 Thread Nicholas Marriott
Applied, thanks! On Sat, Apr 25, 2015 at 08:26:35PM +0200, S??bastien Marie wrote: Hi, I would like to report a crash (coredump) with an invalid magic file (MALLOC_OPTIONS=S is need to expose the bug). --- ~/.magic --- 0 beshort 0xffd8 JPEG image data !:mime

Re: Cleanup of tset(1) - Part 1 of 2

2015-04-13 Thread Nicholas Marriott
Hi Our tset comes pretty much unchanged from ncurses, I don't think it is worth diverging from upstream like this. On Mon, Apr 13, 2015 at 04:48:54PM -0400, Kurt Mosiejczuk wrote: More ifdef trimming. This time tset is up. Binary is still identical after this diff. --Kurt Index:

Re: event(3): add misssing prototypes / reorder

2015-02-17 Thread Nicholas Marriott
I think reordering and missing arguments etc is fine, but we shouldn't add the missing prototypes until we are adding documentation for them as well. Can you send a diff with just the fixes for the current prototypes first? Thanks On Tue, Feb 17, 2015 at 10:55:38PM +0100, Fabian Raetz wrote:

Re: correct spelling of center

2015-01-20 Thread Nicholas Marriott
Hi The tmux.1 centre shouldn't change because it is an argument to an option. On Tue, Jan 20, 2015 at 09:35:24AM +, Jason McIntyre wrote: On Tue, Jan 20, 2015 at 01:51:28AM -0500, Ted Unangst wrote: Some people may be partial to centre, but considering the macros described are spelled

Re: syslog over TLS

2015-01-16 Thread Nicholas Marriott
Hi WRT libevent - we have already added some ASR functions to libevent for smtpd, I'd say libevent 1.4 is pretty much closed for new development upstream - there won't be much to sync - and we have a port of 2.x for ports to use. So I don't think there are strong reasons not to change our

Re: update rxvt-unicode terminfo entry

2015-01-07 Thread Nicholas Marriott
This diff looks big but in fact there are only three changes, cnorm, cvvis and sgr. I don't use rxvt-unicode, but it looks fine, if it's working for you then ok nicm On Wed, Jan 07, 2015 at 02:21:39AM -0700, David Coppa wrote: Keep it in sync with rxvt-unicode-9.21. ok? Ciao, David

Re: libevent evutil.h

2014-10-30 Thread Nicholas Marriott
I'd like to see evutil.h go so I'm happy with this idea but yes you will need to make sure it doesn't break ports, there are still quite a few ports that depend on the base libevent. On Thu, Oct 30, 2014 at 02:43:32AM +0100, Alexander Bluhm wrote: Hi, libevent has compatibilty wrappers in

Re: libevent evutil.h

2014-10-30 Thread Nicholas Marriott
Thanks Landry On Thu, Oct 30, 2014 at 09:40:14AM +0100, Landry Breuil wrote: On Thu, Oct 30, 2014 at 08:28:56AM +, Nicholas Marriott wrote: No I think we are keeping the evutil.h file for now, the idea is just to stop event.h including it. OKay, bulk started with just the event.h

Re: uuidgen port from FreeBSD for inclusion in OpenBSD base

2014-10-18 Thread Nicholas Marriott
No opinion on whether this is useful but is this really a port? The code looks nothing like FreeBSD's current bin/uuidgen/uuidgen.c - do you mean you wrote your own version? The style is far from OpenBSD standard and this code has quite a few errors. What's wrong with the version from FreeBSD, it

Re: [patch] rcs: stored values never read

2014-10-08 Thread Nicholas Marriott
seems fine to me On Mon, Oct 06, 2014 at 09:20:03PM +0200, Fritjof Bornebusch wrote: Hi tech, according to scan-build(1) there are a few never read values. fritjof Index: co.c === RCS file:

Re: [patch]lock and unlock like GnuRCS

2014-10-06 Thread Nicholas Marriott
+0200, Otto Moerbeek wrote: On Thu, Oct 02, 2014 at 12:56:10AM +0100, Nicholas Marriott wrote: OTOH, check out what we do with rcs -L and -U... I kinda like that, because it tells you exactly what it is doing. -Otto On Thu, Oct 02, 2014 at 12:54:13AM +0100, Nicholas

Re: syslogd sigmask

2014-10-05 Thread Nicholas Marriott
ok nicm On Sun, Oct 05, 2014 at 09:47:56PM +0200, Alexander Bluhm wrote: Hi, As libevent provides safe signal callbacks instead of signal handlers, the sigprocmask(2) protection is not necessary and can be removed. ok? bluhm Index: usr.sbin/syslogd/syslogd.c

Re: syslogd eintr

2014-10-05 Thread Nicholas Marriott
Hi I would be inclined to leave these - they don't cost much and people expect to see EINTR handled. On Sun, Oct 05, 2014 at 09:55:39PM +0200, Alexander Bluhm wrote: Hi, As libevent uses sigaction(2) with SA_RESTART, the code to handle EINTR errors can be removed. ok? bluhm

Re: libevent ifdef sigaction

2014-10-05 Thread Nicholas Marriott
Hi I don't think there will be any more 1.x releases, 1.x is no longer maintained upstream. You can remove -DHAVE_SIGACTION from the Makefile as well. I'm happy enough with this, but there are a lot more to remove as well... On Sun, Oct 05, 2014 at 10:29:38PM +0200, Alexander Bluhm wrote:

Re: syslogd libevent

2014-10-04 Thread Nicholas Marriott
On Sat, Oct 04, 2014 at 01:29:21AM +0200, Alexander Bluhm wrote: Hi, After some preparation, I can convert syslogd to use libevent now. ok? bluhm Index: usr.sbin/syslogd/Makefile === RCS file:

Re: [Patch] use exit() directly in usage()

2014-10-01 Thread Nicholas Marriott
Looks good but you have missed out ident.c and rcsprog.c On Wed, Oct 01, 2014 at 11:19:29AM +0200, Fritjof Bornebusch wrote: On Sat, Sep 27, 2014 at 07:10:01PM +0200, Fritjof Bornebusch wrote: Hi, Hi, after usage() was called, there is no where you can go. as suggested by otto@

Re: [Patch] use exit() directly in usage()

2014-10-01 Thread Nicholas Marriott
Please do not change to EXIT_FAILURE. Original message From: Kent R. Spillner kspill...@acm.org Date: 01/10/2014 23:41 (GMT+00:00) To: Fritjof Bornebusch frit...@alokat.org Cc: Nicholas Marriott nicholas.marri...@gmail.com,tech@openbsd.org,o...@openbsd.org Subject: Re

Re: [patch]lock and unlock like GnuRCS

2014-10-01 Thread Nicholas Marriott
The existing behaviour isn't wildly useful, makes sense to me, ok nicm On Wed, Oct 01, 2014 at 11:33:33PM +0200, Fritjof Bornebusch wrote: Hi tech, the OpenRCS rcs command produces the following output if -l and -u is used in the same command: $ rcs -l1.1 -u1.1 foo.txt RCS file:

Re: [patch]lock and unlock like GnuRCS

2014-10-01 Thread Nicholas Marriott
) keep the last option when mutually exclusive options are specified. does it make sense to keep rcs consistent with that convention? also is a man page diff needed? On Oct 1, 2014, at 7:17 PM, Nicholas Marriott nicholas.marri...@gmail.com wrote: The existing behaviour isn't wildly

Re: [patch]lock and unlock like GnuRCS

2014-10-01 Thread Nicholas Marriott
OTOH, check out what we do with rcs -L and -U... On Thu, Oct 02, 2014 at 12:54:13AM +0100, Nicholas Marriott wrote: Matching GNU RCS seems preferable to me but I don't feel strongly about it. I wouldn't mention this in the man page, it hardly seems like behaviour anyone should

Re: [Patch]openrcs: atoi to strtonum

2014-09-30 Thread Nicholas Marriott
ok nicm On Sat, Sep 27, 2014 at 05:07:58PM +0200, Otto Moerbeek wrote: On Fri, Sep 26, 2014 at 09:23:08PM +0200, Fritjof Bornebusch wrote: On Wed, Sep 24, 2014 at 10:31:17PM +0200, Otto Moerbeek wrote: Hi, On Wed, Sep 24, 2014 at 05:13:47PM +0200, Fritjof Bornebusch wrote:

Re: [Patch] use exit() directly in usage()

2014-09-30 Thread Nicholas Marriott
If we do this then these usage functions also need to be marked __dead. On Sat, Sep 27, 2014 at 07:10:01PM +0200, Fritjof Bornebusch wrote: Hi, after usage() was called, there is no where you can go. fritjof Index: ci.c

Re: Proposal for changes to the event(3) documentation

2014-05-19 Thread Nicholas Marriott
, 2014 at 1:10 AM, Nicholas Marriott nicholas.marri...@gmail.com wrote: Hi Yes, I think this would be nice to see. We use libevent quite a lot so it'd be nice to have good documentation. Little patch below with some clarification on how to setup the library and what it's good

Re: libedit patch

2014-05-15 Thread Nicholas Marriott
Hi This reads fine to me, did you take the NetBSD version of this diff? Our libedit comes from NetBSD and we'll probably want to update from there again some time. On Wed, May 14, 2014 at 10:25:10PM -0700, Eitan Adler wrote: Hi all, The following patch has been committed in various forms

Re: [patch] tmux: 'e' key causes lost server in vi mode

2013-07-10 Thread Nicholas Marriott
It is a typo, try this: Index: window-copy.c === RCS file: /cvs/src/usr.bin/tmux/window-copy.c,v retrieving revision 1.93 diff -u -p -r1.93 window-copy.c --- window-copy.c 5 Jul 2013 14:44:06 - 1.93 +++ window-copy.c

ksh SIGFPE

2013-03-27 Thread Nicholas Marriott
Hi On i386: $ ksh -c 'echo $((-2147483648 / -1))' Floating point exception (core dumped) $ ksh -c 'echo $((-2147483648 % -1))' Floating point exception (core dumped) Was the same at least on amd64 with LONG_MIN last I could check. Perhaps something like this? Index: expr.c

Re: ksh SIGFPE

2013-03-27 Thread Nicholas Marriott
-0700, Matthew Dempsky wrote: On Wed, Mar 27, 2013 at 3:56 PM, Nicholas Marriott nicholas.marri...@gmail.com wrote: case O_DIV: case O_DIVASN: + if (vl-val.i == LONG_MIN vr-val.i == -1) + evalerr(es, ET_STR

Re: ksh SIGFPE

2013-03-27 Thread Nicholas Marriott
On Wed, Mar 27, 2013 at 04:27:22PM -0700, Matthew Dempsky wrote: On Wed, Mar 27, 2013 at 4:15 PM, Nicholas Marriott nicholas.marri...@gmail.com wrote: Sure, that actually looks to be what other shells do anyhow. That looks ok to me. Which shells did you check, out of curiosity

<    1   2   3   4   >