s4-netlogon: added IDL for netr_DsrUpdateReadOnlyServerDnsRecords
authorAndrew Tridgell <tridge@samba.org>
Thu, 16 Sep 2010 07:05:58 +0000 (17:05 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 16 Sep 2010 11:09:17 +0000 (21:09 +1000)
this is used by a RODC to do DNS updates, as TSIG updates are not
allowed by RODCs

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

librpc/idl/netlogon.idl
source3/rpc_server/srv_netlog_nt.c
source4/rpc_server/netlogon/dcerpc_netlogon.c

index 7670d345487f54633498636162f670ebb759c88b..62d2af55889659fd92c10e0922836bde14b80439 100644 (file)
@@ -1674,4 +1674,59 @@ interface netlogon
                [out,ref] samr_Password *old_owf_password,
                [out,ref] netr_TrustInfo **trust_info
                );
+
+       /****************/
+       /* Function 0x2f */
+
+       NTSTATUS netr_Unused47(void);
+
+
+       /****************/
+       /* Function 0x30 */
+
+       typedef enum {
+               NlDnsLdapAtSite       = 22,
+               NlDnsGcAtSite         = 25,
+               NlDnsDsaCname         = 28,
+               NlDnsKdcAtSite        = 30,
+               NlDnsDcAtSite         = 32,
+               NlDnsRfc1510KdcAtSite = 34,
+               NlDnsGenericGcAtSite  = 36
+       } netr_DnsType;
+
+       typedef enum {
+               NlDnsInfoTypeNone    = 0,
+               NlDnsDomainName      = 1,
+               NlDnsDomainNameAlias = 2,
+               NlDnsForestName      = 3,
+               NlDnsForestNameAlias = 4,
+               NlDnsNdncDomainName  = 5,
+               NlDnsRecordName      = 6
+       } netr_DnsDomainInfoType;
+
+       typedef struct {
+               netr_DnsType type;
+               [string,charset(UTF16)] uint16 *dns_domain_info;
+               netr_DnsDomainInfoType dns_domain_info_type;
+               uint32 priority;
+               uint32 weight;
+               uint32 port;
+               boolean32 dns_register;
+               uint32 status;
+       } NL_DNS_NAME_INFO;
+
+       typedef struct {
+               uint32 count;
+               [size_is(count)] NL_DNS_NAME_INFO *names;
+       } NL_DNS_NAME_INFO_ARRAY;
+
+       NTSTATUS netr_DsrUpdateReadOnlyServerDnsRecords(
+               [in,unique] [string,charset(UTF16)] uint16 *server_name,
+               [in,ref] [string,charset(UTF16)] uint16 *computer_name,
+               [in, ref] netr_Authenticator *credential,
+               [out,ref]   netr_Authenticator *return_authenticator,
+               [in,unique] [string,charset(UTF16)] uint16 *site_name,
+               [in] uint32 dns_ttl,
+               [in,out,ref] NL_DNS_NAME_INFO_ARRAY *dns_names
+               );
 }
index 171f30ba757fd0194b8a769c93f605ed7eedd6bf..4b692b36fce7fea5c487815fbd61d7ed3ad58e13 100644 (file)
@@ -2014,3 +2014,22 @@ NTSTATUS _netr_ServerGetTrustInfo(struct pipes_struct *p,
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
+/****************************************************************
+****************************************************************/
+
+NTSTATUS _netr_Unused47(struct pipes_struct *p,
+                       struct netr_Unused47 *r)
+{
+       p->rng_fault_state = true;
+       return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+/****************************************************************
+****************************************************************/
+
+NTSTATUS _netr_DsrUpdateReadOnlyServerDnsRecords(struct pipes_struct *p,
+                                                struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
+{
+       p->rng_fault_state = true;
+       return NT_STATUS_NOT_IMPLEMENTED;
+}
index 7dc8a76dad2d751baaccda1e2dce5797bec43c4f..21dacd399507ec808ad7cc1b5ab0e44dc7b8d928 100644 (file)
@@ -35,6 +35,7 @@
 #include "../libcli/ldap/ldap_ndr.h"
 #include "cldap_server/cldap_server.h"
 #include "lib/tsocket/tsocket.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
 
 struct netlogon_server_pipe_state {
        struct netr_Credential client_challenge;
@@ -2258,6 +2259,25 @@ static NTSTATUS dcesrv_netr_ServerGetTrustInfo(struct dcesrv_call_state *dce_cal
        DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }
 
+/*
+  netr_Unused47
+*/
+static NTSTATUS dcesrv_netr_Unused47(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                                    struct netr_Unused47 *r)
+{
+       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/*
+  netr_DsrUpdateReadOnlyServerDnsRecords
+*/
+static NTSTATUS dcesrv_netr_DsrUpdateReadOnlyServerDnsRecords(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                                                             struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
+{
+       NDR_PRINT_FUNCTION_DEBUG(netr_DsrUpdateReadOnlyServerDnsRecords, NDR_IN, r);
+       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
 
 /* include the generated boilerplate */
 #include "librpc/gen_ndr/ndr_netlogon_s.c"