[OpenAFS-devel] Fix for WinNT Info structure 0x102

Murawski, Rob rsm4@cssd.pitt.edu
Thu, 10 Jul 2003 17:14:30 -0400


We (the University of Pittsburgh) have been using the IBM AFS client on
Windows 2000 with IIS for serving user web pages.  In looking to switch
to the OpenAFS client, we noticed that it could not properly
differentiate between files and directories, which meant it couldn't
tell whether to add an "index.html" to a path or to display an HTML
file.  When we first had this issue, we had IBM fix it, but somehow the
fix never made it to the OpenAFS client.  (Nor were we told what the
"fix" was, other than it did not report a directory as a directory)
After pounding away at sniffer traces and debug info, I finally have a
patch to get OpenAFS to work with IIS.  Basically, the File Info 0x102
structure had the IS_A_DIRECTORY flag in the wrong area.  I made the
following DIFF from the latest build source (10 July 2003) and I would
like to see this change incorporated into the current version: (It
basically just switches two lines)  When I tested this change in 1.2.9a,
IIS successfully could differentiate between files and directories.


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
--- smb3.c.new  2003-07-10 16:56:25.000000000 -0400
+++ smb3.c.upd  2003-07-10 16:58:00.000000000 -0400
@@ -1345,9 +1345,9 @@
                *((LARGE_INTEGER *)op) =3D scp->length; op +=3D 8;  /* =
EOF
*/
                *((u_long *)op) =3D scp->linkCount; op +=3D 4;
                *op++ =3D ((fidp->flags & SMB_FID_DELONCLOSE) ? 1 : 0);
-               *op++ =3D 0;
                *op++ =3D (scp->fileType =3D=3D CM_SCACHETYPE_DIRECTORY =
? 1 :
0);
                *op++ =3D 0;
+               *op++ =3D 0;
        }
        else if (infoLevel =3D=3D 0x103) {
                *((u_long *)op) =3D 0; op +=3D 4;
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D


Any comments or suggestions?


Rob Murawski=20
University of Pittsburgh=20
717 Cathedral of Learning=20
Pittsburgh, PA  15260