mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 16:00:12 +00:00
the-correct-mkdir-fix-20040318
Apply the correct file including the fix to the MIT recursive directory creation patch.
This commit is contained in:
parent
1d568df733
commit
8f0422422d
@ -25,8 +25,6 @@
|
||||
|
||||
#include "smb.h"
|
||||
|
||||
extern smb_vc_t *dead_vcp;
|
||||
|
||||
extern osi_hyper_t hzero;
|
||||
|
||||
smb_packet_t *smb_Directory_Watches = NULL;
|
||||
@ -111,7 +109,7 @@ long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
|
||||
{
|
||||
char *tp;
|
||||
char *usern, *pwd, *pwdx;
|
||||
smb_user_t *uidp, *dead_uidp;
|
||||
smb_user_t *uidp;
|
||||
unsigned short newUid;
|
||||
unsigned long caps;
|
||||
cm_user_t *userp;
|
||||
@ -164,7 +162,8 @@ long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
|
||||
if (!userp)
|
||||
userp = cm_NewUser();
|
||||
lock_ObtainMutex(&vcp->mx);
|
||||
if(!vcp->uidCounter) vcp->uidCounter++; /* handle unlikely wraparounds */
|
||||
if (!vcp->uidCounter)
|
||||
vcp->uidCounter++; /* handle unlikely wraparounds */
|
||||
newUid = (strlen(usern)==0)?0:vcp->uidCounter++;
|
||||
lock_ReleaseMutex(&vcp->mx);
|
||||
|
||||
@ -176,7 +175,7 @@ long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
|
||||
uidp = smb_FindUID(vcp, newUid, SMB_FLAG_CREATE);
|
||||
lock_ObtainMutex(&uidp->mx);
|
||||
uidp->unp = unp;
|
||||
osi_LogEvent("AFS smb_ReceiveV3SessionSetupX",NULL,"MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d],TicketKTCName[%s]",vcp,vcp->lana,vcp->lsn,newUid,usern);
|
||||
osi_LogEvent("AFS smb_ReceiveV3SessionSetupX",NULL,"MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d],TicketKTCName[%s]",(int)vcp,vcp->lana,vcp->lsn,newUid,usern);
|
||||
osi_Log4(afsd_logp,"smb_ReceiveV3SessionSetupX MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d]",vcp,vcp->lana,vcp->lsn,newUid);
|
||||
lock_ReleaseMutex(&uidp->mx);
|
||||
smb_ReleaseUID(uidp);
|
||||
@ -205,7 +204,7 @@ long smb_ReceiveV3UserLogoffX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *ou
|
||||
|
||||
/* find the tree and free it */
|
||||
uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
|
||||
/* TODO: smb_ReleaseUID? */
|
||||
/* TODO: smb_ReleaseUID() ? */
|
||||
if (uidp) {
|
||||
char *s1 = NULL, *s2 = NULL;
|
||||
|
||||
@ -569,12 +568,11 @@ long smb_ReceiveV3Tran2A(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
}
|
||||
|
||||
/* now copy the parms and data */
|
||||
if( parmCount != 0 )
|
||||
if ( parmCount != 0 )
|
||||
{
|
||||
memcpy(((char *)asp->parmsp) + parmDisp, inp->data + parmOffset, parmCount);
|
||||
}
|
||||
if( dataCount != 0 )
|
||||
{
|
||||
if ( dataCount != 0 ) {
|
||||
memcpy(asp->datap + dataDisp, inp->data + dataOffset, dataCount);
|
||||
}
|
||||
|
||||
@ -590,8 +588,8 @@ long smb_ReceiveV3Tran2A(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
lock_ReleaseWrite(&smb_globalLock);
|
||||
|
||||
/* now dispatch it */
|
||||
if(asp->opcode >= 0 && asp->opcode < 20 && smb_tran2DispatchTable[asp->opcode].procp) {
|
||||
osi_LogEvent("AFS-Dispatch-2[%s]",myCrt_2Dispatch(asp->opcode),"vcp[%x] lana[%d] lsn[%d]",vcp,vcp->lana,vcp->lsn);
|
||||
if ( asp->opcode >= 0 && asp->opcode < 20 && smb_tran2DispatchTable[asp->opcode].procp) {
|
||||
osi_LogEvent("AFS-Dispatch-2[%s]",myCrt_2Dispatch(asp->opcode),"vcp[%x] lana[%d] lsn[%d]",(int)vcp,vcp->lana,vcp->lsn);
|
||||
osi_Log4(afsd_logp,"AFS Server - Dispatch-2 %s vcp[%x] lana[%d] lsn[%d]",myCrt_2Dispatch(asp->opcode),vcp,vcp->lana,vcp->lsn);
|
||||
code = (*smb_tran2DispatchTable[asp->opcode].procp)(vcp, asp, outp);
|
||||
}
|
||||
@ -890,8 +888,8 @@ long smb_ReceiveTran2Open(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t *op)
|
||||
if (extraInfo) {
|
||||
outp->parmsp[parmSlot] = smb_Attributes(scp); parmSlot++;
|
||||
smb_SearchTimeFromUnixTime(&dosTime, scp->clientModTime);
|
||||
outp->parmsp[parmSlot] = dosTime & 0xffff; parmSlot++;
|
||||
outp->parmsp[parmSlot] = (dosTime>>16) & 0xffff; parmSlot++;
|
||||
outp->parmsp[parmSlot] = (unsigned short)(dosTime & 0xffff); parmSlot++;
|
||||
outp->parmsp[parmSlot] = (unsigned short)((dosTime>>16) & 0xffff); parmSlot++;
|
||||
outp->parmsp[parmSlot] = (unsigned short) (scp->length.LowPart & 0xffff);
|
||||
parmSlot++;
|
||||
outp->parmsp[parmSlot] = (unsigned short) ((scp->length.LowPart >> 16) & 0xffff);
|
||||
@ -1183,7 +1181,8 @@ 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(lastComp) {
|
||||
/* 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
|
||||
@ -1496,16 +1495,14 @@ long smb_ReceiveTran2SetFileInfo(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet
|
||||
|
||||
/* prepare for setattr call */
|
||||
attr.mask = 0;
|
||||
lastMod = *((FILETIME *)(p->datap + 16));
|
||||
/* when called as result of move a b, lastMod is (-1, -1). If the check for -1
|
||||
is not present, timestamp
|
||||
of the resulting file will be 1969 (-1)
|
||||
*/
|
||||
|
||||
lastMod = *((FILETIME *)(p->datap + 16));
|
||||
/* when called as result of move a b, lastMod is (-1, -1).
|
||||
* If the check for -1 is not present, timestamp
|
||||
* of the resulting file will be 1969 (-1)
|
||||
*/
|
||||
if (LargeIntegerNotEqualToZero(*((LARGE_INTEGER *)&lastMod)) &&
|
||||
lastMod.dwLowDateTime != -1 &&
|
||||
lastMod.dwHighDateTime != -1)
|
||||
{
|
||||
lastMod.dwLowDateTime != -1 && lastMod.dwHighDateTime != -1) {
|
||||
attr.mask |= CM_ATTRMASK_CLIENTMODTIME;
|
||||
smb_UnixTimeFromLargeSearchTime(&attr.clientModTime,
|
||||
&lastMod);
|
||||
@ -1671,7 +1668,6 @@ long smb_ApplyV3DirListPatches(cm_scache_t *dscp,
|
||||
/* merge in hidden (dot file) attribute */
|
||||
if( patchp->flags & SMB_DIRLISTPATCH_DOTFILE )
|
||||
lattr |= SMB_ATTR_HIDDEN;
|
||||
|
||||
*((u_long *)dptr) = lattr;
|
||||
dptr += 4;
|
||||
}
|
||||
@ -1722,7 +1718,6 @@ long smb_ApplyV3DirListPatches(cm_scache_t *dscp,
|
||||
/* merge in hidden (dot file) attribute */
|
||||
if( patchp->flags & SMB_DIRLISTPATCH_DOTFILE )
|
||||
attr |= SMB_ATTR_HIDDEN;
|
||||
|
||||
*dptr++ = attr & 0xff;
|
||||
*dptr++ = (attr >> 8) & 0xff;
|
||||
}
|
||||
@ -2002,7 +1997,7 @@ long smb_ReceiveTran2SearchDir(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t
|
||||
nextCookie, dsp->cookie);
|
||||
|
||||
userp = smb_GetTran2User(vcp, p);
|
||||
if(!userp) {
|
||||
if (!userp) {
|
||||
osi_Log1(afsd_logp, "T2 dir search unable to resolve user [%d]", p->uid);
|
||||
smb_ReleaseDirSearch(dsp);
|
||||
smb_FreeTran2Packet(outp);
|
||||
@ -2249,7 +2244,8 @@ long smb_ReceiveTran2SearchDir(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t
|
||||
|
||||
/* Eliminate entries that don't match requested
|
||||
attributes */
|
||||
if (smb_hideDotFiles && !(dsp->attribute & SMB_ATTR_HIDDEN) && smb_IsDotFile(dep->name))
|
||||
if (smb_hideDotFiles && !(dsp->attribute & SMB_ATTR_HIDDEN) &&
|
||||
smb_IsDotFile(dep->name))
|
||||
goto nextEntry; /* no hidden files */
|
||||
|
||||
if (!(dsp->attribute & SMB_ATTR_DIRECTORY)) /* no directories */
|
||||
@ -2446,9 +2442,8 @@ nextEntry:
|
||||
* or if something went wrong, close the search.
|
||||
*/
|
||||
/* ((searchFlags & 1) || ((searchFlags & 2) && eos) */
|
||||
/* pbh - added patch submitted to openafs-dev from James Petterson on 26 Feb, 2003 */
|
||||
if ((searchFlags & 1) || (returnedNames == 0) || ((searchFlags & 2) && eos)
|
||||
|| code != 0)
|
||||
if ((searchFlags & 1) || (returnedNames == 0) || ((searchFlags & 2) &&
|
||||
eos) || code != 0)
|
||||
smb_DeleteDirSearch(dsp);
|
||||
if (code)
|
||||
smb_SendTran2Error(vcp, p, opx, code);
|
||||
@ -2546,6 +2541,7 @@ long smb_ReceiveV3OpenX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
#ifdef NOTSERVICE
|
||||
osi_Log0(afsd_logp, "IOCTL Open");
|
||||
#endif
|
||||
|
||||
fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
|
||||
smb_SetupIoctlFid(fidp, spacep);
|
||||
|
||||
@ -2587,7 +2583,6 @@ long smb_ReceiveV3OpenX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
free(hexp);
|
||||
}
|
||||
#endif
|
||||
|
||||
userp = smb_GetUser(vcp, inp);
|
||||
|
||||
dscp = NULL;
|
||||
@ -2684,8 +2679,7 @@ long smb_ReceiveV3OpenX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
setAttr.mask = CM_ATTRMASK_LENGTH;
|
||||
setAttr.length.LowPart = 0;
|
||||
setAttr.length.HighPart = 0;
|
||||
code = cm_SetAttr(scp, &setAttr, userp,
|
||||
&req);
|
||||
code = cm_SetAttr(scp, &setAttr, userp, &req);
|
||||
}
|
||||
} /* lookup succeeded */
|
||||
}
|
||||
@ -2985,17 +2979,15 @@ long smb_ReceiveV3SetAttributes(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
|
||||
if (searchTime != 0) {
|
||||
smb_UnixTimeFromSearchTime(&unixTime, searchTime);
|
||||
|
||||
if (unixTime != -1) {
|
||||
if ( unixTime != -1 ) {
|
||||
attrs.mask = CM_ATTRMASK_CLIENTMODTIME;
|
||||
attrs.clientModTime = unixTime;
|
||||
code = cm_SetAttr(scp, &attrs, userp, &req);
|
||||
|
||||
osi_Log1(afsd_logp, "SMB receive V3SetAttributes [fid=%ld]", fid);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
osi_Log1(afsd_logp, "**smb_UnixTimeFromSearchTime failed searchTime=%ld", searchTime);
|
||||
}
|
||||
|
||||
}
|
||||
else code = 0;
|
||||
|
||||
@ -3228,10 +3220,8 @@ long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
free(hexp);
|
||||
}
|
||||
#endif
|
||||
|
||||
userp = smb_GetUser(vcp, inp);
|
||||
|
||||
if(!userp) {
|
||||
if (!userp) {
|
||||
osi_Log1(afsd_logp, "NTCreateX Invalid user [%d]", ((smb_t *) inp)->uid);
|
||||
free(realPathp);
|
||||
return CM_ERROR_INVAL;
|
||||
@ -3243,7 +3233,7 @@ long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
}
|
||||
else {
|
||||
baseFidp = smb_FindFID(vcp, baseFid, 0);
|
||||
if(!baseFidp) {
|
||||
if (!baseFidp) {
|
||||
osi_Log1(afsd_logp, "NTCreateX Invalid base fid [%d]", baseFid);
|
||||
free(realPathp);
|
||||
cm_ReleaseUser(userp);
|
||||
@ -3284,7 +3274,7 @@ long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
CM_FLAG_FOLLOW | CM_FLAG_CASEFOLD,
|
||||
userp, tidPathp, &req, &dscp);
|
||||
|
||||
if(code &&
|
||||
if (code &&
|
||||
(tp = strrchr(spacep->data,'\\')) &&
|
||||
(createDisp == 2) &&
|
||||
(realDirFlag == 1)) {
|
||||
@ -3292,7 +3282,7 @@ long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
treeCreate = TRUE;
|
||||
treeStartp = realPathp + (tp - spacep->data);
|
||||
|
||||
if(*tp && !smb_IsLegalFilename(tp)) {
|
||||
if (*tp && !smb_IsLegalFilename(tp)) {
|
||||
if(baseFid != 0) smb_ReleaseFID(baseFidp);
|
||||
cm_ReleaseUser(userp);
|
||||
free(realPathp);
|
||||
@ -3424,12 +3414,12 @@ long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
else {
|
||||
char *tp, *pp;
|
||||
char *cp; /* This component */
|
||||
int clen; /* length of component */
|
||||
int clen = 0; /* length of component */
|
||||
cm_scache_t *tscp;
|
||||
int isLast = 0;
|
||||
|
||||
/* create directory */
|
||||
if(!treeCreate) treeStartp = lastNamep;
|
||||
if ( !treeCreate ) treeStartp = lastNamep;
|
||||
osi_assert(dscp != NULL);
|
||||
osi_Log1(afsd_logp, "smb_ReceiveNTCreateX creating directory [%s]",
|
||||
osi_LogSaveString(afsd_logp, treeStartp));
|
||||
@ -3446,6 +3436,7 @@ long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
tp = strchr(pp, '\\');
|
||||
if(!tp) {
|
||||
strcpy(cp,pp);
|
||||
clen = strlen(cp);
|
||||
isLast = 1; /* indicate last component. the supplied path never ends in a slash */
|
||||
}
|
||||
else {
|
||||
@ -3507,7 +3498,7 @@ long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
free(realPathp);
|
||||
return CM_ERROR_ISDIR;
|
||||
}
|
||||
/* (only applies for single component case) */
|
||||
/* (only applies to single component case) */
|
||||
if (realDirFlag == 1 && scp->fileType == CM_SCACHETYPE_FILE) {
|
||||
cm_ReleaseSCache(scp);
|
||||
if (dscp) cm_ReleaseSCache(dscp);
|
||||
@ -3597,11 +3588,15 @@ long smb_ReceiveNTTranCreate(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *out
|
||||
unsigned int extendedRespRequired;
|
||||
int realDirFlag;
|
||||
unsigned int desiredAccess;
|
||||
/*unsigned int allocSize;*/
|
||||
/*unsigned int shareAccess;*/
|
||||
#ifdef DEBUG_VERBOSE
|
||||
unsigned int allocSize;
|
||||
unsigned int shareAccess;
|
||||
#endif
|
||||
unsigned int extAttributes;
|
||||
unsigned int createDisp;
|
||||
/*unsigned int sdLen;*/
|
||||
#ifdef DEBUG_VERBOSE
|
||||
unsigned int sdLen;
|
||||
#endif
|
||||
unsigned int createOptions;
|
||||
int initialModeBits;
|
||||
unsigned short baseFid;
|
||||
@ -3644,19 +3639,25 @@ long smb_ReceiveNTTranCreate(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *out
|
||||
return CM_ERROR_INVAL;
|
||||
baseFid = (unsigned short)lparmp[1];
|
||||
desiredAccess = lparmp[2];
|
||||
/*allocSize = lparmp[3];*/
|
||||
#ifdef DEBUG_VERBOSE
|
||||
allocSize = lparmp[3];
|
||||
#endif /* DEBUG_VERSOSE */
|
||||
extAttributes = lparmp[5];
|
||||
/*shareAccess = lparmp[6];*/
|
||||
#ifdef DEBUG_VEROSE
|
||||
shareAccess = lparmp[6];
|
||||
#endif
|
||||
createDisp = lparmp[7];
|
||||
createOptions = lparmp[8];
|
||||
/*sdLen = lparmp[9];*/
|
||||
#ifdef DEBUG_VERBOSE
|
||||
sdLen = lparmp[9];
|
||||
#endif
|
||||
nameLength = lparmp[11];
|
||||
|
||||
/*
|
||||
#ifdef DEBUG_VERBOSE
|
||||
osi_Log4(afsd_logp,"NTTransCreate with da[%x],ea[%x],sa[%x],cd[%x]",desiredAccess,extAttributes,shareAccess,createDisp);
|
||||
osi_Log2(afsd_logp,"... co[%x],sdl[%x],as[%x]",createOptions,sdLen,allocSize);
|
||||
osi_Log1(afsd_logp,"... flags[%x]",flags);
|
||||
*/
|
||||
#endif
|
||||
|
||||
/* mustBeDir is never set; createOptions directory bit seems to be
|
||||
* more important
|
||||
@ -3688,6 +3689,7 @@ long smb_ReceiveNTTranCreate(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *out
|
||||
* Nothing here to handle SMB_IOCTL_FILENAME.
|
||||
* Will add it if necessary.
|
||||
*/
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
{
|
||||
char *hexp, *asciip;
|
||||
@ -3930,8 +3932,8 @@ long smb_ReceiveNTTranCreate(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *out
|
||||
/* set inp->fid so that later read calls in same msg can find fid */
|
||||
inp->fid = fidp->fid;
|
||||
|
||||
/* check whether we are required to send and extended response */
|
||||
if(!extendedRespRequired) {
|
||||
/* check whether we are required to send an extended response */
|
||||
if (!extendedRespRequired) {
|
||||
/* out parms */
|
||||
parmOffset = 8*4 + 39;
|
||||
parmOffset += 1; /* pad to 4 */
|
||||
@ -3979,9 +3981,7 @@ long smb_ReceiveNTTranCreate(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *out
|
||||
*((USHORT *)outData) = (scp->fileType == CM_SCACHETYPE_DIRECTORY);
|
||||
outData += 2; /* is a dir? */
|
||||
lock_ReleaseMutex(&scp->mx);
|
||||
|
||||
} else { /* extended response required */
|
||||
|
||||
} else {
|
||||
/* out parms */
|
||||
parmOffset = 8*4 + 39;
|
||||
parmOffset += 1; /* pad to 4 */
|
||||
@ -4041,7 +4041,6 @@ long smb_ReceiveNTTranCreate(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *out
|
||||
cm_ReleaseUser(userp);
|
||||
|
||||
/* free(realPathp); Can't free realPathp here because fidp->NTopen_wholepathp points there */
|
||||
|
||||
/* leave scp held since we put it in fidp->scp */
|
||||
return 0;
|
||||
}
|
||||
@ -4060,8 +4059,7 @@ long smb_ReceiveNTTranNotifyChange(smb_vc_t *vcp, smb_packet_t *inp,
|
||||
watchtree = smb_GetSMBParm(inp, 22) && 0xffff; /* TODO: should this be 0xff ? */
|
||||
|
||||
fidp = smb_FindFID(vcp, fid, 0);
|
||||
|
||||
if(!fidp) {
|
||||
if (!fidp) {
|
||||
osi_Log1(afsd_logp, "ERROR: NotifyChange given invalid fid [%d]", fid);
|
||||
return CM_ERROR_BADFD;
|
||||
}
|
||||
@ -4086,7 +4084,6 @@ long smb_ReceiveNTTranNotifyChange(smb_vc_t *vcp, smb_packet_t *inp,
|
||||
smb_ReleaseFID(fidp);
|
||||
|
||||
outp->flags |= SMB_PACKETFLAG_NOSEND;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4245,7 +4242,7 @@ void smb_NotifyChange(DWORD action, DWORD notifyFilter,
|
||||
filter = 0x17;
|
||||
|
||||
fidp = smb_FindFID(vcp, fid, 0);
|
||||
if(!fidp) {
|
||||
if (!fidp) {
|
||||
lastWatch = watch;
|
||||
watch = watch->nextp;
|
||||
continue;
|
||||
@ -4399,10 +4396,10 @@ long smb_ReceiveNTCancel(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
watchtree = smb_GetSMBParm(watch, 22) & 0xffff;
|
||||
|
||||
fidp = smb_FindFID(vcp, fid, 0);
|
||||
if(fidp) {
|
||||
if (fidp) {
|
||||
osi_Log3(afsd_logp, "Cancelling change notification for fid %d wtree %d file %s",
|
||||
fid, watchtree,
|
||||
osi_LogSaveString(afsd_logp, fidp->NTopen_wholepathp));
|
||||
osi_LogSaveString(afsd_logp, (fidp)?fidp->NTopen_wholepathp:""));
|
||||
|
||||
scp = fidp->scp;
|
||||
lock_ObtainMutex(&scp->mx);
|
||||
@ -4445,7 +4442,6 @@ void smb3_Init()
|
||||
|
||||
cm_user_t *smb_FindCMUserByName(/*smb_vc_t *vcp,*/ char *usern, char *machine)
|
||||
{
|
||||
cm_user_t *userp;
|
||||
/*int newUid;*/
|
||||
smb_username_t *unp;
|
||||
|
||||
@ -4454,9 +4450,9 @@ cm_user_t *smb_FindCMUserByName(/*smb_vc_t *vcp,*/ char *usern, char *machine)
|
||||
lock_ObtainMutex(&unp->mx);
|
||||
unp->userp = cm_NewUser();
|
||||
lock_ReleaseMutex(&unp->mx);
|
||||
osi_LogEvent("AFS smb_FindCMUserByName New User",NULL,"name[%s] machine[%s]",usern,machine);
|
||||
osi_LogEvent("AFS smb_FindCMUserByName : New User",NULL,"name[%s] machine[%s]",usern,machine);
|
||||
} else {
|
||||
osi_LogEvent("AFS smb_FindCMUserByName Found",NULL,"name[%s] machine[%s]",usern,machine);
|
||||
osi_LogEvent("AFS smb_FindCMUserByName : Found",NULL,"name[%s] machine[%s]",usern,machine);
|
||||
}
|
||||
return unp->userp;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user