[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-970-gd6270df
Jeremy Allison
jra at samba.org
Fri Aug 21 17:06:46 MDT 2009
On Thu, Aug 20, 2009 at 11:45:35AM +0200, Stefan (metze) Metzmacher wrote:
> I created some idl based code to parse old and new
> style blobs:
>
> http://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master4-xattr-01
>
> bin/ndrdump xattr xattr_parse_DOSATTRIB in dosattribFFFF.blob -d 1
> --dump-data --validate
> pull returned NT_STATUS_OK
> 3 bytes consumed
> [0000] 30 78 34 0x4
> xattr_parse_DOSATTRIB: struct xattr_parse_DOSATTRIB
> in: struct xattr_parse_DOSATTRIB
> x: struct xattr_DOSATTRIB
> attrib_hex : '0x4'
> version : 0xffff (65535)
> info : union xattr_DosInfo(case 65535)
> compatinfoFFFF: struct xattr_DosInfoFFFFCompat
> attrib : 0x00000004 (4)
> push returned NT_STATUS_OK
> 4 bytes generated (validate)
> [0000] 30 78 34 00 0x4.
> pull returned NT_STATUS_OK
> xattr_parse_DOSATTRIB: struct xattr_parse_DOSATTRIB
> in: struct xattr_parse_DOSATTRIB
> x: struct xattr_DOSATTRIB
> attrib_hex : '0x4'
> version : 0xffff (65535)
> info : union xattr_DosInfo(case 65535)
> compatinfoFFFF: struct xattr_DosInfoFFFFCompat
> attrib : 0x00000004 (4)
> WARNING! orig bytes:3 validated pushed bytes:4
> WARNING! orig pulled bytes:3 validated pulled bytes:4
> dump OK
>
> Here you see that we parse the hex string fine without termination,
> but would push it with termination (as we never push this compat
> info level 0xFFFF and only read it, I think it's fine:.
>
> And this would be the new format I'd propose that we use in s3 and s4
> (we can extent it to store more).
> The important thing is that the parser autogenerates the leading hex
> string from the attrib member and that we have the valid_flags mask
> to indicate with members are valid.
That's very clever ! I like it, thanks !
Ok, I'll work on adding this into the master branch (as I'll
have to fix the existing dos attribute read/write code to
make sure all the data is available for all qfile/pathinfo
ops) so I'll probably work on this at the CIFS conference
once I get back from the UK.
Jeremy.
More information about the samba-technical
mailing list