windows-share-parse-20080217
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 18 Feb 2008 05:52:34 +0000 (05:52 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 18 Feb 2008 05:52:34 +0000 (05:52 +0000)
LICENSE MIT

add srvsvc and wkssvc to reserved names in smb_ShareParse.

include slash in ipc$ reference in dfs referrals check.

src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c

index 32b7727..ef61883 100644 (file)
@@ -1644,6 +1644,8 @@ int smb_FindShare(smb_vc_t *vcp, smb_user_t *uidp, char *shareName,
     }
 
     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
          ) {
index b81e594..a30877d 100644 (file)
@@ -2152,7 +2152,7 @@ long smb_ReceiveTran2Open(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t *op)
          (stricmp(lastNamep, SMB_IOCTL_FILENAME) == 0 ||
            stricmp(lastNamep, "\\srvsvc") == 0 ||
            stricmp(lastNamep, "\\wkssvc") == 0 ||
-           stricmp(lastNamep, "ipc$") == 0)) {
+           stricmp(lastNamep, "\\ipc$") == 0)) {
         /* special case magic file name for receiving IOCTL requests
          * (since IOCTL calls themselves aren't getting through).
          */