Re: file(1) better ideas to recognize rust language code?

2019-01-14 Thread Nicholas Marriott
Hi I think I would avoid adding more of these at the moment, especially ones that aren't very specific (why is "package" Go and not Java?) and for languages that haven't been around very long, unless it is solving a specific problem. Original file has moved these into the magic files and made

Re: file(1) better ideas to recognize rust language code?

2019-01-14 Thread Ted Unangst
Matteo Niccoli wrote: > Didn't find any other examples. At the moment rust code is recognized > as ASCII C program text. src/usr.bin/file/text.c has an array of special matches for text. It has various omissions, though. is matched as SGML. import means Java, but not python or go. etc. I

Re: ospf(6)d: fix "redistribute X set type 2 depend on if"

2019-01-14 Thread Sebastian Benoit
Remi Locherer(remi.loche...@relo.ch) on 2019.01.10 23:14:15 +0100: > Hi tech, > > in OSPFs external LSAs the type is encoded in the metric field. ospfd and > ospf6d overwrite the type information when "depend on" is used and the > specified interface is down (or in backup state). Below diff fixes

Re: net80211: don't drop unencrypted data frames with no data

2019-01-14 Thread Lauri Tirkkonen
On Mon, Jan 14 2019 16:41:13 +0200, Lauri Tirkkonen wrote: > > Indeed, my diff was bad as well. Thanks for spotting these issues. > > I hadn't run this diff yet cause I was still building a new snapshot > > to test it. Could you also test this new version please? > > I'm not currently physically

Re: file(1) better ideas to recognize rust language code?

2019-01-14 Thread Theo de Raadt
No, I'm sure that isn't right. > Didn't find any other examples. At the moment rust code is recognized > as ASCII C program text. > > Index: usr.bin/file/magdir/rust > === > RCS file: usr.bin/file/magdir/rust > diff -N

Re: net80211: don't drop unencrypted data frames with no data

2019-01-14 Thread Lauri Tirkkonen
On Mon, Jan 14 2019 15:34:22 +0100, Stefan Sperling wrote: > > why doesn't SUBTYPE_CF_ACK_CF_POLL have NODATA in the name? it has the > > NODATA bit set (ie. & 0x40), and "QoS CF-Ack + CF_Poll (no data)" is > > explicitly listed in 9.2.4.1.9. > > Yes, that was a mistake. See this follow-up patch:

Re: net80211: don't drop unencrypted data frames with no data

2019-01-14 Thread Stefan Sperling
On Mon, Jan 14, 2019 at 04:10:36PM +0200, Lauri Tirkkonen wrote: > On Mon, Jan 14 2019 14:23:44 +0100, Stefan Sperling wrote: > > Thank you for tracking this problem down. > > > > Your diff is not correct. This part introduces a memory leak because > > the mbuf is not going to be freed anymore: >

Re: grep: convert fgetln to getline

2019-01-14 Thread Lauri Tirkkonen
On Mon, Jan 07 2019 23:01:47 +0200, Lauri Tirkkonen wrote: > On Mon, Jan 07 2019 15:41:53 -0500, Ted Unangst wrote: > > Lauri Tirkkonen wrote: > > > On Sun, Jan 06 2019 14:02:16 -0500, Ted Unangst wrote: > > > > Lauri Tirkkonen wrote: > > > > > Hi, another simple diff converting fgetln usage to

Re: net80211: don't drop unencrypted data frames with no data

2019-01-14 Thread Lauri Tirkkonen
On Mon, Jan 14 2019 14:23:44 +0100, Stefan Sperling wrote: > Thank you for tracking this problem down. > > Your diff is not correct. This part introduces a memory leak because > the mbuf is not going to be freed anymore: > > > @@ -411,6 +412,12 @@ ieee80211_input(struct ifnet *ifp, struct mbuf

file(1) better ideas to recognize rust language code?

2019-01-14 Thread Matteo Niccoli
Didn't find any other examples. At the moment rust code is recognized as ASCII C program text. Index: usr.bin/file/magdir/rust === RCS file: usr.bin/file/magdir/rust diff -N usr.bin/file/magdir/rust --- /dev/null 1 Jan 1970

Re: net80211: don't drop unencrypted data frames with no data

2019-01-14 Thread Stefan Sperling
On Mon, Jan 14, 2019 at 02:23:44PM +0100, Stefan Sperling wrote: > I'd like to propose a more general solution: > > The diff below improves naming of so far unused frame subtype constants > and makes it more obvious which subtypes do not carry data, it attributes > "no data" frames to a more

Re: if_umb.c: typos

2019-01-14 Thread Gerhard Roth
Hello Ingo, I must apologize for my sticky fingers and lots of copy & pasting :/ Thanks for finding. ok gerhard@ On Mon, 14 Jan 2019 14:21:37 +0100 Ingo Feinerer wrote: > A few messsage -> message fixes. > > Index: if_umb.c >

Re: net80211: don't drop unencrypted data frames with no data

2019-01-14 Thread Stefan Sperling
On Sun, Jan 13, 2019 at 11:50:35PM +0200, Lauri Tirkkonen wrote: > Hi, (disclaimer: I know basically nothing about 802.11) > > I noticed on my AP a high counter on netstat -W "input unencrypted > packets with wep/wpa config discarded", aka is_rx_unencrypted. After > investigation it looked like

if_umb.c: typos

2019-01-14 Thread Ingo Feinerer
A few messsage -> message fixes. Index: if_umb.c === RCS file: /cvs/src/sys/dev/usb/if_umb.c,v retrieving revision 1.21 diff -u -p -r1.21 if_umb.c --- if_umb.c2 Oct 2018 19:49:10 - 1.21 +++ if_umb.c14 Jan 2019

[www] hackathons.html - fix spelling

2019-01-14 Thread Raf Czlonka
Hi all, A small spelling fix. Cheers, Raf Index: hackathons.html === RCS file: /cvs/www/hackathons.html,v retrieving revision 1.134 diff -u -p -r1.134 hackathons.html --- hackathons.html 13 Jan 2019 23:55:05 - 1.134

Re: locale in locate(1)

2019-01-14 Thread Ingo Schwarze
Hi, Jan Stary wrote on Thu, Jan 10, 2019 at 09:35:48PM +0100: > Does locate(1) need to setlocale(3)? Committed as part of a much larger diff. Note that answering that question required substantial code review and code cleanup. When auditing, don't just mechanically look for suspicious

Re: off by one ksh

2019-01-14 Thread Ingo Schwarze
Hi Ted, Ted Unangst wrote on Sun, Jan 13, 2019 at 08:23:01PM -0500: > Ingo Schwarze wrote: >> Feel free to either commit the complete patch below or commit >> only your part and optionally OK one, two, or three of my additional >> changes. > These look ok with one comment. Committed, thanks