[PATCH] Fix bug #9130 - Certain xattrs cause Windows error 0x800700FF

David Disseldorp ddiss at suse.de
Thu Mar 28 12:42:01 MDT 2013


On Thu, 28 Mar 2013 10:55:05 -0700
Jeremy Allison <jra at samba.org> wrote:

> On Thu, Mar 28, 2013 at 10:42:55AM -0700, Jeremy Allison wrote:
> > 
> > New version that fixes these issues (and adds one code
> > clarification change Andreas mailed to me privately).
> > 
> > Please review and push if you're happy.
> 
> Scratch that - a request from David crossed in the email :-).
> 
> Here's a version with both David and Andreas's suggestions
> included.

Looks good Jeremy. One variation for ntvfs:

diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c b/source4/ntvfs/posix/pvfs_qfileinfo.c
index 4309f3b..f3bd791 100644
--- a/source4/ntvfs/posix/pvfs_qfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_qfileinfo.c
@@ -96,16 +96,17 @@ NTSTATUS pvfs_query_ea_list(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
        eas->num_eas = 0;
        for (i=0;i<num_names;i++) {
                int j;
-               eas->eas[i].flags = 0;
-               eas->eas[i].name.s = names[i].name.s;
-               eas->eas[i].value = data_blob(NULL, 0);
+               eas->eas[eas->num_eas].flags = 0;
+               eas->eas[eas->num_eas].name.s = names[i].name.s;
+               eas->eas[eas->num_eas].value = data_blob(NULL, 0);
                for (j=0;j<ealist->num_eas;j++) {
-                       if (strcasecmp_m(eas->eas[i].name.s, 
+                       if (strcasecmp_m(eas->eas[eas->num_eas].name.s,
                                       ealist->eas[j].name) == 0) {
-                               if (ealist->eas[i].value.length == 0) {
+                               if (ealist->eas[j].value.length == 0) {
                                        continue;
                                }
-                               eas->eas[i].value = ealist->eas[j].value;
+                               eas->eas[eas->num_eas].value
+                                               = ealist->eas[j].value;
                                eas->num_eas++;
                                break;
                        }

What do you think?

Cheers, David


More information about the samba-technical mailing list