1. 27 Aug, 2019 1 commit
  2. 15 Mar, 2019 1 commit
    • Aurelien Aptel's avatar
      CIFS: make mknod() an smb_version_op · c847dccf
      Aurelien Aptel authored
      This cleanup removes cifs specific code from SMB2/SMB3 code paths
      which is cleaner and easier to maintain as the code to handle
      special files is improved.  Below is an example creating special files
      using 'sfu' mount option over SMB3 to Windows (with this patch)
      (Note that to Samba server, support for saving dos attributes
      has to be enabled for the SFU mount option to work).
      In the future this will also make implementation of creating
      special files as reparse points easier (as Windows NFS server does
      for example).
         root@smf-Thinkpad-P51:~# stat -c "%F" /mnt2/char
         character special file
         root@smf-Thinkpad-P51:~# stat -c "%F" /mnt2/block
         block special file
      Signed-off-by: default avatarAurelien Aptel <aaptel@suse.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
  3. 06 Dec, 2018 1 commit
  4. 12 Jul, 2018 3 commits
  5. 01 Jun, 2018 1 commit
  6. 22 May, 2018 2 commits
  7. 20 Apr, 2018 1 commit
  8. 30 Oct, 2017 1 commit
  9. 30 Aug, 2017 1 commit
  10. 23 Aug, 2017 1 commit
    • Ronnie Sahlberg's avatar
      cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup() · d3edede2
      Ronnie Sahlberg authored
      Add checking for the path component length and verify it is <= the maximum
      that the server advertizes via FileFsAttributeInformation.
      With this patch cifs.ko will now return ENAMETOOLONG instead of ENOENT
      when users to access an overlong path.
      To test this, try to cd into a (non-existing) directory on a CIFS share
      that has a too long name:
      cd /mnt/aaaaaaaaaaaaaaa...
      and it now should show a good error message from the shell:
      bash: cd: /mnt/aaaaaaaaaaaaaaaa...aaaaaa: File name too long
      rh bz 1153996
      Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      Cc: <stable@vger.kernel.org>
  11. 02 Mar, 2017 1 commit
  12. 15 Dec, 2016 1 commit
    • Sachin Prabhu's avatar
      cifs_get_root shouldn't use path with tree name · 374402a2
      Sachin Prabhu authored
      When a server returns the optional flag SMB_SHARE_IS_IN_DFS in response
      to a tree connect, cifs_build_path_to_root() will return a pathname
      which includes the hostname. This causes problems with cifs_get_root()
      which separates each component and does a lookup for each component of
      the path which in this case will incorrectly include looking up the
      hostname component as a path component.
      We encountered a problem with dfs shares hosted by a Netapp. When
      connecting to nodes pointed to by the DFS share. The tree connect for
      these nodes return SMB_SHARE_IS_IN_DFS resulting failures in lookup
      in cifs_get_root().
      RH bz: 1373153
      The patch was tested against a Netapp simulator and by a user using an
      actual Netapp server.
      Signed-off-by: default avatarSachin Prabhu <sprabhu@redhat.com>
      Reported-by: default avatarPierguido Lambri <plambri@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
  13. 16 Sep, 2016 1 commit
  14. 31 Jul, 2016 1 commit
  15. 29 Jul, 2016 1 commit
  16. 28 Jul, 2016 1 commit
  17. 12 Jul, 2016 1 commit
  18. 05 Jul, 2016 1 commit
  19. 11 Jun, 2016 1 commit
    • Linus Torvalds's avatar
      vfs: make the string hashes salt the hash · 8387ff25
      Linus Torvalds authored
      We always mixed in the parent pointer into the dentry name hash, but we
      did it late at lookup time.  It turns out that we can simplify that
      lookup-time action by salting the hash with the parent pointer early
      instead of late.
      A few other users of our string hashes also wanted to mix in their own
      pointers into the hash, and those are updated to use the same mechanism.
      Hash users that don't have any particular initial salt can just use the
      NULL pointer as a no-salt.
      Cc: Vegard Nossum <vegard.nossum@oracle.com>
      Cc: George Spelvin <linux@sciencehorizons.net>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  20. 11 May, 2015 1 commit
  21. 15 Apr, 2015 1 commit
  22. 16 Oct, 2014 1 commit
    • Steve French's avatar
      Allow mknod and mkfifo on SMB2/SMB3 mounts · db8b631d
      Steve French authored
      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: default avatarSteve French <smfrench@gmail.com>
  23. 09 Oct, 2014 1 commit
  24. 22 Aug, 2014 1 commit
  25. 10 Feb, 2014 1 commit
    • Steve French's avatar
      [CIFS] Fix cifsacl mounts over smb2 to not call cifs · 42eacf9e
      Steve French authored
      When mounting with smb2/smb3 (e.g. vers=2.1) and cifsacl mount option,
      it was trying to get the mode by querying the acl over the cifs
      rather than smb2 protocol.  This patch makes that protocol
      independent and makes cifsacl smb2 mounts return a more intuitive
      operation not supported error (until we add a worker function
      for smb2_get_acl).
      Note that a previous patch fixed getxattr/setxattr for the CIFSACL xattr
      which would unconditionally call cifs_get_acl and cifs_set_acl (even when
      mounted smb2). I made those protocol independent last week (new protocol
      version operations "get_acl" and "set_acl" but did not add an
      smb2_get_acl and smb2_set_acl yet so those now simply return EOPNOTSUPP
      which at least is better than sending cifs requests on smb2 mount)
      The previous patches did not fix the one remaining case though ie
      mounting with "cifsacl" when getting mode from acl would unconditionally
      end up calling "cifs_get_acl_from_fid" even for smb2 - so made that protocol
      independent but to make that protocol independent had to make sure that the callers
      were passing the protocol independent handle structure (cifs_fid) instead
      of cifs specific _u16 network file handle (ie cifs_fid instead of cifs_fid->fid)
      Now mount with smb2 and cifsacl mount options will return EOPNOTSUP (instead
      of timing out) and a future patch will add smb2 operations (e.g. get_smb2_acl)
      to enable this.
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
  26. 20 Jan, 2014 2 commits
  27. 27 Dec, 2013 1 commit
  28. 11 Nov, 2013 1 commit
  29. 16 Sep, 2013 1 commit
  30. 08 Sep, 2013 1 commit
  31. 10 Jul, 2013 2 commits
  32. 29 Jun, 2013 1 commit
  33. 05 May, 2013 2 commits
    • Wei Yongjun's avatar
      CIFS: fix error return code in cifs_atomic_open() · efb79f28
      Wei Yongjun authored
      Fix to return a negative error code from the error handling
      case instead of 0, as returned elsewhere in this function.
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
    • Joe Perches's avatar
      [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg · f96637be
      Joe Perches authored
      It's not obvious from reading the macro names that these macros
      are for debugging.  Convert the names to a single more typical
      kernel style cifs_dbg macro.
      	cERROR(1, ...)   -> cifs_dbg(VFS, ...)
      	cFYI(1, ...)     -> cifs_dbg(FYI, ...)
      	cFYI(DBG2, ...)  -> cifs_dbg(NOISY, ...)
      Move the terminating format newline from the macro to the call site.
      Add CONFIG_CIFS_DEBUG function cifs_vfs_err to emit the
      "CIFS VFS: " prefix for VFS messages.
      Size is reduced ~ 1% when CONFIG_CIFS_DEBUG is set (default y)
      $ size fs/cifs/cifs.ko*
         text    data     bss     dec     hex filename
       265245	   2525	    132	 267902	  4167e	fs/cifs/cifs.ko.new
       268359    2525     132  271016   422a8 fs/cifs/cifs.ko.old
      Other miscellaneous changes around these conversions:
      o Miscellaneous typo fixes
      o Add terminating \n's to almost all formats and remove them
        from the macros to be more kernel style like.  A few formats
        previously had defective \n's
      o Remove unnecessary OOM messages as kmalloc() calls dump_stack
      o Coalesce formats to make grep easier,
        added missing spaces when coalescing formats
      o Use %s, __func__ instead of embedded function name
      o Removed unnecessary "cifs: " prefixes
      o Convert kzalloc with multiply to kcalloc
      o Remove unused cifswarn macro
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
  34. 13 Feb, 2013 1 commit