[PATCH] vfs_fruit: resource fork length

Jeremy Allison jra at samba.org
Wed Sep 17 14:04:49 MDT 2014


On Wed, Sep 17, 2014 at 06:54:22PM +0200, Ralph Böhme wrote:
> On Wed, Sep 17, 2014 at 09:34:46AM -0700, Jeremy Allison wrote:
> > On Wed, Sep 17, 2014 at 02:00:51PM +0200, Ralph Böhme wrote:
> > > > 
> > > > Ralph - trying to push this and the previous
> > > > patch I'm getting:
> > > > 
> > > > [573/1680 in 53m44s] samba3.vfs.fruit(s3dc)
> > > > [574/1680 in 53m45s] samba3.vfs.fruit(plugin_s4_dc)
> > > > (../source4/torture/vfs/fruit.c:1208) writing to resource fork
> > > > Open stream vfs_fruit_dir\torture_write_rfork_io:AFP_Resource:$DATA
> > > > UNEXPECTED(failure): samba3.vfs.fruit.resource fork IO(plugin_s4_dc)
> > > >
> > > > REASON: _StringException: _StringException:
> > > > (../source4/torture/vfs/fruit.c:1227) Incorrect status
> > > > NT_STATUS_ACCESS_DENIED - should be NT_STATUS_OK
> > > >
> > > > Can you investigate and let give me an
> > > > updated patchset please ?
> > > 
> > > looks like I can't reproduce this. :/ Both make check and smbtorture
> > > complete successfully. Is the error reproducible on your system?
> > > 
> > > $ make check
> > > ...
> > > [572/1666 in 29m25s, 21 errors] idmap.rfc2307
> > > [573/1666 in 29m25s, 21 errors] samba3.vfs.fruit(s3dc)
> > > [574/1666 in 29m26s, 21 errors] samba3.vfs.fruit(plugin_s4_dc)
> > > [575/1666 in 29m26s, 21 errors] samba3.rpc.lsa.lookupsids over ncacn_np with [] (s3dc)
> > > ...
> > > $ make check TESTS=fruit
> > > ...
> > > ALL OK (4 tests in 1 testsuites)
> > 
> > Can you send me the patchset complete you're using ? Maybe
> > I messed something up....
> 
> attached.
> 
> This is a combination of the two patchsets I had submitted
> independently.

Pushed with my and Vollker's 'Reviewed-by:'.

I did notice a couple of warnings when compiling/testing
these:

[3362/4205] Compiling source3/modules/vfs_fruit.c
../source3/modules/vfs_fruit.c: In function ‘ad_read’:
../source3/modules/vfs_fruit.c:910:9: warning: ‘saved_errno’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   errno = saved_errno;
         ^
../source3/modules/vfs_fruit.c:758:6: note: ‘saved_errno’ was declared here
  int saved_errno;
      ^
../source3/modules/vfs_fruit.c:855:6: warning: ‘mode’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   if ((mode == O_RDWR)
      ^
../source3/modules/vfs_fruit.c:754:6: note: ‘mode’ was declared here
  int mode;

The 'saved_errno' one I think is noise, but can be
fixed up by initializing to zero.

The 'mode' one I think is real - in the

if (ad->ad_fsp && ad->ad_fsp->fh && (ad->ad_fsp->fh->fd != -1)) {
         fd = ad->ad_fsp->fh->fd;
} else {

first case here you don't set mode, and then it gets
looked at later on.

I'll review any updates you have for this, and
in the meantime compiling with -Wmaybe-uninitialized
is recommended :-).

Cheers,

	Jeremy.


More information about the samba-technical mailing list