Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-14 Thread Simon Kelley
On 13/02/18 01:31, Will Parsons wrote: > On Monday, 12 Feb 2018 10:06 AM -0500, Geert Stappers wrote: >> On Mon, Feb 12, 2018 at 01:41:19PM -, Andy Hawkins wrote: >>> In article <20180212104746.gb9...@gpm.stappers.nl>, Geert Stappers wrote: FWIW I'm formatting the patch so it be `git am`

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-13 Thread Andy Hawkins
In article , Will Parsons wrote: > I know it's fun to come up with a patch to fix a supposed problem with > a widely-employed piece of software, but stop for a minute and think > about what you're attempting to "achieve". > > If successful, you will add just another piece of bloat (that

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-12 Thread Will Parsons
On Monday, 12 Feb 2018 10:06 AM -0500, Geert Stappers wrote: > On Mon, Feb 12, 2018 at 01:41:19PM -, Andy Hawkins wrote: >> In article <20180212104746.gb9...@gpm.stappers.nl>, Geert Stappers wrote: >> > FWIW I'm formatting the patch so it be `git am` >> } FWIW I'm formatting the patch so it c

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-12 Thread Geert Stappers
On Mon, Feb 12, 2018 at 01:41:19PM -, Andy Hawkins wrote: > In article <20180212104746.gb9...@gpm.stappers.nl>, Geert Stappers wrote: > > FWIW I'm formatting the patch so it be `git am` > } FWIW I'm formatting the patch so it can be `git am` processed > > Is this the 'correct' way to do it?

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-12 Thread Andy Hawkins
Hi, In article , john doe wrote: > Idealy, you would clone the dnsmasq repository, then you would do your > changes then commit (git commit -s) them and finaly send the patch. I've already done most of that. I posted the output of git diff in an earlier message. What git command shou

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-12 Thread john doe
On 2/12/2018 2:41 PM, Andy Hawkins wrote: Hi, In article <20180212104746.gb9...@gpm.stappers.nl>, Geert Stappers wrote: FWIW I'm formatting the patch so it be `git am` Is this the 'correct' way to do it? I couldn't really find any information on how to contribute to dnsmasq. It

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-12 Thread Andy Hawkins
Hi, In article <20180212104746.gb9...@gpm.stappers.nl>, Geert Stappers wrote: > FWIW I'm formatting the patch so it be `git am` Is this the 'correct' way to do it? I couldn't really find any information on how to contribute to dnsmasq. > It will have Andy's name, but no sign-off. Is

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-12 Thread Geert Stappers
On Sun, Feb 11, 2018 at 06:47:10PM -, Andy Hawkins wrote: > Hi, > > In article <45676db9-d890-14a0-7743-f0340b7d1...@mail.com>, >john doe wrote: > >> [andy@xcp-dev dnsmasq (hosts-dirs *)]$ git diff --ignore-space-at-eol > >> diff --git a/src/inotify.c b/src/inotify.c > >> old mode

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-11 Thread Andy Hawkins
Hi, In article <45676db9-d890-14a0-7743-f0340b7d1...@mail.com>, john doe wrote: >> [andy@xcp-dev dnsmasq (hosts-dirs *)]$ git diff --ignore-space-at-eol >> diff --git a/src/inotify.c b/src/inotify.c >> old mode 100644 >> new mode 100755 > > Is the change of the mode intentionel (from 64

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-11 Thread john doe
On 2/11/2018 4:58 PM, Andy Hawkins wrote: Hi, In article , Andy Hawkins wrote: I could have a look at submitting a patch, but my editor is showing some very strange indentation of the source, so I suspect I have my tab settings incorrect. What is the standard setting for tabs on the

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-11 Thread Lonnie Abelbeck
Dominik, I'm thinking you do not want to call -- in->name[strlen(in->name)-1]; -- before testing for "if (in->len == 0" Lonnie On Feb 11, 2018, at 10:10 AM, Dominik Derigs wrote: > Forgot to attach the proposed patch. > > Best, > Dominik > > > On 11.02.2018 17:02, Dominik Derigs wrote: >>

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-11 Thread Andy Hawkins
Hi, In article , Andy Hawkins wrote: > I could have a look at submitting a patch, but my editor is showing some > very strange indentation of the source, so I suspect I have my tab settings > incorrect. What is the standard setting for tabs on the dnasmasq source > files? Here's an att

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-11 Thread Dominik Derigs
Forgot to attach the proposed patch. Best, Dominik On 11.02.2018 17:02, Dominik Derigs wrote: > Hey Andy (and list), > > According to the inotify man page, the name buffer will always be > null-terminated. Furthermore, the name buffer seems to be allocated in > chunks of 16 bytes. I have not fou

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-11 Thread Dominik Derigs
Hey Andy (and list), According to the inotify man page, the name buffer will always be null-terminated. Furthermore, the name buffer seems to be allocated in chunks of 16 bytes. I have not found an official confirmation for that. I the way to go would be: char lastchar = in->name[strlen(in->name)

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-11 Thread Andy Hawkins
Hi, In article , Andy Hawkins wrote: > In inotify.c, around line 236 is the following code block: > > /* ignore emacs backups and dotfiles */ > if (in->len == 0 || > in->name[in->len - 1] == '~' || > (in->name[0] == '#' && in->name[in->len - 1] =

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-11 Thread Andy Hawkins
Hi, In article <20180211083655.gy21...@gpm.stappers.nl>, Geert Stappers wrote: > I do read that statement as 80% of needed source code already present. > Craft the missing source code into a patch, posted to here > and see what happens. I decided to do exactly that, and started looking

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-11 Thread Geert Stappers
On Thu, Feb 08, 2018 at 09:11:43PM -, Andy Hawkins wrote: > In article <20180208164432.GA97242@wopr>, Kurt H Maier wrote: > > You should fix the editor; that behavior is dangerous for other reasons, > > similar to the ones outlined here: > > http://openwall.com/lists/oss-security/2017/11/27/2 >

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-09 Thread Kurt H Maier
On Fri, Feb 09, 2018 at 05:33:19PM +0100, Olaf Hering wrote: > > This talks about apples, while Andy talks about oranges. > Fix "$dnsmasq" to process only files intended for "$dnsmasq". Fix "$editor" to edit files instead of littering in the place you put files to indicate they're intended for "$

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-09 Thread Olaf Hering
On Thu, Feb 08, Kurt H Maier wrote: > You should fix the editor; that behavior is dangerous for other reasons, > similar to the ones outlined here: > http://openwall.com/lists/oss-security/2017/11/27/2 This talks about apples, while Andy talks about oranges. Fix "$dnsmasq" to process only files i

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-08 Thread Andy Hawkins
Hi, In article <20180208164432.GA97242@wopr>, Kurt H Maier wrote: > You should fix the editor; that behavior is dangerous for other reasons, > similar to the ones outlined here: > http://openwall.com/lists/oss-security/2017/11/27/2 I take your point. However, given that the facility is

Re: [Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-08 Thread Kurt H Maier
On Thu, Feb 08, 2018 at 03:18:00PM -, Andy Hawkins wrote: > > I'm finding that when I edit files in those directories, my editor creates a > backup file (original file name with ~ appended) and these backup files are > then processed by dnsmasq leading to a duplicate. > You should fix

[Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir

2018-02-08 Thread Andy Hawkins
Hi all, Would it be possible to extend hosts-dir and dhcphosts-dir to also allow the specification of a file mask to process within those directories? I'm finding that when I edit files in those directories, my editor creates a backup file (original file name with ~ appended) and these backup fil