s3:smbd: support xconn=NULL in init_smb_request()
authorMichael Adam <obnox@samba.org>
Thu, 18 Sep 2014 19:46:22 +0000 (21:46 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 19 Sep 2014 07:15:11 +0000 (09:15 +0200)
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/process.c

index 658dc312f230ce0168c4df906913ff40580492f2..6ba39064879ee763e6a8e7a6eb436885e411cd64 100644 (file)
@@ -617,11 +617,12 @@ static bool init_smb_request(struct smb_request *req,
        req->encrypted = encrypted;
        req->sconn = sconn;
        req->xconn = xconn;
-       status = smb1srv_tcon_lookup(xconn, req->tid, now, &tcon);
-       if (NT_STATUS_IS_OK(status)) {
-               req->conn = tcon->compat;
-       } else {
-               req->conn = NULL;
+       req->conn = NULL;
+       if (xconn != NULL) {
+               status = smb1srv_tcon_lookup(xconn, req->tid, now, &tcon);
+               if (NT_STATUS_IS_OK(status)) {
+                       req->conn = tcon->compat;
+               }
        }
        req->chain_fsp = NULL;
        req->smb2req = NULL;