s3: Check for serverid_exists in smb_posix_unlink
[ddiss/samba.git] / 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);