windows-no-more-files-workaround-20020725
authorRyan Lantzer <lantzer@umr.edu>
Fri, 26 Jul 2002 06:09:56 +0000 (06:09 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 26 Jul 2002 06:09:56 +0000 (06:09 +0000)
work around erroneous "no more files" error in winnt client

src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c

index e1c8c85..e32a57d 100644 (file)
@@ -9,6 +9,8 @@
 
 //#define NOSERVICE 1
 
+#define NOMOREFILESFIX 1
+
 #include <afs/param.h>
 #include <afs/stds.h>
 
@@ -2276,6 +2278,7 @@ long smb_ReceiveNegotiate(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
                 namep += entryLength;
                 tcounter++;            /* which proto entry we're looking at */
         }
+#ifndef NOMOREFILESFIX
        /* 
         * NOTE: We can determine what OS (NT4.0, W2K, W9X, etc)
         * the client is running by reading the protocol signature.
@@ -2310,6 +2313,8 @@ long smb_ReceiveNegotiate(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
                       */
               }
        }
+       // NOMOREFILESFIX
+#endif
 
         if (NTProtoIndex != -1) {
                protoIndex = NTProtoIndex;
index fad864d..ef4e7e2 100644 (file)
@@ -1148,7 +1148,9 @@ long smb_ReceiveTran2QPathInfo(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t
                spacep = cm_GetSpace();
                smb_StripLastComponent(spacep->data, &lastComp,
                                        (char *)(&p->parmsp[3]));
-               if (strcmp(lastComp, "\\desktop.ini") == 0) {
+               /* Make sure that lastComp is not NULL */
+               if (lastComp)
+                   if (strcmp(lastComp, "\\desktop.ini") == 0) {
                        code = cm_NameI(cm_rootSCachep, spacep->data,
                                        CM_FLAG_CASEFOLD
                                          | CM_FLAG_DIRSEARCH