1. 17 5月, 2012 4 次提交
  2. 04 5月, 2012 1 次提交
  3. 01 4月, 2012 1 次提交
    • J
      cifs: silence compiler warnings showing up with gcc-4.7.0 · b2a3ad9c
      Jeff Layton 提交于
      gcc-4.7.0 has started throwing these warnings when building cifs.ko.
      
        CC [M]  fs/cifs/cifssmb.o
      fs/cifs/cifssmb.c: In function ‘CIFSSMBSetCIFSACL’:
      fs/cifs/cifssmb.c:3905:9: warning: array subscript is above array bounds [-Warray-bounds]
      fs/cifs/cifssmb.c: In function ‘CIFSSMBSetFileInfo’:
      fs/cifs/cifssmb.c:5711:8: warning: array subscript is above array bounds [-Warray-bounds]
      fs/cifs/cifssmb.c: In function ‘CIFSSMBUnixSetFileInfo’:
      fs/cifs/cifssmb.c:6001:25: warning: array subscript is above array bounds [-Warray-bounds]
      
      This patch cleans up the code a bit by using the offsetof macro instead
      of the funky "&pSMB->hdr.Protocol" construct.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      b2a3ad9c
  4. 24 3月, 2012 9 次提交
  5. 22 3月, 2012 2 次提交
  6. 20 3月, 2012 1 次提交
  7. 19 1月, 2012 1 次提交
  8. 25 10月, 2011 2 次提交
  9. 21 10月, 2011 1 次提交
  10. 20 10月, 2011 2 次提交
    • J
      cifs: add cifs_async_readv · e28bc5b1
      Jeff Layton 提交于
      ...which will allow cifs to do an asynchronous read call to the server.
      The caller will allocate and set up cifs_readdata for each READ_AND_X
      call that should be issued on the wire. The pages passed in are added
      to the pagecache, but not placed on the LRU list yet (as we need the
      page->lru to keep the pages on the list in the readdata).
      
      When cifsd identifies the mid, it will see that there is a special
      receive handler for the call, and use that to receive the rest of the
      frame. cifs_readv_receive will then marshal up a kvec array with
      kmapped pages from the pagecache, which eliminates one copy of the
      data. Once the data is received, the pages are added to the LRU list,
      set uptodate, and unlocked.
      Reviewed-and-Tested-by: NPavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      e28bc5b1
    • J
      cifs: add a callback function to receive the rest of the frame · 44d22d84
      Jeff Layton 提交于
      In order to handle larger SMBs for readpages and other calls, we want
      to be able to read into a preallocated set of buffers. Rather than
      changing all of the existing code to preallocate buffers however, we
      instead add a receive callback function to the MID.
      
      cifsd will call this function once the mid_q_entry has been identified
      in order to receive the rest of the SMB. If the mid can't be identified
      or the receive pointer is unset, then the standard 3rd phase receive
      function will be called.
      Reviewed-and-Tested-by: NPavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      44d22d84
  11. 17 10月, 2011 1 次提交
    • S
      cifs: Call id to SID mapping functions to change owner/group (try #4 repost) · a5ff3769
      Shirish Pargaonkar 提交于
      Now build security descriptor to change either owner or group at the
      server.  Initially security descriptor was built to change only
      (D)ACL, that functionality has been extended.
      
      When either an Owner or a Group of a file object at the server is changed,
      rest of security descriptor remains same (DACL etc.).
      
      To set security descriptor, it is necessary to open that file
      with permission bits of either WRITE_DAC if DACL is being modified or
      WRITE_OWNER (Take Ownership) if Owner or Group is being changed.
      
      It is the server that decides whether a set security descriptor with
      either owner or group change succeeds or not.
      Signed-off-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      a5ff3769
  12. 14 10月, 2011 1 次提交
  13. 13 10月, 2011 2 次提交
  14. 20 9月, 2011 1 次提交
    • J
      cifs: fix possible memory corruption in CIFSFindNext · 9438fabb
      Jeff Layton 提交于
      The name_len variable in CIFSFindNext is a signed int that gets set to
      the resume_name_len in the cifs_search_info. The resume_name_len however
      is unsigned and for some infolevels is populated directly from a 32 bit
      value sent by the server.
      
      If the server sends a very large value for this, then that value could
      look negative when converted to a signed int. That would make that
      value pass the PATH_MAX check later in CIFSFindNext. The name_len would
      then be used as a length value for a memcpy. It would then be treated
      as unsigned again, and the memcpy scribbles over a ton of memory.
      
      Fix this by making the name_len an unsigned value in CIFSFindNext.
      
      Cc: <stable@kernel.org>
      Reported-by: NDarren Lavender <dcl@hppine99.gbr.hp.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      9438fabb
  15. 01 8月, 2011 3 次提交
  16. 27 5月, 2011 4 次提交
  17. 26 5月, 2011 1 次提交
  18. 23 5月, 2011 2 次提交
  19. 19 5月, 2011 1 次提交
    • J
      cifs: keep BCC in little-endian format · 820a803f
      Jeff Layton 提交于
      This is the same patch as originally posted, just with some merge
      conflicts fixed up...
      
      Currently, the ByteCount is usually converted to host-endian on receive.
      This is confusing however, as we need to keep two sets of routines for
      accessing it, and keep track of when to use each routine. Munging
      received packets like this also limits when the signature can be
      calulated.
      
      Simplify the code by keeping the received ByteCount in little-endian
      format. This allows us to eliminate a set of routines for accessing it
      and we can now drop the *_le suffixes from the accessor functions since
      that's now implied.
      
      While we're at it, switch all of the places that read the ByteCount
      directly to use the get_bcc inline which should also clean up some
      unaligned accesses.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      820a803f