mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
STABLE14-windows-misc-20060826
(1) verify uidp before use (2) initialize variables before use
This commit is contained in:
parent
c348fd8953
commit
38f543b2d6
@ -268,7 +268,7 @@ configureBackConnectionHostNames(void)
|
|||||||
HKEY hkMSV10;
|
HKEY hkMSV10;
|
||||||
HKEY hkClient;
|
HKEY hkClient;
|
||||||
DWORD dwType;
|
DWORD dwType;
|
||||||
DWORD dwSize, dwAllocSize;
|
DWORD dwSize = 0, dwAllocSize = 0;
|
||||||
DWORD dwValue;
|
DWORD dwValue;
|
||||||
PBYTE pHostNames = NULL, pName = NULL;
|
PBYTE pHostNames = NULL, pName = NULL;
|
||||||
BOOL bNameFound = FALSE;
|
BOOL bNameFound = FALSE;
|
||||||
|
@ -879,6 +879,7 @@ long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
|
|||||||
lock_ReleaseMutex(&unp->mx);
|
lock_ReleaseMutex(&unp->mx);
|
||||||
|
|
||||||
uidp = smb_FindUID(vcp, newUid, SMB_FLAG_CREATE);
|
uidp = smb_FindUID(vcp, newUid, SMB_FLAG_CREATE);
|
||||||
|
if (uidp) {
|
||||||
lock_ObtainMutex(&uidp->mx);
|
lock_ObtainMutex(&uidp->mx);
|
||||||
uidp->unp = unp;
|
uidp->unp = unp;
|
||||||
osi_LogEvent("AFS smb_ReceiveV3SessionSetupX",NULL,"MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d],TicketKTCName[%s]",(int)vcp,vcp->lana,vcp->lsn,newUid,osi_LogSaveString(smb_logp, 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,osi_LogSaveString(smb_logp, usern));
|
||||||
@ -886,6 +887,7 @@ long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
|
|||||||
lock_ReleaseMutex(&uidp->mx);
|
lock_ReleaseMutex(&uidp->mx);
|
||||||
smb_ReleaseUID(uidp);
|
smb_ReleaseUID(uidp);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Return UID to the client */
|
/* Return UID to the client */
|
||||||
((smb_t *)outp)->uid = newUid;
|
((smb_t *)outp)->uid = newUid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user