1. 21 Jun, 2019 5 commits
  2. 13 Jun, 2019 4 commits
    • Ralph Boehme's avatar
      vfs_fruit: change trigger points of AppleDouble conversion · 8b1dfd9b
      Ralph Boehme authored
      This moves the trigger points where AppleDouble file conversion is run by
      ad_convert() from deep down the callchain in ad_read_rsrc_adouble() to high
      level VFS entry points.
      
      Currently ad_convert() will be triggered as part of open_file_ntcreate(...,
      "file:AFP_AfpResource", ...): after SMB_VFS_OPEN() has been called with O_CREAT,
      what created the file, we call SMB_VFS_FSTAT() on the just created
      filehandle. This ends up in ad_convert(), finds the resource fork empty and thus
      deletes the file.
      
      This commit moves calling of the conversion funtion to the high level VFS entry
      points where the converted metadata is needed:
      
      o for directory enumerations SMB_VFS_READDIR_ATTR() is called to fill in the
        repurposed fields in the directory entry metadata
      
      o obviously for SMB_VFS_CREATE_FILE() on an macOS stream
      
      Bug: https://bugzilla.samba.org/show_bug.cgi?id=13958Signed-off-by: 's avatarRalph Boehme <slow@samba.org>
      Reviewed-by: 's avatarJeremy Allison <jra@samba.org>
      (cherry picked from commit 78a4639b2d06cc69788861618d2e91945e142d2b)
      
      Autobuild-User(v4-9-test): Karolin Seeger <kseeger@samba.org>
      Autobuild-Date(v4-9-test): Thu Jun 13 14:25:17 UTC 2019 on sn-devel-144
      8b1dfd9b
    • Ralph Boehme's avatar
      selftest: run vfs.fruit test against a share that deletes empty resource forks · 77655c65
      Ralph Boehme authored
      This reveals a bug in the AppleDouble conversion code: the conversion code that
      unlinks an empty resource fork AppleDouble sidecar file ("._file") gets
      triggered as part of open_file_ntcreate(..., "file:AFP_AfpResource", ...):
      
      after SMB_VFS_OPEN() has been called with O_CREAT, what created the file, we
      call SMB_VFS_FSTAT() on the just created filehandle. This ends up in
      ad_convert(), finds the resource fork empty and thus deletes the file.
      
      Bug: https://bugzilla.samba.org/show_bug.cgi?id=13958Signed-off-by: 's avatarRalph Boehme <slow@samba.org>
      Reviewed-by: 's avatarJeremy Allison <jra@samba.org>
      (cherry picked from commit 8ed9b6b457923d2353d1d18838f4a278db48c6b9)
      77655c65
    • Volker Lendecke's avatar
      smbd: Fix a panic · bd511655
      Volker Lendecke authored
      Opening a file with a stale (smbd died) LEVEL_II oplock makes
      
      vfs_set_filelen-> ... ->contend_level2_oplocks_begin_default
      
      trigger the immediate leading to do_break_to_none. This goes through
      because fsp->oplock_type is not initialized yet, thus 0. Also,
      file_has_read_oplocks is still valid, because the smbd that has died
      could not clean up the brlock.tdb entry.
      
      Later in the code the exclusive oplock is granted, which is then found
      by do_break_to_none, making it panic.
      
      This patch just runs the direct FTRUNCATE instead of vfs_set_filelen.
      This means the contend_level2_oplock code is skipped.
      
      The relevant break (LEVEL_II to NONE) is now done in delay_for_oplock()
      with the nice effect of removing a comment that was very confusing to
      me.
      
      Bug: https://bugzilla.samba.org/show_bug.cgi?id=13957Signed-off-by: 's avatarVolker Lendecke <vl@samba.org>
      Reviewed-by: 's avatarRalph Boehme <slow@samba.org>
      
      Autobuild-User(master): Ralph Böhme <slow@samba.org>
      Autobuild-Date(master): Wed May 22 20:09:29 UTC 2019 on sn-devel-184
      bd511655
    • Volker Lendecke's avatar
  3. 17 May, 2019 9 commits
  4. 15 May, 2019 2 commits
  5. 08 May, 2019 2 commits
  6. 07 May, 2019 2 commits
  7. 24 Apr, 2019 1 commit
  8. 05 Apr, 2019 10 commits
  9. 28 Mar, 2019 5 commits