jra at samba.org
Mon Oct 29 03:27:19 GMT 2007
On Mon, Oct 29, 2007 at 01:21:07PM +1100, tridge at tridgell.net wrote:
> I think it would have to be a config option. I don't think it would be
> sane to have code which says "only 1 byte is 0 and its the last byte,
> so its probably not the s4 format" ? That doesn't sound very robust.
Well the format of the string is a limited number of characters,
starting with an explict 0x prefix so detecting it would be easy -
a bit more robust than just "last char = 0".
> Plus the name of the xattr is different in s3 and s4, so we don't need
> to guess based on the contents anyway.
Yeah - right ! Different case.....
S3 = user.DOSATTRIB
S4 = user.DosAttrib
thank god for UNIX case-sensitivity rules :-).
I got confused and thought xattrs were case insensitive
(as they are in Windows).
> Some filesystems may get these features over time, but that won't
> magically spread to all filesystems on all OSes in any quick
> manner. We'll still be dealing with filesystems without these features
> in 10 years time.
> I thought you'd done it actually - although looking at the history it
> goes back much further than I remembered. The main dosmode.c changes
> went into cvs in April 2004.
Nope, definately not mine :-). I might have added the
code, but it definately wasn't my idea. As I recall it
was originally a hack you did for a customer :-).
> right. Though efforts to support both formats in both branches would
> be worthwhile.
If we can easily detect the string, would it be worthwhile
to change the S4 format to be "0x<dos attr string>\0" followed by NDR
encoding of the other data S3 doesn't interpret right now ? There's
not a lot of S4 servers out there in production right now and that
would be a seamless change to the format, and allow the S3 code to
still make sense of the S4 dos part of the attrs (although it would
lose the data currently if it wrote anything back).
The S3 code ignores anything after the 0xstring anyway.
More information about the samba-technical