1. 21 3月, 2015 1 次提交
  2. 17 2月, 2015 1 次提交
  3. 11 2月, 2015 1 次提交
  4. 27 1月, 2015 1 次提交
  5. 21 1月, 2015 2 次提交
  6. 20 1月, 2015 2 次提交
  7. 19 1月, 2015 1 次提交
    • A
      fix deadlock in cifs_ioctl_clone() · 378ff1a5
      Al Viro 提交于
      It really needs to check that src is non-directory *and* use
      {un,}lock_two_nodirectories().  As it is, it's trivial to cause
      double-lock (ioctl(fd, CIFS_IOC_COPYCHUNK_FILE, fd)) and if the
      last argument is an fd of directory, we are asking for trouble
      by violating the locking order - all directories go before all
      non-directories.  If the last argument is an fd of parent
      directory, it has 50% odds of locking child before parent,
      which will cause AB-BA deadlock if we race with unlink().
      
      Cc: stable@vger.kernel.org @ 3.13+
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      378ff1a5
  8. 17 1月, 2015 3 次提交
  9. 23 12月, 2014 1 次提交
  10. 15 12月, 2014 2 次提交
    • K
      Fix signed/unsigned pointer warning · 97c7134a
      Kevin Cernekee 提交于
      Commit 2ae83bf9 ("[CIFS] Fix setting time before epoch (negative
      time values)") changed "u64 t" to "s64 t", which makes do_div() complain
      about a pointer signedness mismatch:
      
            CC      fs/cifs/netmisc.o
          In file included from ./arch/mips/include/asm/div64.h:12:0,
                           from include/linux/kernel.h:124,
                           from include/linux/list.h:8,
                           from include/linux/wait.h:6,
                           from include/linux/net.h:23,
                           from fs/cifs/netmisc.c:25:
          fs/cifs/netmisc.c: In function ‘cifs_NTtimeToUnix’:
          include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast [enabled by default]
            (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                                      ^
          fs/cifs/netmisc.c:941:22: note: in expansion of macro ‘do_div’
             ts.tv_nsec = (long)do_div(t, 10000000) * 100;
      
      Introduce a temporary "u64 abs_t" variable to fix this.
      Signed-off-by: NKevin Cernekee <cernekee@gmail.com>
      Signed-off-by: NSteve French <steve.french@primarydata.com>
      97c7134a
    • S
      Convert MessageID in smb2_hdr to LE · 9235d098
      Sachin Prabhu 提交于
      We have encountered failures when When testing smb2 mounts on ppc64
      machines when using both Samba as well as Windows 2012.
      
      On poking around, the problem was determined to be caused by the
      high endian MessageID passed in the header for smb2. On checking the
      corresponding MID for smb1 is converted to LE before being sent on the
      wire.
      
      We have tested this patch successfully on a ppc64 machine.
      Signed-off-by: NSachin Prabhu <sprabhu@redhat.com>
      9235d098
  11. 11 12月, 2014 3 次提交
  12. 08 12月, 2014 9 次提交
  13. 20 11月, 2014 3 次提交
  14. 04 11月, 2014 1 次提交
  15. 18 10月, 2014 1 次提交
  16. 17 10月, 2014 8 次提交
    • S
    • S
      Workaround Mac server problem · b5b374ea
      Steve French 提交于
      Mac server returns that they support CIFS Unix Extensions but
      doesn't actually support QUERY_FILE_UNIX_BASIC so mount fails.
      
      Workaround this problem by disabling use of Unix CIFS protocol
      extensions if server returns an EOPNOTSUPP error on
      QUERY_FILE_UNIX_BASIC during mount.
      Signed-off-by: NSteve French <smfrench@gmail.com>
      b5b374ea
    • S
      Remap reserved posix characters by default (part 3/3) · 2baa2682
      Steve French 提交于
      This is a bigger patch, but its size is mostly due to
      a single change for how we check for remapping illegal characters
      in file names - a lot of repeated, small changes to
      the way callers request converting file names.
      
      The final patch in the series does the following:
      
      1) changes default behavior for cifs to be more intuitive.
      Currently we do not map by default to seven reserved characters,
      ie those valid in POSIX but not in NTFS/CIFS/SMB3/Windows,
      unless a mount option (mapchars) is specified.  Change this
      to by default always map and map using the SFM maping
      (like the Mac uses) unless the server negotiates the CIFS Unix
      Extensions (like Samba does when mounting with the cifs protocol)
      when the remapping of the characters is unnecessary.  This should
      help SMB3 mounts in particular since Samba will likely be
      able to implement this mapping with its new "vfs_fruit" module
      as it will be doing for the Mac.
      2) if the user specifies the existing "mapchars" mount option then
      use the "SFU" (Microsoft Services for Unix, SUA) style mapping of
      the seven characters instead.
      3) if the user specifies "nomapposix" then disable SFM/MAC style mapping
      (so no character remapping would be used unless the user specifies
      "mapchars" on mount as well, as above).
      4) change all the places in the code that check for the superblock
      flag on the mount which is set by mapchars and passed in on all
      path based operation and change it to use a small function call
      instead to set the mapping type properly (and check for the
      mapping type in the cifs unicode functions)
      Signed-off-by: NSteve French <smfrench@gmail.com>
      2baa2682
    • S
      Allow conversion of characters in Mac remap range (part 2) · a4153cb1
      Steve French 提交于
      The previous patch allowed remapping reserved characters from directory
      listenings, this patch adds conversion the other direction, allowing
      opening of files with any of the seven reserved characters.
      Signed-off-by: NSteve French <smfrench@gmail.com>
      Reviewed-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com>
      a4153cb1
    • S
      Allow conversion of characters in Mac remap range. Part 1 · b693855f
      Steve French 提交于
      This allows directory listings to Mac to display filenames
      correctly which have been created with illegal (to Windows)
      characters in their filename. It does not allow
      converting the other direction yet ie opening files with
      these characters (followon patch).
      
      There are seven reserved characters that need to be remapped when
      mounting to Windows, Mac (or any server without Unix Extensions) which
      are valid in POSIX but not in the other OS.
      
      : \ < > ? * |
      
      We used the normal UCS-2 remap range for this in order to convert this
      to/from UTF8 as did Windows Services for Unix (basically add 0xF000 to
      any of the 7 reserved characters), at least when the "mapchars" mount
      option was specified.
      
      Mac used a very slightly different "Services for Mac" remap range
      0xF021 through 0xF027.  The attached patch allows cifs.ko (the kernel
      client) to read directories on macs containing files with these
      characters and display their names properly.  In theory this even
      might be useful on mounts to Samba when the vfs_catia or new
      "vfs_fruit" module is loaded.
      
      Currently the 7 reserved characters look very strange in directory
      listings from cifs.ko to Mac server.  This patch allows these file
      name characters to be read (requires specifying mapchars on mount).
      
      Two additional changes are needed:
      1) Make it more automatic: a way of detecting enough info so that
      we know to try to always remap these characters or not. Various
      have suggested that the SFM approach be made the default when
      the server does not support POSIX Unix extensions (cifs mounts
      to Samba for example) so need to make SFM remapping the default
      unless mapchars (SFU style mapping) specified on mount or no
      mapping explicitly requested or no mapping needed (cifs mounts to Samba).
      
      2) Adding a patch to map the characters the other direction
      (ie UTF-8 to UCS-2 on open).  This patch does it for translating
      readdir entries (ie UCS-2 to UTF-8)
      Signed-off-by: NSteve French <smfrench@gmail.com>
      Reviewed-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com>
      b693855f
    • S
      mfsymlinks support for SMB2.1/SMB3. Part 2 query symlink · c22870ea
      Steve French 提交于
      Adds support on SMB2.1 and SMB3 mounts for emulation of symlinks
      via the "Minshall/French" symlink format already used for cifs
      mounts when mfsymlinks mount option is used (and also used by Apple).
        http://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks
      This second patch adds support to query them (recognize them as symlinks
      and read them).  Third version of patch makes minor corrections
      to error handling.
      Signed-off-by: NSteve French <smfrench@gmail.com>
      Reviewed-by: NStefan Metzmacher <metze@samba.org>
      c22870ea
    • S
      Add mfsymlinks support for SMB2.1/SMB3. Part 1 create symlink · 5ab97578
      Steve French 提交于
      Adds support on SMB2.1 and SMB3 mounts for emulation of symlinks
      via the "Minshall/French" symlink format already used for cifs
      mounts when mfsymlinks mount option is used (and also used by Apple).
      http://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks
      This first patch adds support to create them.  The next patch will
      add support for recognizing them and reading them.  Although CIFS/SMB3
      have other types of symlinks, in the many use cases they aren't
      practical (e.g. either require cifs only mounts with unix extensions
      to Samba, or require the user to be Administrator to Windows for SMB3).
      This also helps enable running additional xfstests over SMB3 (since some
      xfstests directly or indirectly require symlink support).
      Signed-off-by: NSteve French <smfrench@gmail.com>
      CC: Stefan Metzmacher <metze@samba.org>
      5ab97578
    • S
      Allow mknod and mkfifo on SMB2/SMB3 mounts · db8b631d
      Steve French 提交于
      The "sfu" mount option did not work on SMB2/SMB3 mounts.
      With these changes when the "sfu" mount option is passed in
      on an smb2/smb2.1/smb3 mount the client can emulate (and
      recognize) fifo and device (character and device files).
      
      In addition the "sfu" mount option should not conflict
      with "mfsymlinks" (symlink emulation) as we will never
      create "sfu" style symlinks, but using "sfu" mount option
      will allow us to recognize existing symlinks, created with
      Microsoft "Services for Unix" (SFU and SUA).
      
      To enable the "sfu" mount option for SMB2/SMB3 the calling
      syntax of the generic cifs/smb2/smb3 sync_read and sync_write
      protocol dependent function needed to be changed (we
      don't have a file struct in all cases), but this actually
      ended up simplifying the code a little.
      Signed-off-by: NSteve French <smfrench@gmail.com>
      db8b631d