From 167feb2c914f40abd7618eff5dd0c9cd80a063b6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 7 Oct 2008 21:24:25 +0200 Subject: Fix bug 5691: SIGBUS on Solaris --- source3/smbd/session.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3') 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", -- cgit