3.3.5.9.13 Handling the SMB2_CREATE_APP_INSTANCE_ID and SMB2_CREATE_APP_INSTANCE_VERSION Create Contexts

This section applies only to servers that implement the SMB 3.x dialect family.

If the create request also includes the SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 create context, the server MUST process the SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 create context as specified in section 3.3.5.9.12, and this section MUST be skipped.

The server MAY validate the StructureSize field of the create context.

The server MUST attempt to locate an Open in GlobalOpenTable where:

  • AppInstanceId in the request is equal to Open.AppInstanceId.

  • Target path name is equal to Open.PathName.

  • Open.TreeConnect.Share is equal to TreeConnect.Share.

  • Open.Session.Connection.ClientGuid is not equal to the current Connection.ClientGuid.

    If an Open is found, Connection.Dialect is "3.1.1", the request includes the SMB2_CREATE_APP_INSTANCE_VERSION context, Open.ApplicationInstanceVersionHigh and Open.ApplicationInstanceVersionLow are not empty, and either of the following is true, then the CREATE operation MUST be failed with STATUS_FILE_FORCED_CLOSED (0xC00000B6): 

    • Open.ApplicationInstanceVersionHigh is greater than the AppInstanceVersionHigh field in the SMB2_CREATE_APP_INSTANCE_VERSION create context.

    • Open.ApplicationInstanceVersionHigh is equal to the AppInstanceVersionHigh and Open.ApplicationInstanceVersionLow is greater than or equal to the AppInstanceVersionLow fields provided in the SMB2_CREATE_APP_INSTANCE_VERSION create context.

If the server implements SMB dialect 3.1.1, an Open is found, Open.ApplicationInstanceVersionHigh and Open.ApplicationInstanceVersionLow are not empty, and the request does not include the SMB2_CREATE_APP_INSTANCE_VERSION create context, then the CREATE operation MUST be failed with STATUS_FILE_FORCED_CLOSED (0xC00000B6).

If an Open is found, the server MUST calculate the maximal access that the user, identified by Session.SecurityContext, has on the file being opened.<342> If the maximal access includes GENERIC_READ access, the server MUST close the open as specified in 3.3.4.17.

If Open.CreateGuid is NULL, and Open.TreeConnect.Share.IsCA is FALSE, the server SHOULD<343> close the open as specified in section 3.3.4.17.

The server MUST then continue the create process specified in the "Open Execution" Phase.