2003-11-21 16:14:17 +03:00
#include "idl_types.h"
2003-11-06 15:34:04 +03:00
/*
lsa interface definition
*/
[ uuid(12345778-1234-abcd-ef00-0123456789ab),
version(0.0),
2003-11-28 08:20:11 +03:00
endpoints(lsarpc lsass),
2003-11-06 15:34:04 +03:00
pointer_default(unique)
] interface lsarpc
{
2003-11-09 11:30:29 +03:00
/******************/
/* Function: 0x00 */
NTSTATUS lsa_Close (
2003-11-09 14:01:39 +03:00
[in,out,ref] policy_handle *handle
2003-11-09 11:30:29 +03:00
);
2003-11-08 14:21:57 +03:00
2003-11-09 12:04:28 +03:00
2003-11-09 11:30:29 +03:00
/******************/
/* Function: 0x01 */
2003-11-09 12:44:06 +03:00
NTSTATUS lsa_Delete (
[in,ref] policy_handle *handle
);
2003-11-09 11:30:29 +03:00
2003-11-10 14:37:19 +03:00
2003-11-09 11:30:29 +03:00
/******************/
/* Function: 0x02 */
2003-11-09 12:44:06 +03:00
typedef struct {
2003-11-15 10:51:19 +03:00
[value(2*strlen_m(r->name))] uint16 name_len;
2003-11-16 08:07:07 +03:00
[value(r->name_len)] uint16 name_size;
2003-11-09 12:44:06 +03:00
unistr_noterm *name;
} lsa_Name;
typedef struct {
lsa_Name name;
uint32 luid_low;
uint32 luid_high;
} lsa_PrivEntry;
typedef struct {
uint32 count;
[size_is(count)] lsa_PrivEntry *privs;
} lsa_PrivArray;
NTSTATUS lsa_EnumPrivs (
[in,ref] policy_handle *handle,
[in,out,ref] uint32 *resume_handle,
[in] uint32 max_count,
[out,ref] lsa_PrivArray *privs
);
2003-11-09 11:30:29 +03:00
2003-11-10 14:37:19 +03:00
2003-11-09 11:30:29 +03:00
/******************/
/* Function: 0x03 */
2003-11-16 09:00:15 +03:00
typedef struct {
uint32 size;
2003-11-21 16:14:17 +03:00
[subcontext(4)] security_descriptor *sd;
2003-11-16 09:00:15 +03:00
} sec_desc_buf;
2003-11-15 07:42:48 +03:00
NTSTATUS lsa_QuerySecObj (
[in,ref] policy_handle *handle,
[in] uint32 sec_info,
[out] sec_desc_buf *sd
);
2003-11-09 11:30:29 +03:00
2003-11-10 14:37:19 +03:00
2003-11-09 11:30:29 +03:00
/******************/
/* Function: 0x04 */
NTSTATUS lsa_SetSecObj ();
2003-11-10 14:37:19 +03:00
2003-11-09 11:30:29 +03:00
/******************/
/* Function: 0x05 */
NTSTATUS lsa_ChangePassword ();
/******************/
/* Function: 0x06 */
2003-11-08 14:21:57 +03:00
typedef struct {
2003-11-15 00:39:13 +03:00
uint32 len; /* ignored */
2003-11-08 14:21:57 +03:00
uint16 impersonation_level;
uint8 context_mode;
uint8 effective_only;
} lsa_QosInfo;
typedef struct {
2003-11-15 00:39:13 +03:00
uint32 len; /* ignored */
2003-11-08 14:21:57 +03:00
uint8 *root_dir;
unistr *object_name;
uint32 attributes;
security_descriptor *sec_desc;
lsa_QosInfo *sec_qos;
} lsa_ObjectAttribute;
2003-11-09 12:04:28 +03:00
/* notice the screwup with the system_name - thats why MS created
OpenPolicy2 */
2003-11-08 14:21:57 +03:00
NTSTATUS lsa_OpenPolicy (
[in] uint16 *system_name,
[in,ref] lsa_ObjectAttribute *attr,
[in] uint32 desired_access,
2003-11-08 16:23:20 +03:00
[out,ref] policy_handle *handle
2003-11-08 14:21:57 +03:00
);
2003-11-06 15:34:04 +03:00
2003-11-09 12:04:28 +03:00
2003-11-09 11:30:29 +03:00
/******************/
/* Function: 0x07 */
2003-11-11 05:02:29 +03:00
typedef struct {
uint32 percent_full;
uint32 log_size;
NTTIME retention_time;
uint8 shutdown_in_progress;
NTTIME time_to_shutdown;
uint32 next_audit_record;
uint32 unknown;
} lsa_AuditLogInfo;
typedef struct {
uint32 auditing_mode;
2003-11-19 08:53:05 +03:00
[size_is(count)] uint32 *settings;
uint32 count;
2003-11-11 05:02:29 +03:00
} lsa_AuditEventsInfo;
2003-11-11 09:54:54 +03:00
typedef struct {
lsa_Name name;
dom_sid2 *sid;
2003-11-11 10:57:08 +03:00
} lsa_DomainInfo;
typedef struct {
lsa_Name name;
} lsa_PDAccountInfo;
typedef struct {
2003-11-19 10:31:17 +03:00
uint16 unknown; /* an midl padding bug? */
2003-11-11 10:57:08 +03:00
uint16 role;
} lsa_ServerRole;
typedef struct {
lsa_Name source;
lsa_Name account;
} lsa_ReplicaSourceInfo;
typedef struct {
uint32 paged_pool;
uint32 non_paged_pool;
uint32 min_wss;
uint32 max_wss;
uint32 pagefile;
HYPER_T unknown;
} lsa_DefaultQuotaInfo;
typedef struct {
HYPER_T modified_id;
NTTIME db_create_time;
} lsa_ModificationInfo;
typedef struct {
2003-11-19 10:31:17 +03:00
uint8 shutdown_on_full;
2003-11-11 10:57:08 +03:00
} lsa_AuditFullSetInfo;
typedef struct {
2003-11-19 10:31:17 +03:00
uint16 unknown; /* an midl padding bug? */
uint8 shutdown_on_full;
uint8 log_is_full;
2003-11-11 10:57:08 +03:00
} lsa_AuditFullQueryInfo;
typedef struct {
lsa_Name name;
lsa_Name dns_domain;
lsa_Name dns_forest;
GUID domain_guid;
dom_sid2 *sid;
} lsa_DnsDomainInfo;
2003-11-11 09:54:54 +03:00
2003-11-11 05:02:29 +03:00
typedef union {
2003-11-20 03:57:59 +03:00
[case(1)] lsa_AuditLogInfo audit_log;
[case(2)] lsa_AuditEventsInfo audit_events;
[case(3)] lsa_DomainInfo domain;
[case(4)] lsa_PDAccountInfo pd;
[case(5)] lsa_DomainInfo account_domain;
[case(6)] lsa_ServerRole role;
[case(7)] lsa_ReplicaSourceInfo replica;
[case(8)] lsa_DefaultQuotaInfo quota;
[case(9)] lsa_ModificationInfo db;
[case(10)] lsa_AuditFullSetInfo auditfullset;
[case(11)] lsa_AuditFullQueryInfo auditfullquery;
[case(12)] lsa_DnsDomainInfo dns;
2003-11-11 05:02:29 +03:00
} lsa_PolicyInformation;
NTSTATUS lsa_QueryInfoPolicy (
[in,ref] policy_handle *handle,
[in] uint16 level,
[out,switch_is(level)] lsa_PolicyInformation *info
);
2003-11-09 11:30:29 +03:00
/******************/
/* Function: 0x08 */
NTSTATUS lsa_SetInfoPolicy ();
/******************/
/* Function: 0x09 */
NTSTATUS lsa_ClearAuditLog ();
/******************/
/* Function: 0x0a */
NTSTATUS lsa_CreateAccount ();
/******************/
/* Function: 0x0b */
2003-11-08 14:21:57 +03:00
typedef struct {
dom_sid2 *sid;
} lsa_SidPtr;
typedef struct {
uint32 num_sids;
[size_is(num_sids)] lsa_SidPtr *sids;
} lsa_SidArray;
2003-11-06 15:34:04 +03:00
2003-11-09 11:30:29 +03:00
NTSTATUS lsa_EnumAccounts (
2003-11-08 14:21:57 +03:00
[in,ref] policy_handle *handle,
[in,out,ref] uint32 *resume_handle,
[in] uint32 num_entries,
[out,ref] lsa_SidArray *sids
);
2003-11-06 15:34:04 +03:00
2003-11-09 11:30:29 +03:00
/*************************************************/
/* Function: 0x0c */
NTSTATUS lsa_CreateTrustDom ();
2003-11-09 13:01:24 +03:00
2003-11-09 11:30:29 +03:00
/******************/
/* Function: 0x0d */
2003-11-09 13:01:24 +03:00
typedef struct {
lsa_Name name;
dom_sid2 *sid;
2003-11-09 14:01:39 +03:00
} lsa_DomainInformation;
2003-11-09 13:01:24 +03:00
typedef struct {
uint32 count;
2003-11-09 14:01:39 +03:00
[size_is(count)] lsa_DomainInformation *domains;
} lsa_DomainList;
2003-11-09 13:01:24 +03:00
NTSTATUS lsa_EnumTrustDom (
[in,ref] policy_handle *handle,
[in,out,ref] uint32 *resume_handle,
[in] uint32 num_entries,
2003-11-09 14:01:39 +03:00
[out,ref] lsa_DomainList *domains
2003-11-09 13:01:24 +03:00
);
2003-11-09 11:30:29 +03:00
/******************/
/* Function: 0x0e */
2003-11-09 03:58:40 +03:00
typedef struct {
uint16 sid_type;
2003-11-09 11:30:29 +03:00
uint32 rid;
2003-11-09 03:58:40 +03:00
uint32 sid_index;
2003-11-09 11:30:29 +03:00
} lsa_TranslatedSid;
2003-11-09 03:58:40 +03:00
typedef struct {
uint32 count;
2003-11-09 11:30:29 +03:00
[size_is(count)] lsa_TranslatedSid *sids;
} lsa_TransSidArray;
2003-11-09 03:58:40 +03:00
2003-11-09 14:01:39 +03:00
typedef struct {
lsa_Name name;
dom_sid2 *sid;
} lsa_TrustInformation;
typedef struct {
uint32 count;
[size_is(count)] lsa_TrustInformation *domains;
uint32 max_count;
} lsa_RefDomainList;
2003-11-09 11:30:29 +03:00
NTSTATUS lsa_LookupNames (
2003-11-09 03:58:40 +03:00
[in,ref] policy_handle *handle,
2003-11-09 11:30:29 +03:00
[in] uint32 num_names,
[in,ref,size_is(num_names)] lsa_Name *names,
2003-11-09 03:58:40 +03:00
[out] lsa_RefDomainList *domains,
2003-11-09 11:30:29 +03:00
[in,out,ref] lsa_TransSidArray *sids,
2003-11-09 03:58:40 +03:00
[in] uint16 level,
[in,out,ref] uint32 *count
);
2003-11-09 05:21:24 +03:00
2003-11-09 11:30:29 +03:00
/******************/
/* Function: 0x0f */
2003-11-09 05:21:24 +03:00
typedef struct {
uint16 sid_type;
2003-11-09 11:30:29 +03:00
lsa_Name name;
2003-11-09 05:21:24 +03:00
uint32 sid_index;
2003-11-09 11:30:29 +03:00
} lsa_TranslatedName;
2003-11-09 05:21:24 +03:00
typedef struct {
uint32 count;
2003-11-09 11:30:29 +03:00
[size_is(count)] lsa_TranslatedName *names;
} lsa_TransNameArray;
2003-11-09 05:21:24 +03:00
2003-11-09 11:30:29 +03:00
NTSTATUS lsa_LookupSids (
2003-11-09 05:21:24 +03:00
[in,ref] policy_handle *handle,
2003-11-09 11:30:29 +03:00
[in,ref] lsa_SidArray *sids,
2003-11-09 05:21:24 +03:00
[out] lsa_RefDomainList *domains,
2003-11-09 11:30:29 +03:00
[in,out,ref] lsa_TransNameArray *names,
2003-11-09 05:21:24 +03:00
[in] uint16 level,
[in,out,ref] uint32 *count
);
2003-11-09 11:30:29 +03:00
/* Function: 0x10 */
NTSTATUS CREATESECRET ();
2003-11-09 14:01:39 +03:00
/*****************************************/
/* Function: 0x11 */
NTSTATUS lsa_OpenAccount (
[in,ref] policy_handle *handle,
[in,ref] dom_sid2 *sid,
[in] uint32 desired_access,
[out,ref] policy_handle *acct_handle
);
2003-11-10 14:37:19 +03:00
/****************************************/
/* Function: 0x12 */
typedef struct {
uint32 low;
uint32 high;
} lsa_LUID;
typedef struct {
lsa_LUID luid;
uint32 attribute;
} lsa_LUIDAttribute;
typedef struct {
uint32 count;
2003-11-13 12:26:53 +03:00
uint32 unknown;
2003-11-10 14:37:19 +03:00
[size_is(count)] lsa_LUIDAttribute set[*];
} lsa_PrivilegeSet;
NTSTATUS lsa_EnumPrivsAccount (
[in,ref] policy_handle *handle,
2003-11-12 08:34:21 +03:00
[out] lsa_PrivilegeSet *privs
2003-11-10 14:37:19 +03:00
);
2003-11-09 11:30:29 +03:00
/* Function: 0x13 */
NTSTATUS ADDPRIVS ();
/* Function: 0x14 */
NTSTATUS REMOVEPRIVS ();
/* Function: 0x15 */
NTSTATUS GETQUOTAS ();
/* Function: 0x16 */
NTSTATUS SETQUOTAS ();
/* Function: 0x17 */
NTSTATUS GETSYSTEMACCOUNT ();
/* Function: 0x18 */
NTSTATUS SETSYSTEMACCOUNT ();
/* Function: 0x19 */
NTSTATUS OPENTRUSTDOM ();
/* Function: 0x1a */
NTSTATUS QUERYTRUSTDOM ();
/* Function: 0x1b */
NTSTATUS SETINFOTRUSTDOM ();
/* Function: 0x1c */
NTSTATUS OPENSECRET ();
/* Function: 0x1d */
NTSTATUS SETSECRET ();
/* Function: 0x1e */
NTSTATUS QUERYSECRET ();
2003-11-10 15:42:45 +03:00
2003-11-09 11:30:29 +03:00
/* Function: 0x1f */
NTSTATUS LOOKUPPRIVVALUE ();
2003-11-10 15:42:45 +03:00
2003-11-09 11:30:29 +03:00
/* Function: 0x20 */
2003-11-10 15:42:45 +03:00
NTSTATUS lsa_LookupPrivName (
[in,ref] policy_handle *handle,
2003-11-14 10:56:43 +03:00
[in,ref] lsa_LUID *luid,
2003-11-10 15:42:45 +03:00
[out] lsa_Name *name
);
2003-11-09 11:30:29 +03:00
/* Function: 0x21 */
NTSTATUS PRIV_GET_DISPNAME ();
/* Function: 0x22 */
NTSTATUS DELETEOBJECT ();
/* Function: 0x23 */
NTSTATUS ENUMACCTWITHRIGHT ();
2003-11-10 15:12:22 +03:00
2003-11-09 11:30:29 +03:00
/* Function: 0x24 */
2003-11-10 15:12:22 +03:00
typedef struct {
unistr *name;
} lsa_RightAttribute;
typedef struct {
uint32 count;
[size_is(count)] lsa_Name *names;
} lsa_RightSet;
NTSTATUS lsa_EnumAccountRights (
[in,ref] policy_handle *handle,
[in,ref] dom_sid2 *sid,
[out,ref] lsa_RightSet *rights
);
2003-11-09 11:30:29 +03:00
/* Function: 0x25 */
NTSTATUS ADDACCTRIGHTS ();
/* Function: 0x26 */
NTSTATUS REMOVEACCTRIGHTS ();
/* Function: 0x27 */
NTSTATUS QUERYTRUSTDOMINFO ();
/* Function: 0x28 */
NTSTATUS SETTRUSTDOMINFO ();
/* Function: 0x29 */
NTSTATUS DELETETRUSTDOM ();
/* Function: 0x2a */
NTSTATUS STOREPRIVDATA ();
/* Function: 0x2b */
NTSTATUS RETRPRIVDATA ();
/**********************/
/* Function: 0x2c */
NTSTATUS lsa_OpenPolicy2 (
[in] unistr *system_name,
[in,ref] lsa_ObjectAttribute *attr,
[in] uint32 desired_access,
[out,ref] policy_handle *handle
);
/* Function: 0x2d */
NTSTATUS UNK_GET_CONNUSER ();
/* Function: 0x2e */
NTSTATUS QUERYINFO2 ();
2003-11-28 08:20:11 +03:00
}
2003-11-09 11:30:29 +03:00
2003-11-28 08:20:11 +03:00
[
uuid(3919286a-b10c-11d0-9ba8-00c04fd92ef5)
version(0.0),
endpoints(lsarpc,lsass),
pointer_default(unique)
]
interface lsads
{
2003-11-09 11:30:29 +03:00
2003-11-28 08:20:11 +03:00
/*****************/
/* Function 0x00 */
lsads_Unknown0();
2003-11-09 11:30:29 +03:00
2003-11-06 15:34:04 +03:00
}