diff options
author | Andrew Bartlett <abartlet@samba.org> | 2014-05-08 12:17:32 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-06-11 10:18:26 +0200 |
commit | f4ab082d2b984b7deb3afbc7a26e238aa5b3b8c3 (patch) | |
tree | 7c8cfead272ce18d074a6f47edc12d748cb6c241 /librpc | |
parent | 223fbdaf3872fe71a75fec62813b91612af73a2b (diff) | |
download | samba-f4ab082d2b984b7deb3afbc7a26e238aa5b3b8c3.tar.gz |
librpc/idl: Merge wbint.idl with winbind.idl so we can forward IRPC requests to internal winbind calls
Change-Id: Iba3913d5a1c7f851b93f37e9beb6dbb20fbf7e55
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/idl/winbind.idl | 195 | ||||
-rw-r--r-- | librpc/idl/wscript_build | 5 | ||||
-rw-r--r-- | librpc/wscript_build | 15 |
3 files changed, 215 insertions, 0 deletions
diff --git a/librpc/idl/winbind.idl b/librpc/idl/winbind.idl new file mode 100644 index 00000000000..39e89c3d814 --- /dev/null +++ b/librpc/idl/winbind.idl @@ -0,0 +1,195 @@ +#include "idl_types.h" +import "lsa.idl", "netlogon.idl", "misc.idl", "security.idl", "idmap.idl"; + +[ + uuid("bf09192c-ed60-4928-9dff-d0d7bcb03ed8"), + endpoint("ncalrpc:"), + pointer_default(unique), + version(1.0), + helpstring("winbind parent-child protocol"), + no_srv_register +] +interface winbind +{ + /* Private methods */ + + void wbint_Ping( + [in] uint32 in_data, + [out] uint32 *out_data + ); + + NTSTATUS wbint_LookupSid( + [in] dom_sid *sid, + [out] lsa_SidType *type, + [out,string,charset(UTF8)] char **domain, + [out,string,charset(UTF8)] char **name + ); + + NTSTATUS wbint_LookupSids( + [in] lsa_SidArray *sids, + [out,ref] lsa_RefDomainList *domains, + [out,ref] lsa_TransNameArray *names + ); + + 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 + ); + + typedef struct { + id_type type; + uint32 domain_index; + uint32 rid; + unixid xid; + } 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 + ); + + NTSTATUS wbint_Uid2Sid( + [in,unique,string,charset(UTF8)] char *dom_name, + [in] hyper uid, + [out] dom_sid *sid + ); + + NTSTATUS wbint_Gid2Sid( + [in,unique,string,charset(UTF8)] char *dom_name, + [in] hyper gid, + [out] dom_sid *sid + ); + + NTSTATUS wbint_AllocateUid( + [out] hyper *uid + ); + + NTSTATUS wbint_AllocateGid( + [out] hyper *gid + ); + + typedef [public] struct { + [string,charset(UTF8)] char *acct_name; + [string,charset(UTF8)] char *full_name; + [string,charset(UTF8)] char *homedir; + [string,charset(UTF8)] char *shell; + hyper primary_gid; + dom_sid user_sid; + dom_sid group_sid; + } wbint_userinfo; + + NTSTATUS wbint_QueryUser( + [in] dom_sid *sid, + [out] wbint_userinfo *info + ); + + 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 + ); + + NTSTATUS wbint_LookupUserGroups( + [in] dom_sid *sid, + [out] wbint_SidArray *sids + ); + + NTSTATUS wbint_QuerySequenceNumber( + [out] uint32 *sequence + ); + + typedef [public] struct { + dom_sid sid; + lsa_SidType type; + [string,charset(UTF8)] char *name; + } wbint_Principal; + + typedef [public] struct { + int num_principals; + [size_is(num_principals)] wbint_Principal principals[]; + } wbint_Principals; + + NTSTATUS wbint_LookupGroupMembers( + [in] dom_sid *sid, + [in] lsa_SidType type, + [out] wbint_Principals *members + ); + + typedef [public] struct { + uint32 num_userinfos; + [size_is(num_userinfos)] wbint_userinfo userinfos[]; + } wbint_userinfos; + + NTSTATUS wbint_QueryUserList( + [out] wbint_userinfos *users + ); + + NTSTATUS wbint_QueryGroupList( + [out] wbint_Principals *groups + ); + + 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 + ); + + NTSTATUS wbint_LookupRids( + [in] dom_sid *domain_sid, + [in] wbint_RidArray *rids, + [out,string,charset(UTF8)] char **domain_name, + [out] wbint_Principals *names + ); + + NTSTATUS wbint_CheckMachineAccount( + ); + + NTSTATUS wbint_ChangeMachineAccount( + ); + + NTSTATUS wbint_PingDc( + [out,string,charset(UTF8)] char **dcname + ); + + /* 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( + [in,unique] [string,charset(UTF16)] uint16 *site_name, + [in] uint32 dns_ttl, + [in,out,ref] NL_DNS_NAME_INFO_ARRAY *dns_names + ); + +} diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build index f181786d013..d1484afcda5 100644 --- a/librpc/idl/wscript_build +++ b/librpc/idl/wscript_build @@ -35,3 +35,8 @@ bld.SAMBA_PIDL_LIST('PIDL', 'dnsp.idl nfs4acl.idl', options='--header --ndr-parser --client --python', output_dir='../gen_ndr') + +bld.SAMBA_PIDL_LIST('PIDL', + 'winbind.idl', + options='--header --ndr-parser --samba3-ndr-server --client --python', + output_dir='../gen_ndr') diff --git a/librpc/wscript_build b/librpc/wscript_build index 1c2062f046e..393f57979a6 100644 --- a/librpc/wscript_build +++ b/librpc/wscript_build @@ -663,3 +663,18 @@ bld.SAMBA_LIBRARY('dcerpc-binding', pc_files=[], public_headers='rpc/rpc_common.h', vnum='0.0.1') + +bld.SAMBA_SUBSYSTEM('NDR_WINBIND', + source='gen_ndr/ndr_winbind.c', + public_deps='ndr' + ) + +bld.SAMBA_SUBSYSTEM('RPC_NDR_WINBIND', + source='gen_ndr/ndr_winbind_c.c', + public_deps='dcerpc NDR_WINBIND' + ) + +bld.SAMBA3_SUBSYSTEM('SRV_NDR_WINBIND', + source='gen_ndr/srv_winbind.c', + public_deps='NDR_WINBIND' + ) |