Re: exclude-list in mtree (2)

2014-06-20 Thread Manuel Giraud
Tobias Stoeckmann writes: > On Fri, Jun 20, 2014 at 04:34:19PM +0200, Manuel Giraud wrote: >> +lbuf = NULL; >> +while ((buf = fgetln(fp, &len))) { >> +if (buf[len - 1] == '\n') { >> +if (len == 1) >> +continue; >> +

Re: exclude-list in mtree (2)

2014-06-20 Thread Tobias Stoeckmann
On Fri, Jun 20, 2014 at 04:34:19PM +0200, Manuel Giraud wrote: > + lbuf = NULL; > + while ((buf = fgetln(fp, &len))) { > + if (buf[len - 1] == '\n') { > + if (len == 1) > + continue; > + buf[len - 1] = '\0'; >

Re: exclude-list in mtree (2)

2014-06-20 Thread Manuel Giraud
Same with patch inline: Index: Makefile === RCS file: /cvs/src/usr.sbin/mtree/Makefile,v retrieving revision 1.9 diff -u -p -r1.9 Makefile --- Makefile15 Apr 2013 06:25:18 - 1.9 +++ Makefile20 Jun 2014 12:45:35 - @

exclude-list in mtree (2)

2014-06-20 Thread Manuel Giraud
Hi, In the previous patch, I forgot to check for excluded files at verification time (duh). I also add the name of the excluded files list into the mtree output so it can be retrieved later (e.g. in /usr/libexec/security). Index: Makefile ==

exclude-list in mtree

2014-06-10 Thread Manuel Giraud
Hi, Here's a patch to make mtree support exclude-list. My ultimate goal is to monitor some directory activity as describe in security(8) (part on /etc/mtree/something.secure) excluding some files (e.g. logs). The code is mostly copied from FreeBSD. Index: Makefile