summaryrefslogtreecommitdiff
path: root/source3/smbd/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/session.c')
-rw-r--r--source3/smbd/session.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index 3b431a19be..8163eb30af 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -113,7 +113,10 @@ bool session_claim(user_struct *vuser)
break;
}
- sess_pid = ((struct sessionid *)rec->value.dptr)->pid;
+ memcpy(&sess_pid,
+ ((char *)rec->value.dptr)
+ + offsetof(struct sessionid, pid),
+ sizeof(sess_pid));
if (!process_exists(sess_pid)) {
DEBUG(5, ("%s has died -- re-using session\n",