r3240: - update the rules for what error codes should be given on the
[jelmer/samba4-debian.git] / source / ntvfs / posix / pvfs_search.c
index ff9ad20b4310c04c2ee9db7d125745bfe977eb67..61e4651c5f56b457864b12e22a5e01cc97c42668 100644 (file)
@@ -54,8 +54,9 @@ static NTSTATUS fill_search_info(struct pvfs_state *pvfs,
                return status;
        }
 
-       if (!pvfs_match_attrib(pvfs, name, search->search_attrib, search->must_attrib)) {
-               return NT_STATUS_OBJECT_NAME_NOT_FOUND;
+       status = pvfs_match_attrib(pvfs, name, search->search_attrib, search->must_attrib);
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
        }
 
        switch (level) {