diff options
-rw-r--r-- | source3/lib/netapi/getdc.c | 4 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_netlogon.c | 9 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_netlogon.h | 3 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_netlogon.c | 10 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/netlogon.h | 6 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_netlogon.h | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 2 |
7 files changed, 25 insertions, 11 deletions
diff --git a/source3/lib/netapi/getdc.c b/source3/lib/netapi/getdc.c index 1084ddc3c8..2626eb0af4 100644 --- a/source3/lib/netapi/getdc.c +++ b/source3/lib/netapi/getdc.c @@ -69,8 +69,8 @@ static WERROR NetGetDCNameRemote(struct libnetapi_ctx *ctx, status = rpccli_netr_GetDcName(pipe_cli, ctx, server_name, domain_name, - (const char **)buffer); - werr = ntstatus_to_werror(status); + (const char **)buffer, + &werr); done: if (cli) { cli_shutdown(cli); diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index 8bed385414..cac3962073 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -598,7 +598,8 @@ NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, - const char **dcname) + const char **dcname, + WERROR *werror) { struct netr_GetDcName r; NTSTATUS status; @@ -634,7 +635,11 @@ NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, *dcname = *r.out.dcname; /* Return result */ - return r.out.result; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index d98b87a8ba..fa043233ea 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -107,7 +107,8 @@ NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, - const char **dcname); + const char **dcname, + WERROR *werror); NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 619f08a781..2d41a2675e 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -6030,6 +6030,8 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const cha ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ONLY_LDAP_NEEDED", DS_ONLY_LDAP_NEEDED, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_FLAT_NAME", DS_IS_FLAT_NAME, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_DNS_NAME", DS_IS_DNS_NAME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_TRY_NEXTCLOSEST_SITE", DS_TRY_NEXTCLOSEST_SITE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_6_REQUIRED", DS_DIRECTORY_SERVICE_6_REQUIRED, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_DNS_NAME", DS_RETURN_DNS_NAME, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_FLAT_NAME", DS_RETURN_FLAT_NAME, r); ndr->depth--; @@ -6088,6 +6090,8 @@ _PUBLIC_ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_WRITABLE", DS_SERVER_WRITABLE, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_GOOD_TIMESERV", DS_SERVER_GOOD_TIMESERV, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_NDNC", DS_SERVER_NDNC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_SELECT_SECRET_DOMAIN_6", DS_SERVER_SELECT_SECRET_DOMAIN_6, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_FULL_SECRET_DOMAIN_6", DS_SERVER_FULL_SECRET_DOMAIN_6, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_CONTROLLER", DS_DNS_CONTROLLER, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_DOMAIN", DS_DNS_DOMAIN, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_FOREST", DS_DNS_FOREST, r); @@ -9781,7 +9785,7 @@ static enum ndr_err_code ndr_push_netr_GetDcName(struct ndr_push *ndr, int flags NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -9838,7 +9842,7 @@ static enum ndr_err_code ndr_pull_netr_GetDcName(struct ndr_pull *ndr, int flags NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t))); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -9872,7 +9876,7 @@ _PUBLIC_ void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name, ndr_print_string(ndr, "dcname", *r->out.dcname); ndr->depth--; ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index f59d93764f..c8f3c03c79 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -643,6 +643,8 @@ struct netr_Blob { #define DS_ONLY_LDAP_NEEDED ( 0x00008000 ) #define DS_IS_FLAT_NAME ( 0x00010000 ) #define DS_IS_DNS_NAME ( 0x00020000 ) +#define DS_TRY_NEXTCLOSEST_SITE ( 0x00040000 ) +#define DS_DIRECTORY_SERVICE_6_REQUIRED ( 0x00080000 ) #define DS_RETURN_DNS_NAME ( 0x40000000 ) #define DS_RETURN_FLAT_NAME ( 0x80000000 ) @@ -670,6 +672,8 @@ enum netr_DsRGetDCNameInfo_AddressType #define DS_SERVER_WRITABLE ( 0x00000100 ) #define DS_SERVER_GOOD_TIMESERV ( 0x00000200 ) #define DS_SERVER_NDNC ( 0x00000400 ) +#define DS_SERVER_SELECT_SECRET_DOMAIN_6 ( 0x00000800 ) +#define DS_SERVER_FULL_SECRET_DOMAIN_6 ( 0x00001000 ) #define DS_DNS_CONTROLLER ( 0x20000000 ) #define DS_DNS_DOMAIN ( 0x40000000 ) #define DS_DNS_FOREST ( 0x80000000 ) @@ -1027,7 +1031,7 @@ struct netr_GetDcName { struct { const char **dcname;/* [ref,charset(UTF16)] */ - NTSTATUS result; + WERROR result; } out; }; diff --git a/source3/librpc/gen_ndr/srv_netlogon.h b/source3/librpc/gen_ndr/srv_netlogon.h index 085672d91d..1fe16c603b 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.h +++ b/source3/librpc/gen_ndr/srv_netlogon.h @@ -12,7 +12,7 @@ NTSTATUS _netr_DatabaseDeltas(pipes_struct *p, struct netr_DatabaseDeltas *r); NTSTATUS _netr_DatabaseSync(pipes_struct *p, struct netr_DatabaseSync *r); NTSTATUS _netr_AccountDeltas(pipes_struct *p, struct netr_AccountDeltas *r); NTSTATUS _netr_AccountSync(pipes_struct *p, struct netr_AccountSync *r); -NTSTATUS _netr_GetDcName(pipes_struct *p, struct netr_GetDcName *r); +WERROR _netr_GetDcName(pipes_struct *p, struct netr_GetDcName *r); WERROR _netr_LogonControl(pipes_struct *p, struct netr_LogonControl *r); WERROR _netr_GetAnyDCName(pipes_struct *p, struct netr_GetAnyDCName *r); WERROR _netr_LogonControl2(pipes_struct *p, struct netr_LogonControl2 *r); diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 986fe9a62e..cf5e1a9ead 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -552,7 +552,7 @@ NTSTATUS _samr_Close(pipes_struct *p, struct samr_Close *r) return NT_STATUS_INVALID_HANDLE; } - ZERO_STRUCT(r->out.handle); + ZERO_STRUCTP(r->out.handle); return NT_STATUS_OK; } |