3.3.4.13 Server Application Registers a Share

The calling application provides a share in SHARE_INFO_503_I structure as specified in [MS-SRVS] section 2.2.4.27 to register a share. The server MUST validate the SHARE_INFO_503_I structure as specified in [MS-SRVS] section 3.1.4.7. If any member in the structure is invalid, the server MUST return STATUS_INVALID_PARAMETER to the calling application. The server MUST look up the Share in the ShareList, where shi503_servername matches Share.ServerName and shi503_netname matches Share.Name. If a matching Share is found, the server MUST fail the call with an implementation-dependent error. Otherwise, the server MUST create a new Share with the following value set and insert it into ShareList and return STATUS_SUCCESS.

  • Share.Name MUST be set to shi503_netname.

  • Share.Type MUST be set to shi503_type. The server SHOULD<248> set STYPE_CLUSTER_FS, STYPE_CLUSTER_SOFS, and STYPE_CLUSTER_DFS as specified in [MS-SRVS] section 2.2.2.4 in an implementation-defined manner.

  • Share.Remark MUST be set to shi503_remark.

  • Share.LocalPath MUST be set to shi503_path.

  • Share.ServerName MUST be set to the shi503_servername.

  • Share.FileSecurity MUST be set to shi503_security_descriptor.

  • Share.MaxUses MUST be set to shi503_max_uses.

  • Share.CurrentUses MUST be set to 0.

  • Share.CscFlags MUST be set to 0.

  • Share.IsDfs MUST be set to FALSE.

  • Share.DoAccessBasedDirectoryEnumeration MUST be set to FALSE.

  • Share.AllowNamespaceCaching MUST be set to FALSE.

  • Share.ForceSharedDelete MUST be set to FALSE.

  • Share.RestrictExclusiveOpens MUST be set to FALSE.

  • Share.ForceLevel2Oplock MUST be set to FALSE.

  • Share.HashEnabled MUST be set to FALSE.

  • If the server implements the SMB 3.x dialect family, Share.EncryptData MUST be set to FALSE.

  • If the server implements the SMB 3.1.1 dialect, Share.CompressData MUST be set to FALSE.

If Share.Name is equal to "IPC$" or Share.Type does not have the STYPE_SPECIAL bit set, as specified in [MS-SRVS] section 2.2.2.4, then Share.ConnectSecurity SHOULD be set to a security descriptor allowing all users. Otherwise, Share.ConnectSecurity SHOULD be set to a security descriptor allowing only administrators.

If the server implements the SMB 3.x dialect family, Share.CATimeout MUST be set to an implementation-specific value.<249>