1. 26 Jan, 2018 1 commit
    • Aurelien Aptel's avatar
      CIFS: make IPC a regular tcon · b327a717
      Aurelien Aptel authored
      * Remove ses->ipc_tid.
      * Make IPC$ regular tcon.
      * Add a direct pointer to it in ses->tcon_ipc.
      * Distinguish PIPE tcon from IPC tcon by adding a tcon->pipe flag. All
        IPC tcons are pipes but not all pipes are IPC.
      * All TreeConnect functions now cannot take a NULL tcon object.
      
      The IPC tcon has the same lifetime as the session it belongs to. It is
      created when the session is created and destroyed when the session is
      destroyed.
      
      Since no mounts directly refer to the IPC tcon, its refcount should
      always be set to initialisation value (1). Thus we make sure
      cifs_put_tcon() skips it.
      
      If the mount request resulting in a new session being created requires
      encryption, try to require it too for IPC.
      
      * set SERVER_NAME_LENGTH to serverName actual size
      
      The maximum length of an ipv6 string representation is defined in
      INET6_ADDRSTRLEN as 45+1 for null but lets keep what we know works.
      Signed-off-by: default avatarAurelien Aptel <aaptel@suse.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
      b327a717
  2. 25 Jan, 2018 39 commits