Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

3.3.5.3 Receiving an SMB_COM_CREATE_DIRECTORY Request

Upon receipt of an SMB_COM_CREATE_DIRECTORY Request (section 2.2.4.1.1) from the client, the server MUST verify the following:

  • The TID in the SMB_Header.TID field MUST be a valid TID for this SMB connection, as defined in section 3.3.5.2.

  • If the last element of the pathname in the SMB_Data.Bytes.DirectoryName field is removed, the remaining pathname MUST represent a valid directory within the share indicated by the TID.

  • The full pathname from the SMB_Data.Bytes.DirectoryName field MUST NOT resolve to an existing file or directory or other file system object.

  • The UID in the SMB_Header.UID field MUST be valid, as defined in section 3.3.5.2, and MUST represent the security context of a user with permission to create the directory. If the user does not have permission to create the directory, the server MUST return an error response with STATUS_ACCESS_DENIED (ERRDOS/ERRnoaccess) and MUST increase Server.Statistics.sts0_permerrors by 1.

  • If the designated directory already exists, the server MUST return an error response with STATUS_OBJECT_NAME_COLLISION (ERRDOS/ ERRfilexists).

If these conditions are met, the server MUST attempt to create the directory.<241> If directory creation fails, the server MUST provide an error response to the client (see section 2.2.4.1.2 for the list of expected error codes). Otherwise, the server the server MUST increase Server.Statistics.sts0_fopens by 1 and MUST return Success in the Status field. A new Open object MUST be allocated and inserted into Server.Connection.FileOpenTable with the following default values:

  • A new FID MUST be created to uniquely identify this Open request in Server.Connection.FileOpenTable.

  • Server.Open.TreeConnect MUST be set to the TreeConnect on which the open request was performed, and Server.Open.TreeConnect.OpenCount MUST be incremented by 1.

The server MUST register the Open request by invoking the Server Registers a New Open event ([MS-SVRS] section 3.1.6.4) and MUST assign the return value to Server.OpenFileGlobalId.

The response MUST be sent to the client as specified in section 3.3.4.1.

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.