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

index d4b32ce7ecd8d56014d2959e8092452aa7760873..af2a21fdf28d24876c2cdbad7a11b48eafb2782d 100644 (file)
@@ -7596,6 +7596,9 @@ static NTSTATUS smb_posix_unlink(connection_struct *conn,
                        if (e->flags & SHARE_MODE_FLAG_POSIX_OPEN) {
                                continue;
                        }
+                       if (share_mode_stale_pid(lck->data, i)) {
+                               continue;
+                       }
                        /* Fail with sharing violation. */
                        close_file(req, fsp, NORMAL_CLOSE);
                        TALLOC_FREE(lck);