/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/*
* Local Security Authority RPC (LSARPC) interface definition.
*
* Names containing a backslash ('\') are known as qualified or composite
* names. The string preceding the backslash is assumed to be the domain
* name and the string following the slash is assumed to be name to be
* resolved within that domain.
*
* Names that do not contain a backslash are known as isolated names.
* An isolated name may be a single label, such as john, or may be in
* user principal name (UPN) form, such as john@example.com.
*/
#include "ndrtypes.ndl"
/* Windows 2000 */
/* Windows 2000 SP3 */
/* Windows Server 2003 */
/* Windows Vista */
/*
* Lookup levels. Level 1 appears to mean only look on the local host and
* level 2 means forward the request to the PDC. On the PDC it probably
* doesn't matter which level you use but on a BDC a level 1 lookup will
* fail if the BDC doesn't have the info whereas a level 2 lookup will also
* check with the PDC.
*/
/*
*/
/*
*
* 0x80000000 Lookup isolated names (except for UPNs) only in the local
* account database. Do not lookup UPNs.
*/
/*
* Client revision
*
* 0x00000001 Client does not understand DNS names or forests.
* 0x00000002 Client understands DNS names and forests.
*
* Notes:
* 0 means the same as 1
* Anything greater than 2 means the same as 2
*/
/*
* Definition for a SID. The ndl compiler won't allow a typedef of
* a structure containing variable size members.
*/
};
};
};
};
/*
***********************************************************************
* OpenPolicy2 obtains a handle for a remote LSA. This handle is
* required for all subsequent LSA requests.
*
* The server name should be the name of the target PDC or BDC, with
* the double backslash prefix.
*
* As far as I can tell, the mslsa_object_attributes structure can be
* all zero except for the length, which should be set to sizeof(struct
* mslsa_object_attributes).
*
* For read access, the desired access mask should contain the
* READ_CONTROL standard right and whatever policy rights are required.
* I haven't tried any update operations but if you get the access mask
* wrong you can crash the domain controller.
***********************************************************************
*/
/*
* From netmon:
* length = 12
* impersonation_level = 2
* context_tracking_mode = 1
* effective_only = 0
*/
};
};
};
};
/*
***********************************************************************
* CloseHandle closes an association with the LSA. The returned handle
* will be all zero.
***********************************************************************
*/
};
/*
***********************************************************************
* EnumPrivileges
*
* Obtain a list of privilege names. This interface is not implemented
* yet The definition below has not been tested. This is a guess based
* on data available from netmon.
***********************************************************************
*/
};
};
};
/*
***********************************************************************
* QuerySecurityObject. I'm not entirely sure how to set this up yet.
* I used the discovery RPC to scope it out. The structures are set up
* according to netmon and the assumption that a security descriptor
* on the wire looks like the regular user level security descriptor.
***********************************************************************
*/
};
/* struct mslsa_SecurityDescriptor *desc; */
};
};
/*
***********************************************************************
* EnumerateAccounts and EnumerateTrustedDomain.
***********************************************************************
*/
};
};
};
};
};
};
};
};
};
/*
***********************************************************************
* Definitions common to both LookupSids and LookupNames. Both return
* an mslsa_domain_table[]. Each interface also returns a specific
* table with entries which index the mslsa_domain_table[].
***********************************************************************
*/
};
};
/*
***********************************************************************
* Definitions for LookupSids.
*
* The input parameters are:
*
* A valid LSA handle obtained from an LsarOpenPolicy.
* The table of SIDs to be looked up.
* A table of names (probably empty).
* The lookup level (local=1 or PDC=2).
* An enumeration counter (used for continuation operations).
*
* The output results are:
*
* A table of referenced domains.
* A table of usernames.
* The updated value of the enumeration counter.
* The result status.
***********************************************************************
*/
};
};
};
};
};
};
/*
***********************************************************************
* Definitions for LookupNames.
*
* LookupNames requires the following input parameters.
*
* A valid LSA handle obtained from an LsarOpenPolicy.
* The table of names to be looked up.
* A table of translated sids (probably empty).
* The lookup level (local=1 or PDC=2).
* An enumeration counter (used for continuation operations).
*
* The outputs are as follows.
*
* A table of referenced domains.
* A table of translated sids (actually rids).
* The updated value of the enumeration counter.
* The result status.
***********************************************************************
*/
};
};
};
};
/*
***********************************************************************
* QueryInfoPolicy returns various pieces of policy information. The
* desired information is specified using a class value, as defined
* below.
***********************************************************************
*/
/*
* MSLSA_POLICY_AUDIT_EVENTS_INFO
*/
};
/*
* MSLSA_POLICY_PRIMARY_DOMAIN_INFO
*/
};
/*
* MSLSA_POLICY_ACCOUNT_DOMAIN_INFO
*/
};
/*
* MSLSA_POLICY_SERVER_ROLE_INFO
*/
};
};
};
/*
* This structure needs to be declared, even though it can't be used in
* mslsa_QueryInfoPolicy, in order to get the appropriate size to calculate
* the correct fixup offsets. If ndrgen did the right thing,
* mslsa_PolicyInfoRes would be one of the out parameters. However, if
* we do it that way, the switch_value isn't known early enough to do
* the fixup calculation. So it all has to go in mslsa_QueryInfoPolicy.
*/
};
/*
* Can't use this form because we need to include members explicitly.
* OUT struct mslsa_PolicyInfoRes result;
*/
};
/*
***********************************************************************
* OpenAccount.
*
* Returns a handle that can be used to access the account specified
* by a SID. This handle can be used to enumerate account privileges.
***********************************************************************
*/
};
/*
***********************************************************************
* EnumPrivilegesAccount.
*
* Enumerate the list of privileges held by the specified account. The
* handle must be a valid account handle obtained via OpenAccount. The
* luid values returned will be probably only be relevant on the domain
* controller so we'll need to find a way to convert them to the
* actual privilege names.
***********************************************************************
*/
};
};
};
};
/*
***********************************************************************
* LookupPrivValue
*
* Map a privilege name to a local unique id (LUID). Privilege names
* are consistent across the network. LUIDs are machine specific.
* The privilege list is provided as a set of LUIDs so the privilege
* lookup functions must be used to identify which the privilege to
* which each LUID refers. The handle here is a policy handle.
***********************************************************************
*/
};
/*
***********************************************************************
* LookupPrivName
*
* Map a privilege value (LUID) to a privilege name. Privilege names
* are consistent across the network. LUIDs are machine specific.
* The privilege list is provided as a set of LUIDs so the privilege
* lookup functions must be used to identify which the privilege to
* which each LUID refers. The handle here is a policy handle.
***********************************************************************
*/
};
/*
***********************************************************************
* LookupPrivDisplayName
*
* Map a privilege name to a local unique id (LUID). Privilege names
* are consistent across the network. LUIDs are machine specific.
* The privilege list is provided as a set of LUIDs so the privilege
* lookup functions must be used to identify which the privilege to
* which each LUID refers. The handle here is a policy handle.
***********************************************************************
*/
};
/*
***********************************************************************
* GetConnectedUser
*
* Return the account name and NetBIOS domain name for the user making
* the request. All input fields should be ignored by the server.
***********************************************************************
*/
};
};
/*
***********************************************************************
* LSARPC_OPNUM_LookupSids2
*
* SID lookup function that appeared in Windows 2000. It appears to be
* very similar to the original SID lookup RPC. There are two extra IN
* parameters, which we don't care about. The OUT name structure has
* an extra field, in which zero seems to be okay.
***********************************************************************
*/
};
};
};
};
/*
***********************************************************************
* LSARPC_OPNUM_LookupNames2
*
* Name lookup function that appeared in Windows 2000. It appears to be
* very similar to the original name lookup RPC. There are two extra IN
* parameters, which we don't care about. The lsar_rid_entry2 structure
* has an extra field, in which zero seems to be okay.
***********************************************************************
*/
};
};
};
};
};
};
};
/*
***********************************************************************
* The LSARPC interface definition.
***********************************************************************
*/
INTERFACE(0)
};
#endif /* _MLSVC_LSA_NDL_ */