1. 11 12月, 2014 1 次提交
  2. 17 10月, 2014 1 次提交
    • 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
  3. 02 8月, 2014 5 次提交
  4. 01 8月, 2014 1 次提交
  5. 17 4月, 2014 1 次提交
  6. 08 2月, 2014 2 次提交
  7. 20 1月, 2014 2 次提交
  8. 28 12月, 2013 1 次提交
  9. 16 11月, 2013 1 次提交
    • S
      setfacl removes part of ACL when setting POSIX ACLs to Samba · b1d93356
      Steve French 提交于
      setfacl over cifs mounts can remove the default ACL when setting the
      (non-default part of) the ACL and vice versa (we were leaving at 0
      rather than setting to -1 the count field for the unaffected
      half of the ACL.  For example notice the setfacl removed
      the default ACL in this sequence:
      
      steven@steven-GA-970A-DS3:~/cifs-2.6$ getfacl /mnt/test-dir ; setfacl
      -m default:user:test:rwx,user:test:rwx /mnt/test-dir
      getfacl: Removing leading '/' from absolute path names
      user::rwx
      group::r-x
      other::r-x
      default:user::rwx
      default:user:test:rwx
      default:group::r-x
      default:mask::rwx
      default:other::r-x
      
      steven@steven-GA-970A-DS3:~/cifs-2.6$ getfacl /mnt/test-dir
      getfacl: Removing leading '/' from absolute path names
      user::rwx
      user:test:rwx
      group::r-x
      mask::rwx
      other::r-x
      
      CC: Stable <stable@kernel.org>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      Acked-by: NJeremy Allison <jra@samba.org>
      b1d93356
  10. 03 11月, 2013 1 次提交
    • S
      Allow setting per-file compression via CIFS protocol · c7f508a9
      Steve French 提交于
      An earlier patch allowed setting the per-file compression flag
      
      "chattr +c filename"
      
      on an smb2 or smb3 mount, and also allowed lsattr to return
      whether a file on a cifs, or smb2/smb3 mount was compressed.
      
      This patch extends the ability to set the per-file
      compression flag to the cifs protocol, which uses a somewhat
      different IOCTL mechanism than SMB2, although the payload
      (the flags stored in the compression_state) are the same.
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      c7f508a9
  11. 06 10月, 2013 1 次提交
    • S
      do not treat non-symlink reparse points as valid symlinks · c31f3307
      Steve French 提交于
      Windows 8 and later can create NFS symlinks (within reparse points)
      which we were assuming were normal NTFS symlinks and thus reporting
      corrupt paths for.  Add check for reparse points to make sure that
      they really are normal symlinks before we try to parse the pathname.
      
      We also should not be parsing other types of reparse points (DFS
      junctions etc) as if they were a  symlink so return EOPNOTSUPP
      on those.  Also fix endian errors (we were not parsing symlink
      lengths as little endian).
      
      This fixes commit d244bf2d
      which implemented follow link for non-Unix CIFS mounts
      
      CC: Stable <stable@kernel.org>
      Reviewed-by: NAndrew Bartlett <abartlet@samba.org>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      c31f3307
  12. 18 9月, 2013 1 次提交
    • J
      cifs: stop trying to use virtual circuits · 9ae6cf60
      Jeff Layton 提交于
      Currently, we try to ensure that we use vcnum of 0 on the first
      established session on a connection and then try to use a different
      vcnum on each session after that.
      
      This is a little odd, since there's no real reason to use a different
      vcnum for each SMB session. I can only assume there was some confusion
      between SMB sessions and VCs. That's somewhat understandable since they
      both get created during SESSION_SETUP, but the documentation indicates
      that they are really orthogonal. The comment on max_vcs in particular
      looks quite misguided. An SMB session is already uniquely identified
      by the SMB UID value -- there's no need to again uniquely ID with a
      VC.
      
      Furthermore, a vcnum of 0 is a cue to the server that it should release
      any resources that were previously held by the client. This sounds like
      a good thing, until you consider that:
      
      a) it totally ignores the fact that other programs on the box (e.g.
      smbclient) might have connections established to the server. Using a
      vcnum of 0 causes them to get kicked off.
      
      b) it causes problems with NAT. If several clients are connected to the
      same server via the same NAT'ed address, whenever one connects to the
      server it kicks off all the others, which then reconnect and kick off
      the first one...ad nauseum.
      
      I don't see any reason to ignore the advice in "Implementing CIFS" which
      has a comprehensive treatment of virtual circuits. In there, it states
      "...and contrary to the specs the client should always use a VcNumber of
      one, never zero."
      
      Have the client just use a hardcoded vcnum of 1, and stop abusing the
      special behavior of vcnum 0.
      Reported-by: NSauron99@gmx.de <sauron99@gmx.de>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NVolker Lendecke <vl@samba.org>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      9ae6cf60
  13. 09 9月, 2013 1 次提交
  14. 29 6月, 2013 1 次提交
  15. 28 6月, 2013 1 次提交
  16. 24 6月, 2013 8 次提交
  17. 05 5月, 2013 3 次提交
    • J
      cifs: store the real expected sequence number in the mid · 0124cc45
      Jeff Layton 提交于
      Currently, the signing routines take a pointer to a place to store the
      expected sequence number for the mid response. It then stores a value
      that's one below what that sequence number should be, and then adds one
      to it when verifying the signature on the response.
      
      Increment the sequence number before storing the value in the mid, and
      eliminate the "+1" when checking the signature.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      0124cc45
    • J
      [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg · f96637be
      Joe Perches 提交于
      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: NJoe Perches <joe@perches.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      f96637be
    • S
      fs: cifs: use kmemdup instead of kmalloc + memcpy · f7f7c185
      Silviu-Mihai Popescu 提交于
      This replaces calls to kmalloc followed by memcpy with a single call to
      kmemdup. This was found via make coccicheck.
      Signed-off-by: NSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      f7f7c185
  18. 07 3月, 2013 1 次提交
  19. 28 2月, 2013 1 次提交
  20. 13 2月, 2013 1 次提交
  21. 29 9月, 2012 1 次提交
  22. 25 9月, 2012 4 次提交