}
if (_stricmp(shareName, "IPC$") == 0 ||
+ _stricmp(shareName, "srvsvc") == 0 ||
+ _stricmp(shareName, "wkssvc") == 0 ||
_stricmp(shareName, SMB_IOCTL_FILENAME_NOSLASH) == 0 ||
_stricmp(shareName, "DESKTOP.INI") == 0
) {
NTStatus = 0xC09820FBL; /* SMB use standard */
}
else if (code == CM_ERROR_QUOTA) {
-#ifdef COMMENT
NTStatus = 0xC0000044L; /* Quota exceeded */
-#else
- NTStatus = 0xC000007FL; /* Disk full */
-#endif
}
else if (code == CM_ERROR_SPACE) {
NTStatus = 0xC000007FL; /* Disk full */
else if (code == CM_ERROR_ALLOFFLINE || code == CM_ERROR_ALLDOWN) {
NTStatus = 0xC00000BEL; /* Bad Network Path */
}
- else if (code == RXKADUNKNOWNKEY) {
- NTStatus = 0xC0000322L; /* Bad Kerberos key */
+ else if (code >= ERROR_TABLE_BASE_RXK && code < ERROR_TABLE_BASE_RXK + 256) {
+ NTStatus = 0xC0000322L; /* No Kerberos key */
}
else if (code == CM_ERROR_BAD_LEVEL) {
NTStatus = 0xC0000148L; /* Invalid Level */
- } else {
+ }
+ else if (code == CM_ERROR_RANGE_NOT_LOCKED) {
+ NTStatus = 0xC000007EL; /* Range Not Locked */
+ }
+ else {
NTStatus = 0xC0982001L; /* SMB non-specific error */
}
return;
}
+static void
+smb_LanAdapterChangeThread(void *param)
+{
+ /*
+ * Give the IPAddrDaemon thread a chance
+ * to block before we trigger.
+ */
+ Sleep(30000);
+ smb_LanAdapterChange(0);
+}
+
void smb_SetLanAdapterChangeDetected(void)
{
+ int lpid;
+ thread_t phandle;
+
lock_ObtainMutex(&smb_StartedLock);
+
+ if (!powerStateSuspended) {
+ phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_LanAdapterChangeThread,
+ NULL, 0, &lpid, "smb_LanAdapterChange");
+ osi_assertx(phandle != NULL, "smb_LanAdapterChangeThread thread creation failure");
+ thrd_CloseHandle(phandle);
+ }
+
smb_LanAdapterChangeDetected = 1;
lock_ReleaseMutex(&smb_StartedLock);
}
if (!locked)
lock_ObtainMutex(&smb_StartedLock);
+ if (powerStateSuspended)
+ afsi_log("smb_RestartListeners called while suspended");
+
if (!powerStateSuspended && smb_ListenerState != SMB_LISTENER_UNINITIALIZED) {
if (smb_ListenerState == SMB_LISTENER_STOPPED) {
if (smb_NetbiosInit(1))
phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_ClientWaiter,
NULL, 0, &lpid, "smb_ClientWaiter");
- osi_assertx(phandle != NULL, , "smb_ClientWaiter thread creation failure");
+ osi_assertx(phandle != NULL, "smb_ClientWaiter thread creation failure");
thrd_CloseHandle(phandle);
phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_ServerWaiter,