free(ucellp->ticketp);
ucellp->ticketp = NULL;
}
+ ucellp->ticketLen = 0;
+ memset(ucellp->sessionKey.data, 0, 8);
+ ucellp->kvno = 0;
+ ucellp->expirationTime = 0;
+ ucellp->userName[0] = '\0';
ucellp->flags &= ~CM_UCELLFLAG_RXKAD;
ucellp->gen++;
for (ucellp = userp->cellInfop; ucellp; ucellp = ucellp->nextp) {
osi_Log1(smb_logp,"cm_IoctlDelAllToken ucellp %lx", ucellp);
+
+ if (ucellp->ticketp) {
+ free(ucellp->ticketp);
+ ucellp->ticketp = NULL;
+ }
+ ucellp->ticketLen = 0;
+ memset(ucellp->sessionKey.data, 0, 8);
+ ucellp->kvno = 0;
+ ucellp->expirationTime = 0;
+ ucellp->userName[0] = '\0';
ucellp->flags &= ~CM_UCELLFLAG_RXKAD;
ucellp->gen++;
}
smb_ioctlProcsp[VIOCSETAL] = cm_IoctlSetACL;
smb_ioctlProcsp[VIOC_FLUSHVOLUME] = cm_IoctlFlushVolume;
smb_ioctlProcsp[VIOCFLUSH] = cm_IoctlFlushFile;
-#ifdef COMMENT
- /* This functions do not return the data expected by the
- * Windows CIFS client. Calling them only increases the
- * number of roundtrips to the file server with no benefit.
- */
smb_ioctlProcsp[VIOCSETVOLSTAT] = cm_IoctlSetVolumeStatus;
smb_ioctlProcsp[VIOCGETVOLSTAT] = cm_IoctlGetVolumeStatus;
-#endif
smb_ioctlProcsp[VIOCWHEREIS] = cm_IoctlWhereIs;
smb_ioctlProcsp[VIOC_AFS_STAT_MT_PT] = cm_IoctlStatMountPoint;
smb_ioctlProcsp[VIOC_AFS_DELETE_MT_PT] = cm_IoctlDeleteMountPoint;
smb_IoctlPrepareRead(smb_fid_t *fidp, smb_ioctl_t *ioctlp, cm_user_t *userp)
{
long opcode;
- smb_ioctlProc_t *procp;
+ smb_ioctlProc_t *procp = NULL;
long code;
if (ioctlp->flags & SMB_IOCTLFLAG_DATAIN) {
return CM_ERROR_TOOBIG;
/* check for no such proc */
- procp = smb_ioctlProcsp[opcode];
+ if (fidp->flags & SMB_FID_IOCTL)
+ procp = smb_ioctlProcsp[opcode];
+ else
+ procp = NULL;
+
if (procp == NULL)
return CM_ERROR_BADOP;