s3:smbXsrv_open: add function smbXsrv_open_cleanup()
[bbaumbach/samba-autobuild/.git] / source3 / smbd / globals.h
index 566f04d71f3fe754c72110807ef7e8f552bcf464..150275894b62d13719b7363f92f58867ce2cdf8d 100644 (file)
@@ -155,6 +155,7 @@ NTSTATUS smbd_do_qfsinfo(connection_struct *conn,
                         uint16_t info_level,
                         uint16_t flags2,
                         unsigned int max_data_bytes,
+                        struct smb_filename *smb_fname,
                         char **ppdata,
                         int *ret_data_len);
 
@@ -202,6 +203,7 @@ bool smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
 
 NTSTATUS smbd_calculate_access_mask(connection_struct *conn,
                                    const struct smb_filename *smb_fname,
+                                   bool use_privs,
                                    uint32_t access_mask,
                                    uint32_t *access_mask_out);
 
@@ -395,6 +397,10 @@ NTSTATUS smb2srv_session_table_init(struct smbXsrv_connection *conn);
 NTSTATUS smb2srv_session_lookup(struct smbXsrv_connection *conn,
                                uint64_t session_id, NTTIME now,
                                struct smbXsrv_session **session);
+struct smbXsrv_session_global0;
+NTSTATUS smbXsrv_session_global_traverse(
+                       int (*fn)(struct smbXsrv_session_global0 *, void *),
+                       void *private_data);
 struct tevent_req *smb2srv_session_close_previous_send(TALLOC_CTX *mem_ctx,
                                        struct tevent_context *ev,
                                        struct smbXsrv_connection *conn,
@@ -422,6 +428,10 @@ NTSTATUS smb2srv_tcon_lookup(struct smbXsrv_session *session,
                             uint32_t tree_id, NTTIME now,
                             struct smbXsrv_tcon **tcon);
 NTSTATUS smb2srv_tcon_disconnect_all(struct smbXsrv_session *session);
+struct smbXsrv_tcon_global0;
+NTSTATUS smbXsrv_tcon_global_traverse(
+                       int (*fn)(struct smbXsrv_tcon_global0 *, void *),
+                       void *private_data);
 
 NTSTATUS smbXsrv_open_global_init(void);
 NTSTATUS smbXsrv_open_create(struct smbXsrv_connection *conn,
@@ -447,6 +457,13 @@ NTSTATUS smb2srv_open_recreate(struct smbXsrv_connection *conn,
                               struct GUID create_guid,
                               NTTIME now,
                               struct smbXsrv_open **_open);
+struct smbXsrv_open_global0;
+NTSTATUS smbXsrv_open_global_traverse(
+       int (*fn)(struct smbXsrv_open_global0 *, void *),
+       void *private_data);
+
+NTSTATUS smbXsrv_open_cleanup(uint64_t persistent_id);
+
 
 struct smbd_smb2_request {
        struct smbd_smb2_request *prev, *next;
@@ -465,7 +482,6 @@ struct smbd_smb2_request {
        bool do_signing;
        bool do_encryption;
        struct tevent_timer *async_te;
-       bool cancelled;
        bool compound_related;
 
        /*
@@ -485,8 +501,6 @@ struct smbd_smb2_request {
        struct smb_request *smb1req;
        struct files_struct *compat_chain_fsp;
 
-       NTSTATUS next_status;
-
        /*
         * The sub request for async backend calls.
         * This is used for SMB2 Cancel.
@@ -648,7 +662,7 @@ struct smbd_server_connection {
        } oplocks;
 
        struct {
-               struct fd_event *fde;
+               struct tevent_fd *fde;
 
                struct {
                        /*
@@ -665,7 +679,7 @@ struct smbd_server_connection {
                        /*
                         * fde for the trusted_fd
                         */
-                       struct fd_event *trusted_fde;
+                       struct tevent_fd *trusted_fde;
 
                        /*
                         * Reference count for the fcntl lock to
@@ -714,7 +728,7 @@ struct smbd_server_connection {
                        struct blocking_lock_record *blocking_lock_cancelled_queue;
 
                        /* The event that makes us process our blocking lock queue */
-                       struct timed_event *brl_timeout;
+                       struct tevent_timer *brl_timeout;
 
                        bool blocking_lock_unlock_state;
                        bool blocking_lock_cancel_state;
@@ -727,7 +741,7 @@ struct smbd_server_connection {
                bool negprot_2ff;
                struct {
                        /* The event that makes us process our blocking lock queue */
-                       struct timed_event *brl_timeout;
+                       struct tevent_timer *brl_timeout;
                        bool blocking_lock_unlock_state;
                } locks;
                struct smbd_smb2_request *requests;