1. 24 Jun, 2011 3 commits
  2. 20 Jun, 2011 1 commit
  3. 14 Jun, 2011 2 commits
  4. 13 Jun, 2011 4 commits
    • Jeff Layton's avatar
      cifs: correctly handle NULL tcon pointer in CIFSTCon · 8d1bca32
      Jeff Layton authored
      Long ago (in commit 00e485b0), I added some code to handle share-level
      passwords in CIFSTCon. That code ignored the fact that it's legit to
      pass in a NULL tcon pointer when connecting to the IPC$ share on the
      server.
      
      This wasn't really a problem until recently as we only called CIFSTCon
      this way when the server returned -EREMOTE. With the introduction of
      commit c1508ca2
      
       however, it gets called this way on every mount, causing
      an oops when share-level security is in effect.
      
      Fix this by simply treating a NULL tcon pointer as if user-level
      security were in effect. I'm not aware of any servers that protect the
      IPC$ share with a specific password anyway. Also, add a comment to the
      top of CIFSTCon to ensure that we don't make the same mistake again.
      
      Cc: <stable@kernel.org>
      Reported-by: default avatarMartijn Uffing <mp3project@sarijopen.student.utwente.nl>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      8d1bca32
    • Jeff Layton's avatar
      cifs: show sec= option in /proc/mounts · 3e715513
      Jeff Layton authored
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      3e715513
    • Jeff Layton's avatar
      cifs: don't allow cifs_reconnect to exit with NULL socket pointer · 7fdbaa1b
      Jeff Layton authored
      It's possible for the following set of events to happen:
      
      cifsd calls cifs_reconnect which reconnects the socket. A userspace
      process then calls cifs_negotiate_protocol to handle the NEGOTIATE and
      gets a reply. But, while processing the reply, cifsd calls
      cifs_reconnect again.  Eventually the GlobalMid_Lock is dropped and the
      reply from the earlier NEGOTIATE completes and the tcpStatus is set to
      CifsGood. cifs_reconnect then goes through and closes the socket and sets the
      pointer to zero, but because the status is now CifsGood, the new socket
      is not created and cifs_reconnect exits with the socket pointer set to
      NULL.
      
      Fix this by only setting the tcpStatus to CifsGood if the tcpStatus is
      CifsNeedNegotiate, and by making sure that generic_ip_connect is always
      called at least once in cifs_reconnect.
      
      Note that this is not a perfect fix for this issue. It's still possible
      that the NEGOTIATE reply is handled after the socket has been closed and
      reconnected. In that case, the socket state will look correct but it no
      NEGOTIATE was performed on it be for the wrong socket. In that situation
      though the server should just shut down the socket on the next attempted
      send, rather than causing the oops that occurs today.
      
      Cc: <stable@kernel.org> # .38.x: fd88ce93
      
      : [CIFS] cifs: clarify the meaning of tcpStatus == CifsGood
      Reported-and-Tested-by: default avatarBen Greear <greearb@candelatech.com>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      7fdbaa1b
    • Pavel Shilovsky's avatar
      CIFS: Fix sparse error · cd51875d
      Pavel Shilovsky authored
      
      cifs_sb_master_tlink was declared as inline, but without a definition.
      Remove the declaration and move the definition up.
      Signed-off-by: default avatarPavel Shilovsky <piastryyy@gmail.com>
      Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      cd51875d
  5. 08 Jun, 2011 1 commit
  6. 07 Jun, 2011 1 commit
    • Jeff Layton's avatar
      cifs: silence printk when establishing first session on socket · 9c4843ea
      Jeff Layton authored
      
      When signing is enabled, the first session that's established on a
      socket will cause a printk like this to pop:
      
          CIFS VFS: Unexpected SMB signature
      
      This is because the key exchange hasn't happened yet, so the signature
      field is bogus. Don't try to check the signature on the socket until the
      first session has been established. Also, eliminate the specific check
      for SMB_COM_NEGOTIATE since this check covers that case too.
      
      Cc: stable@kernel.org
      Cc: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      9c4843ea
  7. 06 Jun, 2011 2 commits
  8. 03 Jun, 2011 2 commits
  9. 29 May, 2011 1 commit
  10. 27 May, 2011 8 commits
  11. 26 May, 2011 5 commits
  12. 25 May, 2011 4 commits
  13. 24 May, 2011 2 commits
  14. 23 May, 2011 4 commits