summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/msg_idmap.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/smbd/msg_idmap.c b/source3/smbd/msg_idmap.c
index dbd151d1cd..e4a5652a9e 100644
--- a/source3/smbd/msg_idmap.c
+++ b/source3/smbd/msg_idmap.c
@@ -112,10 +112,18 @@ static void id_cache_kill(struct messaging_context *msg_ctx,
{
const char *msg = (data && data->data)
? (const char *)data->data : "<NULL>";
- struct user_struct *validated_users =
- smbd_server_conn->smb1.sessions.validated_users;
+ struct smbd_server_connection *sconn;
+ struct user_struct *validated_users;
struct id_cache_ref id;
+ sconn = msg_ctx_to_sconn(msg_ctx);
+ if (sconn == NULL) {
+ DEBUG(1, ("could not find sconn\n"));
+ return;
+ }
+
+ validated_users = sconn->smb1.sessions.validated_users;
+
if (!id_cache_ref_parse(msg, &id)) {
DEBUG(0, ("Invalid ?ID: %s\n", msg));
return;