2009-08-03 23:44:46 +02:00
#include "idl_types.h"
2021-06-22 10:23:04 +02:00
import "lsa.idl", "netlogon.idl", "samr.idl", "misc.idl", "security.idl", "idmap.idl";
2009-08-03 23:44:46 +02:00
2009-07-28 15:06:11 -04:00
[
uuid("bf09192c-ed60-4928-9dff-d0d7bcb03ed8"),
endpoint("ncalrpc:"),
pointer_default(unique),
version(1.0),
2010-05-13 07:57:27 +10:00
helpstring("winbind parent-child protocol"),
no_srv_register
2009-07-28 15:06:11 -04:00
]
2014-05-08 12:17:32 +12:00
interface winbind
2009-07-28 15:06:11 -04:00
{
2014-05-08 12:17:32 +12:00
/* Private methods */
2022-03-09 11:56:33 +01:00
NTSTATUS wbint_Ping(
2009-07-28 15:06:11 -04:00
[in] uint32 in_data,
[out] uint32 *out_data
);
2009-08-03 23:44:46 +02:00
NTSTATUS wbint_LookupSid(
[in] dom_sid *sid,
[out] lsa_SidType *type,
[out,string,charset(UTF8)] char **domain,
[out,string,charset(UTF8)] char **name
);
2009-08-04 07:22:34 -04:00
2011-03-11 12:48:11 +01:00
NTSTATUS wbint_LookupSids(
[in] lsa_SidArray *sids,
[out,ref] lsa_RefDomainList *domains,
[out,ref] lsa_TransNameArray *names
);
2009-08-04 07:22:34 -04:00
NTSTATUS wbint_LookupName(
[in,string,charset(UTF8)] char *domain,
[in,string,charset(UTF8)] char *name,
[in] uint32 flags,
[out] lsa_SidType *type,
[out] dom_sid *sid
);
2009-08-04 13:28:59 -04:00
2011-03-23 18:18:13 +01:00
typedef struct {
2020-09-15 16:01:04 +02:00
id_type type_hint;
2011-03-23 18:18:13 +01:00
uint32 domain_index;
uint32 rid;
2012-11-18 13:51:13 +01:00
unixid xid;
2011-03-23 18:18:13 +01:00
} wbint_TransID;
typedef struct {
uint32 num_ids;
[size_is(num_ids)] wbint_TransID ids[];
} wbint_TransIDArray;
NTSTATUS wbint_Sids2UnixIDs(
[in] lsa_RefDomainList *domains,
[in,out] wbint_TransIDArray *ids
);
2015-08-20 17:07:19 +02:00
NTSTATUS wbint_UnixIDs2Sids(
2016-03-16 15:25:35 +01:00
[in,string,charset(UTF8)] char *domain_name,
2017-09-25 15:39:39 +02:00
[in] dom_sid domain_sid,
2015-08-20 17:07:19 +02:00
[in] uint32 num_ids,
2016-12-21 11:29:08 +01:00
[in,out] unixid xids[num_ids],
2015-08-20 17:07:19 +02:00
[out] dom_sid sids[num_ids]
);
2009-08-30 09:41:43 +02:00
NTSTATUS wbint_AllocateUid(
[out] hyper *uid
);
2009-08-30 09:46:34 +02:00
NTSTATUS wbint_AllocateGid(
[out] hyper *gid
);
2009-08-04 15:23:13 -04:00
typedef [public] struct {
2016-12-29 09:56:29 +00:00
[string,charset(UTF8)] char *domain_name;
2009-08-04 15:23:13 -04:00
[string,charset(UTF8)] char *acct_name;
[string,charset(UTF8)] char *full_name;
[string,charset(UTF8)] char *homedir;
[string,charset(UTF8)] char *shell;
2016-12-29 09:56:29 +00:00
hyper uid;
2009-08-04 15:23:13 -04:00
hyper primary_gid;
2016-12-29 09:56:29 +00:00
[string,charset(UTF8)] char *primary_group_name;
2009-08-04 15:23:13 -04:00
dom_sid user_sid;
dom_sid group_sid;
} wbint_userinfo;
2016-12-29 09:56:29 +00:00
NTSTATUS wbint_GetNssInfo(
[in,out] wbint_userinfo *info
);
2009-08-04 15:54:05 -04:00
typedef [public] struct {
uint32 num_sids;
[size_is(num_sids)] dom_sid sids[];
} wbint_SidArray;
typedef [public] struct {
uint32 num_rids;
[size_is(num_rids)] uint32 rids[];
} wbint_RidArray;
NTSTATUS wbint_LookupUserAliases(
[in] wbint_SidArray *sids,
[out] wbint_RidArray *rids
);
2009-08-04 16:07:01 -04:00
2017-03-02 14:55:15 +01:00
NTSTATUS wbint_LookupUserGroups(
[in] dom_sid *sid,
[out] wbint_SidArray *sids
);
2009-08-15 11:16:28 +02:00
NTSTATUS wbint_QuerySequenceNumber(
[out] uint32 *sequence
);
2009-08-16 10:58:43 +02:00
typedef [public] struct {
dom_sid sid;
lsa_SidType type;
2009-08-23 12:38:35 +02:00
[string,charset(UTF8)] char *name;
} wbint_Principal;
2009-08-16 10:58:43 +02:00
typedef [public] struct {
2018-11-23 09:03:13 +01:00
uint32 num_principals;
2009-08-23 12:43:43 +02:00
[size_is(num_principals)] wbint_Principal principals[];
} wbint_Principals;
2009-08-16 10:58:43 +02:00
NTSTATUS wbint_LookupGroupMembers(
[in] dom_sid *sid,
[in] lsa_SidType type,
2009-08-23 12:43:43 +02:00
[out] wbint_Principals *members
2009-08-16 10:58:43 +02:00
);
2009-08-17 22:40:19 +02:00
2023-03-29 14:53:14 +02:00
NTSTATUS wbint_LookupAliasMembers(
[in] dom_sid *sid,
[in] lsa_SidType type,
[out] wbint_SidArray *sids
);
2009-08-17 22:40:19 +02:00
typedef [public] struct {
uint32 num_userinfos;
[size_is(num_userinfos)] wbint_userinfo userinfos[];
} wbint_userinfos;
2009-08-27 19:54:18 +02:00
NTSTATUS wbint_QueryGroupList(
[out] wbint_Principals *groups
);
2016-12-29 18:13:28 +00:00
NTSTATUS wbint_QueryUserRidList(
[out] wbint_RidArray *rids
);
2009-08-25 22:13:34 +02:00
NTSTATUS wbint_DsGetDcName(
[in,string,charset(UTF8)] char *domain_name,
[in,unique] GUID *domain_guid,
[in,string,unique,charset(UTF8)] char *site_name,
[in] uint32 flags,
[out] netr_DsRGetDCNameInfo **dc_info
);
2009-08-27 17:11:24 +02:00
NTSTATUS wbint_LookupRids(
2011-06-27 14:34:39 +02:00
[in] dom_sid *domain_sid,
2009-08-27 17:11:24 +02:00
[in] wbint_RidArray *rids,
2010-12-04 20:16:00 +01:00
[out,string,charset(UTF8)] char **domain_name,
2009-08-27 17:11:24 +02:00
[out] wbint_Principals *names
);
2009-09-06 09:32:34 +02:00
NTSTATUS wbint_CheckMachineAccount(
);
2009-09-06 14:47:06 +02:00
2009-10-06 18:26:33 +02:00
NTSTATUS wbint_ChangeMachineAccount(
2022-11-22 16:09:34 +01:00
[in,unique,string,charset(UTF8)] char *dcname
2009-10-06 18:26:33 +02:00
);
2009-12-21 21:50:43 +01:00
NTSTATUS wbint_PingDc(
2012-08-10 08:10:42 -07:00
[out,string,charset(UTF8)] char **dcname
2009-12-21 21:50:43 +01:00
);
2014-05-06 17:00:09 +12:00
2021-06-04 15:36:16 +02:00
NTSTATUS wbint_ListTrustedDomains(
[in,string,charset(UTF8)] char *client_name,
[in] hyper client_pid,
[out,ref] netr_DomainTrustList *domains
);
2021-06-14 19:13:48 +02:00
typedef [public] struct {
uint16 level;
[switch_is(level)] netr_Validation *validation;
[string,charset(UTF8)] char *krb5ccname;
} wbint_Validation;
typedef [public] struct {
[string,charset(UTF8)] char *username;
[string,charset(UTF8),flag(NDR_SECRET)] char *password;
[string,charset(UTF8)] char *krb5_cc_type;
hyper uid;
} wbint_AuthUserInfo;
NTSTATUS wbint_PamAuth(
[in,string,charset(UTF8)] char *client_name,
[in] hyper client_pid,
[in] uint32 flags,
[in] wbint_AuthUserInfo *info,
[in] wbint_SidArray *require_membership_of_sid,
[out,ref] wbint_Validation *validation
);
2022-02-25 11:32:14 +01:00
typedef [public] struct {
uint16 level;
[switch_is(level)] netr_Validation *validation;
} wbint_PamAuthCrapValidation;
NTSTATUS wbint_PamAuthCrap(
[in,string,charset(UTF8)] char *client_name,
[in] hyper client_pid,
[in] uint32 flags,
[in, string,charset(UTF8)] char *user,
[in, string,charset(UTF8)] char *domain,
[in, string,charset(UTF8)] char *workstation,
2022-05-17 18:25:38 +02:00
[in,flag(NDR_SECRET)] DATA_BLOB lm_resp,
[in,flag(NDR_SECRET)] DATA_BLOB nt_resp,
[in,flag(NDR_SECRET)] DATA_BLOB chal,
2022-02-25 11:32:14 +01:00
[in] uint32 logon_parameters,
[in] wbint_SidArray *require_membership_of_sid,
[out,ref] uint8 *authoritative,
[out,ref] wbint_PamAuthCrapValidation *validation
);
2021-06-16 17:39:02 +02:00
NTSTATUS wbint_PamLogOff(
[in,string,charset(UTF8)] char *client_name,
[in] hyper client_pid,
[in] uint32 flags,
[in,string,charset(UTF8)] char *user,
[in,string,charset(UTF8)] char *krb5ccname,
[in] hyper uid
);
2021-06-21 13:51:53 +02:00
NTSTATUS wbint_PamAuthCrapChangePassword(
[in,string,charset(UTF8)] char *client_name,
[in] hyper client_pid,
[in,string,charset(UTF8)] char *user,
[in,string,charset(UTF8)] char *domain,
[in,flag(NDR_SECRET)] DATA_BLOB new_nt_pswd,
[in,flag(NDR_SECRET)] DATA_BLOB old_nt_hash_enc,
[in,flag(NDR_SECRET)] DATA_BLOB new_lm_pswd,
[in,flag(NDR_SECRET)] DATA_BLOB old_lm_hash_enc
);
2021-06-22 10:23:04 +02:00
NTSTATUS wbint_PamAuthChangePassword(
[in,string,charset(UTF8)] char *client_name,
[in] hyper client_pid,
[in] uint32 flags,
[in,string,charset(UTF8)] char *user,
[in,string,charset(UTF8),flag(NDR_SECRET)] char *old_password,
[in,string,charset(UTF8),flag(NDR_SECRET)] char *new_password,
[out,ref] samr_DomInfo1 **dominfo,
[out,ref] samPwdChangeReason *reject_reason
);
2022-02-28 17:16:23 +01:00
typedef [enum16bit] enum {
WB_DOMINFO_DOMAIN_UNKNOWN = 0x0000,
WB_DOMINFO_DOMAIN_NATIVE = 0x0001,
WB_DOMINFO_DOMAIN_AD = 0x0002,
WB_DOMINFO_DOMAIN_PRIMARY = 0x0004,
WB_DOMINFO_DOMAIN_OFFLINE = 0x0008
} DomainInfoFlags;
NTSTATUS wbint_InitConnection(
[in,string,charset(UTF8)] char *dcname,
[out,string,charset(UTF8)] char **name,
[out,string,charset(UTF8)] char **alt_name,
[out,ref] dom_sid *sid,
[out,ref] DomainInfoFlags *flags
);
2014-05-08 12:17:32 +12:00
/* Public methods available via IRPC */
typedef [switch_type(uint16)] union netr_LogonLevel netr_LogonLevel;
typedef [switch_type(uint16)] union netr_Validation netr_Validation;
/*
* do a netr_LogonSamLogon() against the right DC
*/
NTSTATUS winbind_SamLogon(
[in] uint16 logon_level,
[in] [switch_is(logon_level)] netr_LogonLevel logon,
[in] uint16 validation_level,
[out] [switch_is(validation_level)] netr_Validation validation,
[out] uint8 authoritative
);
NTSTATUS winbind_DsrUpdateReadOnlyServerDnsRecords(
2014-05-06 17:00:09 +12:00
[in,unique] [string,charset(UTF16)] uint16 *site_name,
[in] uint32 dns_ttl,
[in,out,ref] NL_DNS_NAME_INFO_ARRAY *dns_names
);
2014-05-08 12:17:32 +12:00
2014-12-19 10:36:29 +01:00
/*
* do a netr_LogonControl2Ex() against the right DC
*/
typedef [v1_enum] enum netr_LogonControlCode netr_LogonControlCode;
typedef [switch_type(netr_LogonControlCode)] union netr_CONTROL_DATA_INFORMATION netr_CONTROL_DATA_INFORMATION;
typedef [switch_type(uint32)] union netr_CONTROL_QUERY_INFORMATION netr_CONTROL_QUERY_INFORMATION;
WERROR winbind_LogonControl(
[in] netr_LogonControlCode function_code,
[in] uint32 level,
[in,ref][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION *data,
[out,ref][switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
);
2015-01-23 13:07:14 +01:00
/*
* do a netr_GetForestTrustInformation() against the right DC
*/
WERROR winbind_GetForestTrustInformation(
[in,unique] [string,charset(UTF16)] uint16 *trusted_domain_name,
[in] uint32 flags,
[out,ref] lsa_ForestTrustInformation **forest_trust_info
);
2017-04-11 15:51:50 +12:00
NTSTATUS winbind_SendToSam(
[in] netr_SendToSamBase message
);
2009-10-06 18:26:33 +02:00
}