s3: Check for serverid_exists in open_mode_check
authorVolker Lendecke <vl@samba.org>
Mon, 7 May 2012 13:23:10 +0000 (15:23 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 25 May 2012 16:19:37 +0000 (09:19 -0700)
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/open.c

index 543a6619e9dec881e3f028cfb233cd4dc1971406..8a5273ef14e9f2b6c5c575c0fbaf8e9beb1af894 100644 (file)
@@ -1024,6 +1024,11 @@ static NTSTATUS open_mode_check(connection_struct *conn,
                 * too */
                if (share_conflict(&lck->data->share_modes[i],
                                   access_mask, share_access)) {
+
+                       if (share_mode_stale_pid(lck->data, i)) {
+                               continue;
+                       }
+
                        return NT_STATUS_SHARING_VIOLATION;
                }
        }