windows-share-parse-20080217

LICENSE MIT

add srvsvc and wkssvc to reserved names in smb_ShareParse.

include slash in ipc$ reference in dfs referrals check.
This commit is contained in:
Jeffrey Altman 2008-02-18 05:52:34 +00:00
parent 55aa6f04dc
commit 72da5c434c
2 changed files with 3 additions and 1 deletions

View 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
) {

View 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).
*/