svn commit: samba r3575 - in branches/SAMBA_4_0/source/ntvfs/posix: .

tridge at samba.org tridge at samba.org
Sat Nov 6 09:34:17 GMT 2004


Author: tridge
Date: 2004-11-06 09:34:17 +0000 (Sat, 06 Nov 2004)
New Revision: 3575

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3575

Log:
fixed attribute normalisation in xattr code. RAW-SEARCH now passes again.

Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_util.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_util.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_util.c	2004-11-06 09:12:53 UTC (rev 3574)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_util.c	2004-11-06 09:34:17 UTC (rev 3575)
@@ -63,3 +63,19 @@
 	}
 	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;
+}
+

Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c	2004-11-06 09:12:53 UTC (rev 3574)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c	2004-11-06 09:34:17 UTC (rev 3575)
@@ -184,7 +184,7 @@
 	switch (attrib.version) {
 	case 1:
 		info1 = &attrib.info.info1;
-		name->dos.attrib = info1->attrib;
+		name->dos.attrib = pvfs_attrib_normalise(info1->attrib);
 		name->dos.ea_size = info1->ea_size;
 		if (name->st.st_size == info1->size) {
 			name->dos.alloc_size = info1->alloc_size;
@@ -224,6 +224,8 @@
 	attrib.version = 1;
 	info1 = &attrib.info.info1;
 
+	name->dos.attrib = pvfs_attrib_normalise(name->dos.attrib);
+
 	info1->attrib      = name->dos.attrib;
 	info1->ea_size     = name->dos.ea_size;
 	info1->size        = name->st.st_size;



More information about the samba-cvs mailing list