diff options
| -rw-r--r-- | source3/smbd/globals.c | 2 | ||||
| -rw-r--r-- | source3/smbd/globals.h | 4 | ||||
| -rw-r--r-- | source3/smbd/notify.c | 9 | 
3 files changed, 8 insertions, 7 deletions
diff --git a/source3/smbd/globals.c b/source3/smbd/globals.c index 2e1b5c8593..15550ed455 100644 --- a/source3/smbd/globals.c +++ b/source3/smbd/globals.c @@ -134,8 +134,6 @@ int32_t level_II_oplocks_open = 0;  bool global_client_failed_oplock_break = false;  struct kernel_oplocks *koplocks = NULL; -struct notify_mid_map *notify_changes_by_mid = NULL; -  int am_parent = 1;  int server_fd = -1;  struct event_context *smbd_event_ctx = NULL; diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 5e9da66540..e1a95ced60 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -144,8 +144,6 @@ extern int32_t level_II_oplocks_open;  extern bool global_client_failed_oplock_break;  extern struct kernel_oplocks *koplocks; -extern struct notify_mid_map *notify_changes_by_mid; -  extern int am_parent;  extern int server_fd;  extern struct event_context *smbd_event_ctx; @@ -376,6 +374,8 @@ struct smbd_server_connection {  		struct smb_signing_state *signing_state;  		/* List to store partial SPNEGO auth fragments. */  		struct pending_auth_data *pd_list; + +		struct notify_mid_map *notify_mid_maps;  	} smb1;  	struct {  		struct tevent_context *event_ctx; diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index a242fc3ac0..94544271fe 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -238,6 +238,7 @@ NTSTATUS change_notify_add_request(struct smb_request *req,  {  	struct notify_change_request *request = NULL;  	struct notify_mid_map *map = NULL; +	struct smbd_server_connection *sconn = smbd_server_conn;  	DEBUG(10, ("change_notify_add_request: Adding request for %s: "  		   "max_param = %d\n", fsp->fsp_name, (int)max_param)); @@ -261,7 +262,7 @@ NTSTATUS change_notify_add_request(struct smb_request *req,  		      struct notify_change_request *);  	map->mid = request->req->mid; -	DLIST_ADD(notify_changes_by_mid, map); +	DLIST_ADD(sconn->smb1.notify_mid_maps, map);  	return NT_STATUS_OK;  } @@ -270,6 +271,7 @@ static void change_notify_remove_request(struct notify_change_request *remove_re  {  	files_struct *fsp;  	struct notify_change_request *req; +	struct smbd_server_connection *sconn = smbd_server_conn;  	/*  	 * Paranoia checks, the fsp referenced must must have the request in @@ -290,7 +292,7 @@ static void change_notify_remove_request(struct notify_change_request *remove_re  	}  	DLIST_REMOVE(fsp->notify->requests, req); -	DLIST_REMOVE(notify_changes_by_mid, req->mid_map); +	DLIST_REMOVE(sconn->smb1.notify_mid_maps, req->mid_map);  	TALLOC_FREE(req);  } @@ -301,8 +303,9 @@ static void change_notify_remove_request(struct notify_change_request *remove_re  void remove_pending_change_notify_requests_by_mid(uint16 mid)  {  	struct notify_mid_map *map; +	struct smbd_server_connection *sconn = smbd_server_conn; -	for (map = notify_changes_by_mid; map; map = map->next) { +	for (map = sconn->smb1.notify_mid_maps; map; map = map->next) {  		if (map->mid == mid) {  			break;  		}  | 
