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

David Disseldorp ddiss at suse.de
Thu Mar 28 14:31:47 MDT 2013


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

> On Thu, Mar 28, 2013 at 12:17:06PM -0700, Jeremy Allison wrote:
> > On Thu, Mar 28, 2013 at 12:13:53PM -0700, Jeremy Allison wrote:
> > > > 
> > > > No, that's actually incorrect. smbtorture raw.eas actually
> > > > tests for asking for an EA that dosn't exist by name using
> > > > an SMB1 EA list query, and Windows returns an EA entry containing
> > > > the requested name, with a zero length. So the current code
> > > > in both smbd and ntvfs for that case is correct.
> > > > 
> > > > We could expand the test to ask for 2 EA's in a list, one
> > > > that exists and one that doesn't, but my guess is it does
> > > > return an entry for each EA name requested, with a zero
> > > > length showing that value doesn't exist (if you want to
> > > > add that test feel free :-).
> > > 
> > > Ah. Actually thinking about it that means your request
> > > to update eas->num_eas++ inside the strcasecmp_m test
> > > was an error, as we need to return a NULL value for a
> > > non existing EA.
> > 
> > In fact it means my original change here was
> > the correct one. Oops :-). I'll put it back :-).
> 
> Final changeset. David - speak now, or get your Reviewed-by tag
> added :-).

Sorry for the run-around Jeremy, but I still think the ealist iterator
needs to be changed...

--- a/source4/ntvfs/posix/pvfs_qfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_qfileinfo.c
@@ -102,7 +102,7 @@ NTSTATUS pvfs_query_ea_list(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
                for (j=0;j<ealist->num_eas;j++) {
                        if (strcasecmp_m(eas->eas[i].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;

I'm ready to push the other changes with my Reviewed-by tag.

Cheers, David


More information about the samba-technical mailing list