From b5acd1963a43b91036351506a415081601fd1ba6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 6 Nov 2004 09:34:17 +0000 Subject: r3575: fixed attribute normalisation in xattr code. RAW-SEARCH now passes again. (This used to be commit 66bdc6e78c2c7ce4e215919959f0d0623ef06723) --- source4/ntvfs/posix/pvfs_util.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source4/ntvfs/posix/pvfs_util.c') diff --git a/source4/ntvfs/posix/pvfs_util.c b/source4/ntvfs/posix/pvfs_util.c index 50a78c2965..92d696970a 100644 --- a/source4/ntvfs/posix/pvfs_util.c +++ b/source4/ntvfs/posix/pvfs_util.c @@ -63,3 +63,19 @@ NTSTATUS pvfs_match_attrib(struct pvfs_state *pvfs, struct pvfs_filename *name, } return NT_STATUS_OK; } + + +/* + normalise a file attribute +*/ +uint32_t pvfs_attrib_normalise(uint32_t attrib) +{ + if (attrib == 0) { + attrib = FILE_ATTRIBUTE_NORMAL; + } + if (attrib != FILE_ATTRIBUTE_NORMAL) { + attrib &= ~FILE_ATTRIBUTE_NORMAL; + } + return attrib; +} + -- cgit