s3:smbd: pass smb_request to make_connection()
authorStefan Metzmacher <metze@samba.org>
Mon, 15 Sep 2014 01:47:41 +0000 (03:47 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 19 Sep 2014 07:15:11 +0000 (09:15 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/smbd/proto.h
source3/smbd/reply.c
source3/smbd/service.c

index f35bc61a7d654f0c007415e54c2d690c791bbff6..e85e2f5f71ce43a2f3c27386b17f6731d7b116c2 100644 (file)
@@ -974,7 +974,7 @@ connection_struct *make_connection_smb2(struct smbd_server_connection *sconn,
                                        struct user_struct *vuser,
                                        const char *pdev,
                                        NTSTATUS *pstatus);
-connection_struct *make_connection(struct smbd_server_connection *sconn,
+connection_struct *make_connection(struct smb_request *req,
                                   NTTIME now,
                                   const char *service_in,
                                   const char *pdev, uint64_t vuid,
index 2f22a2fa2d77913cf843149d87d8dc289205a2e0..e90f9dcf6fae3b32a3e8bac0b8683348e61d75b2 100644 (file)
@@ -693,7 +693,6 @@ void reply_tcon(struct smb_request *req)
        const char *p2;
        TALLOC_CTX *ctx = talloc_tos();
        struct smbXsrv_connection *xconn = req->xconn;
-       struct smbd_server_connection *sconn = req->sconn;
        NTTIME now = timeval_to_nttime(&req->request_time);
 
        START_PROFILE(SMBtcon);
@@ -724,7 +723,7 @@ void reply_tcon(struct smb_request *req)
                service = service_buf;
        }
 
-       conn = make_connection(sconn, now, service, dev,
+       conn = make_connection(req, now, service, dev,
                               req->vuid,&nt_status);
        req->conn = conn;
 
@@ -771,7 +770,6 @@ void reply_tcon_and_X(struct smb_request *req)
        bool session_key_updated = false;
        uint16_t optional_support = 0;
        struct smbXsrv_connection *xconn = req->xconn;
-       struct smbd_server_connection *sconn = req->sconn;
 
        START_PROFILE(SMBtconX);
 
@@ -942,7 +940,7 @@ void reply_tcon_and_X(struct smb_request *req)
                session_key_updated = true;
        }
 
-       conn = make_connection(sconn, now, service, client_devicetype,
+       conn = make_connection(req, now, service, client_devicetype,
                               req->vuid, &nt_status);
        req->conn =conn;
 
index e7a55a483f6a15cc1f3bfb15eeb587f75ddfb968..6b9df854572dcdc7bafa293190e7df72d6347773 100644 (file)
@@ -991,12 +991,13 @@ connection_struct *make_connection_smb2(struct smbd_server_connection *sconn,
  * @param service 
 ****************************************************************************/
 
-connection_struct *make_connection(struct smbd_server_connection *sconn,
+connection_struct *make_connection(struct smb_request *req,
                                   NTTIME now,
                                   const char *service_in,
                                   const char *pdev, uint64_t vuid,
                                   NTSTATUS *status)
 {
+       struct smbd_server_connection *sconn = req->sconn;
        uid_t euid;
        struct user_struct *vuser = NULL;
        char *service = NULL;