3.1.5.7.2 SamrDeleteAlias (Opnum 30)
The SamrDeleteAlias method removes an alias object.
-
long SamrDeleteAlias( [in, out] SAMPR_HANDLE* AliasHandle );
AliasHandle: An RPC context handle, as specified in section 2.2.7.2, representing an alias object.
This protocol asks the RPC runtime, via the strict_context_handle attribute, to reject the use of context handles created by a method of a different RPC interface than this one, as specified in [MS-RPCE] section 3.
Upon receiving this message, the server MUST process the data from the message subject to the following constraints:
The server MUST return an error if AliasHandle.HandleType is not equal to "Alias".
AliasHandle.GrantedAccess MUST have the required access specified in section 3.1.2.2. Otherwise, the server MUST return STATUS_ACCESS_DENIED.
All database operations MUST occur in a single transaction.
Let A be the alias object referenced by AliasHandle.Object.
If the RID of A's objectSid attribute value is less than 1000, an error MUST be returned.
In the DC configuration, if A is a parent to another object, an error MUST be returned.<61>
A MUST be removed from the database.
The server MUST delete the SamContextHandle ADM element (section 3.1.1.10) represented by AliasHandle, and then MUST return 0 for the value of AliasHandle and a return code of STATUS_SUCCESS.