summaryrefslogtreecommitdiff
path: root/source3/librpc/ndr
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc/ndr')
-rw-r--r--source3/librpc/ndr/ndr_misc.c24
-rw-r--r--source3/librpc/ndr/ndr_sec.h8
-rw-r--r--source3/librpc/ndr/ndr_sec_helper.c112
-rw-r--r--source3/librpc/ndr/sid.c44
4 files changed, 94 insertions, 94 deletions
diff --git a/source3/librpc/ndr/ndr_misc.c b/source3/librpc/ndr/ndr_misc.c
index c93e527848..2ca0cf08e8 100644
--- a/source3/librpc/ndr/ndr_misc.c
+++ b/source3/librpc/ndr/ndr_misc.c
@@ -24,7 +24,7 @@
#include "includes.h"
-NTSTATUS ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, const struct GUID *r)
+enum ndr_err_code ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, const struct GUID *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -36,10 +36,10 @@ NTSTATUS ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, const struct GUID *r
}
if (ndr_flags & NDR_BUFFERS) {
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, struct GUID *r)
+enum ndr_err_code ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, struct GUID *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -51,7 +51,7 @@ NTSTATUS ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, struct GUID *r)
}
if (ndr_flags & NDR_BUFFERS) {
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
size_t ndr_size_GUID(const struct GUID *r, int flags)
@@ -78,7 +78,7 @@ void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *
ndr->print(ndr, "%-25s: %s", name, GUID_string(ndr, guid));
}
-NTSTATUS ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r)
+enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -87,10 +87,10 @@ NTSTATUS ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struc
}
if (ndr_flags & NDR_BUFFERS) {
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r)
+enum ndr_err_code ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -99,7 +99,7 @@ NTSTATUS ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct poli
}
if (ndr_flags & NDR_BUFFERS) {
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r)
@@ -111,7 +111,7 @@ void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const stru
ndr->depth--;
}
-NTSTATUS ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r)
+enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -124,10 +124,10 @@ NTSTATUS ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct se
}
if (ndr_flags & NDR_BUFFERS) {
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r)
+enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r)
{
if (ndr_flags & NDR_SCALARS) {
uint32_t pid;
@@ -140,7 +140,7 @@ NTSTATUS ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_i
}
if (ndr_flags & NDR_BUFFERS) {
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r)
diff --git a/source3/librpc/ndr/ndr_sec.h b/source3/librpc/ndr/ndr_sec.h
index 0858eac72c..8034367223 100644
--- a/source3/librpc/ndr/ndr_sec.h
+++ b/source3/librpc/ndr/ndr_sec.h
@@ -24,10 +24,10 @@ char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
/* The following definitions come from librpc/ndr/ndr_sec.c */
-NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
-NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
-NTSTATUS ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
-NTSTATUS ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
+enum ndr_err_code ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
+enum ndr_err_code ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
+enum ndr_err_code ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
+enum ndr_err_code ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
#undef _PRINTF_ATTRIBUTE
#define _PRINTF_ATTRIBUTE(a1, a2)
diff --git a/source3/librpc/ndr/ndr_sec_helper.c b/source3/librpc/ndr/ndr_sec_helper.c
index a94f4873d0..d1938b9588 100644
--- a/source3/librpc/ndr/ndr_sec_helper.c
+++ b/source3/librpc/ndr/ndr_sec_helper.c
@@ -90,18 +90,18 @@ void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct d
ndr_print_dom_sid(ndr, name, sid);
}
-static NTSTATUS ndr_push_security_ace_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r)
+static enum ndr_err_code ndr_push_security_ace_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r)
{
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-static NTSTATUS ndr_pull_security_ace_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
+static enum ndr_err_code ndr_pull_security_ace_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
{
uint8_t v;
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
*r = v;
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *name, uint8_t r)
@@ -119,18 +119,18 @@ void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *name, uint8
ndr->depth--;
}
-static NTSTATUS ndr_push_security_ace_type(struct ndr_push *ndr, int ndr_flags, enum security_ace_type r)
+static enum ndr_err_code ndr_push_security_ace_type(struct ndr_push *ndr, int ndr_flags, enum security_ace_type r)
{
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-static NTSTATUS ndr_pull_security_ace_type(struct ndr_pull *ndr, int ndr_flags, enum security_ace_type *r)
+static enum ndr_err_code ndr_pull_security_ace_type(struct ndr_pull *ndr, int ndr_flags, enum security_ace_type *r)
{
uint8_t v;
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
*r = (enum security_ace_type)v;
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_ace_type(struct ndr_print *ndr, const char *name, enum security_ace_type r)
@@ -151,18 +151,18 @@ void ndr_print_security_ace_type(struct ndr_print *ndr, const char *name, enum s
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-static NTSTATUS ndr_push_security_ace_object_flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+static enum ndr_err_code ndr_push_security_ace_object_flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-static NTSTATUS ndr_pull_security_ace_object_flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+static enum ndr_err_code ndr_pull_security_ace_object_flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
*r = v;
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_ace_object_flags(struct ndr_print *ndr, const char *name, uint32_t r)
@@ -174,7 +174,7 @@ void ndr_print_security_ace_object_flags(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-static NTSTATUS ndr_push_security_ace_object_type(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_type *r)
+static enum ndr_err_code ndr_push_security_ace_object_type(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_type *r)
{
int level;
level = ndr_push_get_switch_value(ndr, r);
@@ -199,10 +199,10 @@ static NTSTATUS ndr_push_security_ace_object_type(struct ndr_push *ndr, int ndr_
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-static NTSTATUS ndr_pull_security_ace_object_type(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_type *r)
+static enum ndr_err_code ndr_pull_security_ace_object_type(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_type *r)
{
int level;
level = ndr_pull_get_switch_value(ndr, r);
@@ -227,7 +227,7 @@ static NTSTATUS ndr_pull_security_ace_object_type(struct ndr_pull *ndr, int ndr_
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_ace_object_type(struct ndr_print *ndr, const char *name, const union security_ace_object_type *r)
@@ -246,7 +246,7 @@ void ndr_print_security_ace_object_type(struct ndr_print *ndr, const char *name,
}
}
-static NTSTATUS ndr_push_security_ace_object_inherited_type(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_inherited_type *r)
+static enum ndr_err_code ndr_push_security_ace_object_inherited_type(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_inherited_type *r)
{
int level;
level = ndr_push_get_switch_value(ndr, r);
@@ -271,10 +271,10 @@ static NTSTATUS ndr_push_security_ace_object_inherited_type(struct ndr_push *ndr
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-static NTSTATUS ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_inherited_type *r)
+static enum ndr_err_code ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_inherited_type *r)
{
int level;
level = ndr_pull_get_switch_value(ndr, r);
@@ -299,7 +299,7 @@ static NTSTATUS ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_ace_object_inherited_type(struct ndr_print *ndr, const char *name, const union security_ace_object_inherited_type *r)
@@ -318,7 +318,7 @@ void ndr_print_security_ace_object_inherited_type(struct ndr_print *ndr, const c
}
}
-static NTSTATUS ndr_push_security_ace_object(struct ndr_push *ndr, int ndr_flags, const struct security_ace_object *r)
+static enum ndr_err_code ndr_push_security_ace_object(struct ndr_push *ndr, int ndr_flags, const struct security_ace_object *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -332,10 +332,10 @@ static NTSTATUS ndr_push_security_ace_object(struct ndr_push *ndr, int ndr_flags
NDR_CHECK(ndr_push_security_ace_object_type(ndr, NDR_BUFFERS, &r->type));
NDR_CHECK(ndr_push_security_ace_object_inherited_type(ndr, NDR_BUFFERS, &r->inherited_type));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-static NTSTATUS ndr_pull_security_ace_object(struct ndr_pull *ndr, int ndr_flags, struct security_ace_object *r)
+static enum ndr_err_code ndr_pull_security_ace_object(struct ndr_pull *ndr, int ndr_flags, struct security_ace_object *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -349,7 +349,7 @@ static NTSTATUS ndr_pull_security_ace_object(struct ndr_pull *ndr, int ndr_flags
NDR_CHECK(ndr_pull_security_ace_object_type(ndr, NDR_BUFFERS, &r->type));
NDR_CHECK(ndr_pull_security_ace_object_inherited_type(ndr, NDR_BUFFERS, &r->inherited_type));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_ace_object(struct ndr_print *ndr, const char *name, const struct security_ace_object *r)
@@ -364,7 +364,7 @@ void ndr_print_security_ace_object(struct ndr_print *ndr, const char *name, cons
ndr->depth--;
}
-static NTSTATUS ndr_push_security_ace_object_ctr(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_ctr *r)
+static enum ndr_err_code ndr_push_security_ace_object_ctr(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_ctr *r)
{
int level;
level = ndr_push_get_switch_value(ndr, r);
@@ -414,10 +414,10 @@ static NTSTATUS ndr_push_security_ace_object_ctr(struct ndr_push *ndr, int ndr_f
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-static NTSTATUS ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_ctr *r)
+static enum ndr_err_code ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_ctr *r)
{
int level;
level = ndr_pull_get_switch_value(ndr, r);
@@ -467,7 +467,7 @@ static NTSTATUS ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, int ndr_f
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_ace_object_ctr(struct ndr_print *ndr, const char *name, const union security_ace_object_ctr *r)
@@ -498,7 +498,7 @@ void ndr_print_security_ace_object_ctr(struct ndr_print *ndr, const char *name,
}
}
-NTSTATUS ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r)
+enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -513,10 +513,10 @@ NTSTATUS ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r)
+enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -531,7 +531,7 @@ NTSTATUS ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct secur
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_pull_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struct security_ace *r)
@@ -548,18 +548,18 @@ void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struc
ndr->depth--;
}
-static NTSTATUS ndr_push_security_acl_revision(struct ndr_push *ndr, int ndr_flags, enum security_acl_revision r)
+static enum ndr_err_code ndr_push_security_acl_revision(struct ndr_push *ndr, int ndr_flags, enum security_acl_revision r)
{
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-static NTSTATUS ndr_pull_security_acl_revision(struct ndr_pull *ndr, int ndr_flags, enum security_acl_revision *r)
+static enum ndr_err_code ndr_pull_security_acl_revision(struct ndr_pull *ndr, int ndr_flags, enum security_acl_revision *r)
{
uint16_t v;
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
*r = (enum security_acl_revision)v;
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_acl_revision(struct ndr_print *ndr, const char *name, enum security_acl_revision r)
@@ -573,7 +573,7 @@ void ndr_print_security_acl_revision(struct ndr_print *ndr, const char *name, en
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_security_acl(struct ndr_push *ndr, int ndr_flags, const struct security_acl *r)
+enum ndr_err_code ndr_push_security_acl(struct ndr_push *ndr, int ndr_flags, const struct security_acl *r)
{
uint32_t cntr_aces_0;
if (ndr_flags & NDR_SCALARS) {
@@ -590,10 +590,10 @@ NTSTATUS ndr_push_security_acl(struct ndr_push *ndr, int ndr_flags, const struct
NDR_CHECK(ndr_push_security_ace(ndr, NDR_BUFFERS, &r->aces[cntr_aces_0]));
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct security_acl *r)
+enum ndr_err_code ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct security_acl *r)
{
uint32_t cntr_aces_0;
TALLOC_CTX *_mem_save_aces_0;
@@ -621,7 +621,7 @@ NTSTATUS ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct secur
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aces_0, 0);
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_acl(struct ndr_print *ndr, const char *name, const struct security_acl *r)
@@ -646,18 +646,18 @@ void ndr_print_security_acl(struct ndr_print *ndr, const char *name, const struc
ndr->depth--;
}
-static NTSTATUS ndr_push_security_descriptor_revision(struct ndr_push *ndr, int ndr_flags, enum security_descriptor_revision r)
+static enum ndr_err_code ndr_push_security_descriptor_revision(struct ndr_push *ndr, int ndr_flags, enum security_descriptor_revision r)
{
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-static NTSTATUS ndr_pull_security_descriptor_revision(struct ndr_pull *ndr, int ndr_flags, enum security_descriptor_revision *r)
+static enum ndr_err_code ndr_pull_security_descriptor_revision(struct ndr_pull *ndr, int ndr_flags, enum security_descriptor_revision *r)
{
uint8_t v;
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
*r = (enum security_descriptor_revision)v;
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_descriptor_revision(struct ndr_print *ndr, const char *name, enum security_descriptor_revision r)
@@ -670,18 +670,18 @@ void ndr_print_security_descriptor_revision(struct ndr_print *ndr, const char *n
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-static NTSTATUS ndr_push_security_descriptor_type(struct ndr_push *ndr, int ndr_flags, uint16_t r)
+static enum ndr_err_code ndr_push_security_descriptor_type(struct ndr_push *ndr, int ndr_flags, uint16_t r)
{
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-static NTSTATUS ndr_pull_security_descriptor_type(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
+static enum ndr_err_code ndr_pull_security_descriptor_type(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
{
uint16_t v;
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
*r = v;
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_descriptor_type(struct ndr_print *ndr, const char *name, uint16_t r)
@@ -707,7 +707,7 @@ void ndr_print_security_descriptor_type(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_security_descriptor(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor *r)
+enum ndr_err_code ndr_push_security_descriptor(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor *r)
{
{
uint32_t _flags_save_STRUCT = ndr->flags;
@@ -741,10 +741,10 @@ NTSTATUS ndr_push_security_descriptor(struct ndr_push *ndr, int ndr_flags, const
}
ndr->flags = _flags_save_STRUCT;
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r)
+enum ndr_err_code ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r)
{
uint32_t _ptr_owner_sid;
TALLOC_CTX *_mem_save_owner_sid_0;
@@ -834,7 +834,7 @@ NTSTATUS ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struc
}
ndr->flags = _flags_save_STRUCT;
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_descriptor(struct ndr_print *ndr, const char *name, const struct security_descriptor *r)
@@ -875,18 +875,18 @@ void ndr_print_security_descriptor(struct ndr_print *ndr, const char *name, cons
}
}
-NTSTATUS ndr_push_security_secinfo(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+enum ndr_err_code ndr_push_security_secinfo(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_security_secinfo(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+enum ndr_err_code ndr_pull_security_secinfo(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
*r = v;
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name, uint32_t r)
diff --git a/source3/librpc/ndr/sid.c b/source3/librpc/ndr/sid.c
index c5757c4d5c..b621f2485b 100644
--- a/source3/librpc/ndr/sid.c
+++ b/source3/librpc/ndr/sid.c
@@ -21,7 +21,7 @@
#include "includes.h"
-NTSTATUS ndr_push_dom_sid(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *r)
+enum ndr_err_code ndr_push_dom_sid(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *r)
{
uint32_t cntr_sub_auths_0;
if (ndr_flags & NDR_SCALARS) {
@@ -35,10 +35,10 @@ NTSTATUS ndr_push_dom_sid(struct ndr_push *ndr, int ndr_flags, const struct dom_
}
if (ndr_flags & NDR_BUFFERS) {
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *r)
+enum ndr_err_code ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *r)
{
uint32_t cntr_sub_auths_0;
if (ndr_flags & NDR_SCALARS) {
@@ -55,7 +55,7 @@ NTSTATUS ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *r
}
if (ndr_flags & NDR_BUFFERS) {
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
/*
@@ -93,11 +93,11 @@ char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
/*
parse a dom_sid2 - this is a dom_sid but with an extra copy of the num_auths field
*/
-NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid)
+enum ndr_err_code ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid)
{
uint32_t num_auths;
if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &num_auths));
NDR_CHECK(ndr_pull_dom_sid(ndr, ndr_flags, sid));
@@ -106,16 +106,16 @@ NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *
"Bad array size %u should exceed %u",
num_auths, sid->num_auths);
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
/*
parse a dom_sid2 - this is a dom_sid but with an extra copy of the num_auths field
*/
-NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid)
+enum ndr_err_code ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid)
{
if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, sid->num_auths));
return ndr_push_dom_sid(ndr, ndr_flags, sid);
@@ -124,17 +124,17 @@ NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom
/*
parse a dom_sid28 - this is a dom_sid in a fixed 28 byte buffer, so we need to ensure there are only upto 5 sub_auth
*/
-NTSTATUS ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid)
+enum ndr_err_code ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid)
{
- NTSTATUS status;
+ enum ndr_err_code status;
struct ndr_pull *subndr;
if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
subndr = talloc_zero(ndr, struct ndr_pull);
- NT_STATUS_HAVE_NO_MEMORY(subndr);
+ NDR_ERR_HAVE_NO_MEMORY(subndr);
subndr->flags = ndr->flags;
subndr->current_mem_ctx = ndr->current_mem_ctx;
@@ -145,24 +145,24 @@ NTSTATUS ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid
NDR_CHECK(ndr_pull_advance(ndr, 28));
status = ndr_pull_dom_sid(subndr, ndr_flags, sid);
- if (!NT_STATUS_IS_OK(status)) {
+ if (!NDR_ERR_CODE_IS_SUCCESS(status)) {
/* handle a w2k bug which send random data in the buffer */
ZERO_STRUCTP(sid);
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
/*
push a dom_sid28 - this is a dom_sid in a 28 byte fixed buffer
*/
-NTSTATUS ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid)
+enum ndr_err_code ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid)
{
uint32_t old_offset;
uint32_t padding;
if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
if (sid->num_auths > 5) {
@@ -180,10 +180,10 @@ NTSTATUS ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct do
NDR_CHECK(ndr_push_zero(ndr, padding));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_flags, const struct sec_desc_buf *r)
+enum ndr_err_code ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_flags, const struct sec_desc_buf *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -200,10 +200,10 @@ NTSTATUS ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_flags, const struct
}
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r)
+enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r)
{
uint32_t _ptr_sd;
TALLOC_CTX *_mem_save_sd_0;
@@ -233,7 +233,7 @@ NTSTATUS ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_d
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, 0);
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, const struct sec_desc_buf *r)