1. 28 10月, 2013 2 次提交
    • S
      Allow setting per-file compression via SMB2/3 · 64a5cfa6
      Steve French 提交于
      Allow cifs/smb2/smb3 to return whether or not a file is compressed
      via lsattr, and allow SMB2/SMB3 to set the per-file compression
      flag ("chattr +c filename" on an smb3 mount).
      
      Windows users often set the compressed flag (it can be
      done from the desktop and file manager).  David Disseldorp
      has patches to Samba server to support this (at least on btrfs)
      which are complementary to this
      Signed-off-by: NSteve French <smfrench@gmail.com>
      64a5cfa6
    • S
      Fix corrupt SMB2 ioctl requests · 7ff8d45c
      Steve French 提交于
      We were off by one calculating the length of ioctls in some cases
      because the protocol specification for SMB2 ioctl includes a mininum
      one byte payload but not all SMB2 ioctl requests actually have
      a data buffer to send. We were also not zeroing out the
      return buffer (in case of error this is helpful).
      Signed-off-by: NSteve French <smfrench@gmail.com>
      7ff8d45c
  2. 07 10月, 2013 1 次提交
  3. 10 9月, 2013 4 次提交
  4. 09 9月, 2013 5 次提交
  5. 11 7月, 2013 8 次提交
  6. 27 6月, 2013 6 次提交
    • S
      [CIFS] Do not set DFS flag on SMB2 open · f87ab88b
      Steve French 提交于
      If we would set SMB2_FLAGS_DFS_OPERATIONS on open we also would have
      to pass the path on the Open SMB prefixed by \\server\share.
      Not sure when we would need to do the augmented path (if ever) and
      setting this flag breaks the SMB2 open operation since it is
      illegal to send an empty path name (without \\server\share prefix)
      when the DFS flag is set in the SMB open header. We could
      consider setting the flag on all operations other than open
      but it is safer to net set it for now.
      Signed-off-by: NSteve French <smfrench@gmail.com>
      f87ab88b
    • S
      [CIFS] fix static checker warning · 84ceeb96
      Steve French 提交于
      Dan Carpenter wrote:
      
      The patch 7f420cee8bd6: "[CIFS] Charge at least one credit, if server
      says that it supports multicredit" from Jun 23, 2013, leads to the
      following Smatch complaint:
      
      fs/cifs/smb2pdu.c:120 smb2_hdr_assemble()
               warn: variable dereferenced before check 'tcon->ses' (see line 115)
      
      CC: Dan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      84ceeb96
    • S
      When server doesn't provide SecurityBuffer on SMB2Negotiate pick default · 5d875cc9
      Steve French 提交于
      According to MS-SMB2 section 2.2.4: if no blob, client picks default which
      for us will be
      	ses->sectype = RawNTLMSSP;
      but for time being this is also our only auth choice so doesn't matter
      as long as we include this fix (which does not treat the empty
      SecurityBuffer as an error as the code had been doing).
      We just found a server which sets blob length to zero expecting raw so
      this fixes negotiation with that server.
      Signed-off-by: NSteve French <smfrench@gmail.com>
      5d875cc9
    • S
      SMB2 FSCTL and IOCTL worker function · 4a72dafa
      Steve French 提交于
      This worker function is needed to send SMB2 fsctl
      (and ioctl) requests including:
      
      validating negotiation info (secure negotiate)
      querying the servers network interfaces
      copy offload (refcopy)
      
      Followon patches for the above three will use this.
      This patch also does general validation of the response.
      
      In the future, as David Disseldorp notes, for the copychunk ioctl
      case, we will want to enhance the response processing to allow
      returning the chunk request limits to the caller (even
      though the server returns an error, in that case we would
      return data that the caller could use - see 2.2.32.1).
      
      See MS-SMB2 Section 2.2.31 for more details on format of fsctl.
      Acked-by: NPavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      4a72dafa
    • S
      Charge at least one credit, if server says that it supports multicredit · 2b80d049
      Steve French 提交于
      In SMB2.1 and later the server will usually set the large MTU flag, and
      we need to charge at least one credit, if server says that since
      it supports multicredit.  Windows seems to let us get away with putting
      a zero there, but they confirmed that it is wrong and the spec says
      to put one there (if the request is under 64K and the CAP_LARGE_MTU
      was returned during protocol negotiation by the server.
      
      CC: Pavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      2b80d049
    • Z
      cifs: using strlcpy instead of strncpy · 46b51d08
      Zhao Hongjiang 提交于
      for NUL terminated string, need alway set '\0' in the end.
      Signed-off-by: NZhao Hongjiang <zhaohongjiang@huawei.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      46b51d08
  7. 24 6月, 2013 8 次提交
  8. 05 5月, 2013 2 次提交
    • 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
    • D
      d455b72b
  9. 10 12月, 2012 1 次提交
  10. 06 12月, 2012 1 次提交
    • S
      SMB3 mounts fail with access denied to some servers · 52c0f4ad
      Steve French 提交于
      We were checking incorrectly if signatures were required to be sent,
      so were always sending signatures after the initial session establishment.
      For SMB3 mounts (vers=3.0) this was a problem because we were putting
      SMB2 signatures in SMB3 requests which would cause access denied
      on mount (the tree connection would fail).
      
      This might also be worth considering for stable (for 3.7), as the
      error message on mount (access denied) is confusing to users and
      there is no workaround if the server is configured to only
      support smb3.0. I am ok either way.
      
      CC: stable <stable@kernel.org>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      52c0f4ad
  11. 02 10月, 2012 1 次提交
  12. 27 9月, 2012 1 次提交