s3:smbd: don't call claim/yield_connection() in make_connection_snum/close_cnum()
[kai/samba.git] / source3 / smbd / service.c
index 016b93f100a12b3cf320cdec020d3f0059d0d63b..bb28fbfcc8ecd660e87fc64648e18fd46ec12a2d 100644 (file)
@@ -559,7 +559,6 @@ static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn,
        fstring dev;
        int ret;
        bool on_err_call_dis_hook = false;
-       bool claimed_connection = false;
        uid_t effuid;
        gid_t effgid;
        NTSTATUS status;
@@ -699,16 +698,6 @@ static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn,
                goto err_root_exit;
        }
 
-       /*
-        * Get us an entry in the connections db
-        */
-       if (!claim_connection(conn, lp_servicename(talloc_tos(), snum))) {
-               DEBUG(1, ("Could not store connections entry\n"));
-               status = NT_STATUS_INTERNAL_DB_ERROR;
-               goto err_root_exit;
-       }
-       claimed_connection = true;
-
        /* Invoke VFS make connection hook - this must be the first
           filesystem operation that we do. */
 
@@ -925,9 +914,6 @@ static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn,
                /* Call VFS disconnect hook */
                SMB_VFS_DISCONNECT(conn);
        }
-       if (claimed_connection) {
-               yield_connection(conn, lp_servicename(talloc_tos(), snum));
-       }
        return status;
 }
 
@@ -1180,8 +1166,6 @@ void close_cnum(connection_struct *conn, uint64_t vuid)
        /* Call VFS disconnect hook */    
        SMB_VFS_DISCONNECT(conn);
 
-       yield_connection(conn, lp_servicename(talloc_tos(), SNUM(conn)));
-
        /* make sure we leave the directory available for unmount */
        vfs_ChDir(conn, "/");