s3:smbd:open_file: use a more natural check.
authorMichael Adam <obnox@samba.org>
Wed, 10 Sep 2014 19:58:04 +0000 (21:58 +0200)
committerKarolin Seeger <kseeger@samba.org>
Sat, 27 Sep 2014 18:58:13 +0000 (20:58 +0200)
As suggested by Jeremy Allison <jra@samba.org>.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 9da09b52e8cc0453e694d85fc2bd82994138e20b)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10809

source3/smbd/open.c

index cc6e08050d73698e63a4000d7b22df8d905087b8..a2733dcd2b4bbd2c383d78d0bb29444d2d3f02d3 100644 (file)
@@ -834,7 +834,9 @@ static NTSTATUS open_file(files_struct *fsp,
                                        return status;
                                }
 
-                               if (!NT_STATUS_IS_OK(status)) {
+                               if (NT_STATUS_EQUAL(status,
+                                       NT_STATUS_OBJECT_NAME_NOT_FOUND))
+                               {
                                        DEBUG(10, ("open_file: "
                                                "file %s vanished since we "
                                                "checked for existence.\n",