3.1.4.6 Receiving NetrMessageNameAdd

On receipt of this message, the message server SHOULD check an internal access control list (ACL) to determine whether the message client is authorized to access the name list. If the ACL authorization check is performed, and the message client is not authorized to perform the operation, the message server MUST return ERROR_ACCESS_DENIED.<12>

Next, the message server MUST convert MsgName to a valid NetBIOS name, as specified in [RFC1001] section 5.2 and [RFC1002] section 4.1. If MsgName is not valid, the message server MUST return ERROR_INVALID_NAME. The process for conversion is as follows:

  • Server MUST convert MsgName to an ASCII string.

  • Server MUST truncate MsgName to 15 characters if MsgName is longer than 15 characters.

  • Server MUST pad MsgName to 15 characters with the ASCII space character if MsgName is shorter than 15 characters.

  • Server MUST remove the null terminator for MsgName, if present.

  • Server MUST append the NetBIOS suffix value 0x03 to the converted MsgName.

If MsgName is valid, the message server MUST check each LANA to see if MsgName is currently in the name table on that LANA.

  • If MsgName is in the name table on any LANA, the message server MUST return NERR_AlreadyExists.

  • If MsgName is currently in a delete pending status on any LANA, the message server MUST wait 5 seconds and check again. At that time, if MsgName is still present in the name table on that LANA, the message server MUST return NERR_AlreadyExists.

  • If MsgName is not in the name table on any LANA, the message server MUST add MsgName to the name table on every LANA.

If the message server is unable to add MsgName to the name table on any LANA because the name table is full on that LANA, the message server MUST return NERR_TooManyNames.<13>

If the message server fails to add MsgName to the name table on any LANA, the message server MUST attempt to delete MsgName from the name table on any LANAs where it had successfully added MsgName. If it fails to delete MsgName from any name tables on any LANA, the message server MUST return NERR_InternalError.

If the message server successfully added MsgName to all LANAs, the message server MUST return ERROR_SUCCESS.