jra at dp.samba.org jra at dp.samba.org
Thu Sep 5 00:17:00 GMT 2002

On Wed, Sep 04, 2002 at 04:38:36PM -0500, Steven French wrote:
> Looks like there was a Samba regression just prior to 2.2.5 which causes
> OS/2 clients to fail in very strange ways since EA buffers (EAOP2 structs
> i.e. level 2 SetFileInfo buffers) are now treated as FILESTATUS3 buffers
> (see below).
> http://cvs.samba.org/cgi-bin/cvsweb/samba/source/smbd/trans2.c.diff?r1=
> The problem shows up in red labeled "line 2369" in the cvs web colored diff
> and presumably is causes by removing the "EAS_NOT_SUPPORTED" return and the
> subsequent fallthrough of level 2 calls to the level 1 path.   Unlike in
> the query_path_info and query_file_info path case in which level 2 and
> level 1 structs are similar (that is FILESTATUS4 and FILESTATUS3
> structures) in the setfileinfo/setpathinfo case they are not related (level
> 1 has date/time/attributes fields etc. and level 2 has EA structures).
> This as you might expect causes strange problems like OS/2 clients creating
> files with random (sometimes very large) sizes from the system editor
> (e.exe).   I tested a simple fix, ignoring the level 2
> setfileinfo/setpathinfo (throwing away the EAs, but returning no error)
> which works ok.   The default branch of the case would return the wrong
> error code (invalid level) but it could also be changed to return
> EAS_NOT_SUPPORTED explicitly on level 2 which would be safe as well.
> Anyone know why the EAS_NOT_SUPPORTED check was pulled out at around line
> 2400 of smbd/trans2.c?

Yes, that test was catching a different info level, it was preventing
a set file size info level as I recall as the test was incorrect and
was catching other things than EA's/

We need to re-addd it, but only for info levels for which EA's may be sent.
Do you know the condition we can use to test for EA's ?


More information about the samba-technical mailing list