]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix bug 5691: SIGBUS on Solaris
authorVolker Lendecke <vl@samba.org>
Tue, 7 Oct 2008 19:24:25 +0000 (21:24 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 13 Oct 2008 09:55:53 +0000 (11:55 +0200)
source/smbd/session.c

index 000b2f5d9c9fc28bdf61e76b8bee28469b1b3978..d4da3405bcff217fa8fee98385a2605a95383f1a 100644 (file)
@@ -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",