From: Ryan Lantzer Date: Fri, 26 Jul 2002 06:14:25 +0000 (+0000) Subject: STABLE12-windows-no-more-files-workaround-20020725 X-Git-Tag: openafs-stable-1_2_6~24 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=e3287d034e9c8189a9b111894e046cd18e739ba1;p=packages%2Fo%2Fopenafs.git STABLE12-windows-no-more-files-workaround-20020725 work around erroneous "no more files" error in winnt client (cherry picked from commit 595f9ae4334f1dcf665944b8e6493a4f82855d13) --- diff --git a/src/WINNT/afsd/smb.c b/src/WINNT/afsd/smb.c index e1c8c85d9..e32a57d47 100644 --- a/src/WINNT/afsd/smb.c +++ b/src/WINNT/afsd/smb.c @@ -9,6 +9,8 @@ //#define NOSERVICE 1 +#define NOMOREFILESFIX 1 + #include #include @@ -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; diff --git a/src/WINNT/afsd/smb3.c b/src/WINNT/afsd/smb3.c index fad864de7..ef4e7e2b8 100644 --- a/src/WINNT/afsd/smb3.c +++ b/src/WINNT/afsd/smb3.c @@ -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