Steven French sfrench at us.ibm.com
Wed Sep 4 21:40:01 GMT 2002

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).
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?

Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at us.ibm.com

More information about the samba-technical mailing list