smb2_server: make sure we detect stale smbXsrv_connection pointers in smbXsrv_channel...
[gd/samba-autobuild/.git] / source3 / smbd / globals.h
index 79086b3c81c9470903442df598e36b45c2f7bf62..77911f051dfa0656099246fd81925258f97c1d4f 100644 (file)
@@ -231,7 +231,7 @@ bool smbd_is_smb2_header(const uint8_t *inbuf, size_t size);
 bool smbd_smb2_is_compound(const struct smbd_smb2_request *req);
 
 NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd,
-                            struct smbXsrv_connection **_xconn);
+                            NTTIME now, struct smbXsrv_connection **_xconn);
 
 NTSTATUS reply_smb2002(struct smb_request *req, uint16_t choice);
 NTSTATUS reply_smb20ff(struct smb_request *req, uint16_t choice);
@@ -347,6 +347,8 @@ struct smbXsrv_connection {
 
        struct smbXsrv_client *client;
 
+       NTTIME connect_time;
+       uint64_t channel_id;
        const struct tsocket_address *local_address;
        const struct tsocket_address *remote_address;
        const char *remote_hostname;
@@ -547,6 +549,7 @@ NTSTATUS smbXsrv_session_create(struct smbXsrv_connection *conn,
                                struct smbXsrv_session **_session);
 NTSTATUS smbXsrv_session_add_channel(struct smbXsrv_session *session,
                                     struct smbXsrv_connection *conn,
+                                    NTTIME now,
                                     struct smbXsrv_channel_global0 **_c);
 NTSTATUS smbXsrv_session_update(struct smbXsrv_session *session);
 struct smbXsrv_channel_global0;