Re: fuse: vfs create does not map 1:1 to fuse create

2017-11-17 Thread Helg Bredow
On Fri, 10 Nov 2017 09:09:32 +0100 Martin Pieuchot <m...@openbsd.org> wrote: > On 09/11/17(Thu) 01:20, Helg Bredow wrote: > > > On 08/11/17(Wed) 14:12, Helg Bredow wrote: > > > > There is a bug when creating a file in fuse-exfat and then deleting it > > > &g

Re: libfuse: signal handler doesn't cater for "Device busy" and other errors

2017-11-11 Thread Helg Bredow
On Fri, 10 Nov 2017 11:55:53 + Helg Bredow <xx...@msn.com> wrote: > On Fri, 10 Nov 2017 10:13:35 +0100 > Anton Lindqvist <an...@openbsd.org> wrote: > > > On Fri, Nov 10, 2017 at 09:36:25AM +0100, Martin Pieuchot wrote: > > > On 09/11/17(Thu) 09:02, He

Re: libfuse: signal handler doesn't cater for "Device busy" and other errors

2017-11-10 Thread Helg Bredow
On Fri, 10 Nov 2017 10:13:35 +0100 Anton Lindqvist <an...@openbsd.org> wrote: > On Fri, Nov 10, 2017 at 09:36:25AM +0100, Martin Pieuchot wrote: > > On 09/11/17(Thu) 09:02, Helg Bredow wrote: > > > The current libfuse signal handling assumes that the file system will &

libfuse: signal handler doesn't cater for "Device busy" and other errors

2017-11-09 Thread Helg Bredow
The current libfuse signal handling assumes that the file system will always be unmounted by the child. One obvious case where this is not true is if the file system is busy. To replicate: 1. mount a fuse file system 2. cd anywhere on the file system 3. pkill -INT The result is a zombie child

Re: fuse: vfs create does not map 1:1 to fuse create

2017-11-08 Thread Helg Bredow
On Wed, 8 Nov 2017 16:50:07 +0100 Martin Pieuchot <m...@openbsd.org> wrote: > On 08/11/17(Wed) 14:12, Helg Bredow wrote: > > There is a bug when creating a file in fuse-exfat and then deleting it > > again without first unmounting the file system. The reason for this i

fuse: vfs create does not map 1:1 to fuse create

2017-11-08 Thread Helg Bredow
There is a bug when creating a file in fuse-exfat and then deleting it again without first unmounting the file system. The reason for this is that fuse-exfat maintains strict reference counts and fuse currently calls the file system create and open functions when it should only call create. The

libfuse: fuse.c uses Incorrect version macro

2017-11-03 Thread Helg Bredow
The fuse_version() library function incorrectly returns FUSE_USE_VERSION. This macro is intended to be used by file systems to indicate the version of the libfuse API to compile against. This change returns the highest version of the API that libfuse supports. Both macros have the same value so

libfuse: fuse_loop_mt() should return -1

2017-11-03 Thread Helg Bredow
The library function fuse_loop_mt() is currently unimplemented. It should return -1 to indicate failure rather than claim success when it clearly didn't do anything useful. fuse_loop_mt() should never be called by file systems since fuse_parse_cmdline() and fuse_setup() alway return 0 as the

Re: libfuse: improved command line parsing

2017-10-30 Thread Helg Bredow
On Sat, 28 Oct 2017 10:07:39 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 17/10/17(Tue) 14:26, Helg Bredow wrote: > > [...] > > I've split the patch. This one improves argument and option parsing so that > > almost all sshfs arguments and options will no

Re: libfuse: fuse.c null checks and others

2017-10-30 Thread Helg Bredow
On Sat, 28 Oct 2017 09:24:55 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 25/10/17(Wed) 13:27, Helg Bredow wrote: > > I've included different minor patches below as one patch. I haven't split > > into separate patches since the changes are not complex and easy to au

libfuse: regress test for command line parsing

2017-10-30 Thread Helg Bredow
These tests confirm that currently supported options are parsed correctly by libfuse. They assume that the patches I've submitted previously have been applied. Review and suggestions for improvement are welcome. Patch to Makefile is below and new tests are attached. Index: Makefile

libfuse: fuse.c null checks and others

2017-10-26 Thread Helg Bredow
I've included different minor patches below as one patch. I haven't split into separate patches since the changes are not complex and easy to audit. Here's what it does: Almost all functions in fuse.c do not check if the arguments are null. This patch adds null checks where appropriate. Some

fuselib: patch to check for NULL in fuse_parse_cmdline()

2017-10-24 Thread Helg Bredow
Arguments to fuse_parse_cmdline() are not checked for NULL before assignment. This patch performs the check. Index: fuse.c === RCS file: /cvs/src/lib/libfuse/fuse.c,v retrieving revision 1.30 diff -u -p -u -p -r1.30 fuse.c ---

Re: libfuse: patch to prevent fuse-zip from dumping core

2017-10-18 Thread Helg Bredow
On Wed, 18 Oct 2017 15:03:21 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 18/10/17(Wed) 12:51, Helg Bredow wrote: > > On Wed, 18 Oct 2017 10:04:07 +0200 > > Martin Pieuchot <m...@openbsd.org> wrote: > > > > > On 17/10/17(Tue) 15:30, Helg Bredow

Re: libfuse: patch to prevent fuse-zip from dumping core

2017-10-18 Thread Helg Bredow
On Wed, 18 Oct 2017 10:04:07 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 17/10/17(Tue) 15:30, Helg Bredow wrote: > > If you execute "fuse-zip -V" it prints the version and then dumps core. > > This is because fuse-zip does not initialise the mount point p

libfuse: patch to prevent fuse-zip from dumping core

2017-10-17 Thread Helg Bredow
If you execute "fuse-zip -V" it prints the version and then dumps core. This is because fuse-zip does not initialise the mount point pointer to NULL. This patch ensures that it's always initialised to NULL. Index: fuse.c === RCS

Re: libfuse: improved command line parsing

2017-10-17 Thread Helg Bredow
On Mon, 16 Oct 2017 15:33:45 +0200 Martin Pieuchot <m...@openbsd.org> wrote: > On 14/10/17(Sat) 01:23, Helg Bredow wrote: > > The attached patch vastly improves fuse argument and option parsing. For > > example, all sshfs options will now be parsed successfully. It's a

libfuse: improved command line parsing

2017-10-13 Thread Helg Bredow
The attached patch vastly improves fuse argument and option parsing. For example, all sshfs options will now be parsed successfully. It's a substantial patch and can't be easily broken down further. In addition, this also adds support for the -d and -odebug options. I've also included a