summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-08 09:43:21 +0100
committerGünther Deschner <gd@samba.org>2008-02-08 09:43:21 +0100
commit61fec2ccff64fd31a345ace75f10bac9e9f28084 (patch)
treefefdf3986b3c1ec164b522c6a23191a2dd6d0fa5 /source3
parentbdb7c0213e32ecce5532c0ed127dc78aac80fdbf (diff)
downloadsamba-61fec2ccff64fd31a345ace75f10bac9e9f28084.tar.gz
samba-61fec2ccff64fd31a345ace75f10bac9e9f28084.tar.bz2
samba-61fec2ccff64fd31a345ace75f10bac9e9f28084.zip
Re-run make idl.
Guenther (This used to be commit a415a2a3f081b1d83c2af9d6cd44edbce1d2cb6d)
Diffstat (limited to 'source3')
-rw-r--r--source3/librpc/gen_ndr/cli_samr.c6
-rw-r--r--source3/librpc/gen_ndr/cli_samr.h2
-rw-r--r--source3/librpc/gen_ndr/ndr_samr.c186
-rw-r--r--source3/librpc/gen_ndr/ndr_samr.h7
-rw-r--r--source3/librpc/gen_ndr/samr.h18
-rw-r--r--source3/librpc/gen_ndr/srv_samr.c2
6 files changed, 150 insertions, 71 deletions
diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c
index b98c89c4a8..c3cb5ad273 100644
--- a/source3/librpc/gen_ndr/cli_samr.c
+++ b/source3/librpc/gen_ndr/cli_samr.c
@@ -584,7 +584,7 @@ NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli,
uint32_t *resume_handle,
uint32_t acct_flags,
uint32_t max_size,
- struct samr_SamArray *sam,
+ struct samr_SamArray **sam,
uint32_t *num_entries)
{
struct samr_EnumDomainUsers r;
@@ -621,9 +621,7 @@ NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli,
/* Return variables */
*resume_handle = *r.out.resume_handle;
- if (sam && r.out.sam) {
- *sam = *r.out.sam;
- }
+ *sam = *r.out.sam;
*num_entries = *r.out.num_entries;
/* Return result */
diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h
index 3e2029ec35..5df5e3a70c 100644
--- a/source3/librpc/gen_ndr/cli_samr.h
+++ b/source3/librpc/gen_ndr/cli_samr.h
@@ -77,7 +77,7 @@ NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli,
uint32_t *resume_handle,
uint32_t acct_flags,
uint32_t max_size,
- struct samr_SamArray *sam,
+ struct samr_SamArray **sam,
uint32_t *num_entries);
NTSTATUS rpccli_samr_CreateDomAlias(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c
index 5848e3b800..f257c17864 100644
--- a/source3/librpc/gen_ndr/ndr_samr.c
+++ b/source3/librpc/gen_ndr/ndr_samr.c
@@ -2529,6 +2529,90 @@ _PUBLIC_ void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
+_PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r)
+{
+ ndr_print_struct(ndr, name, "samr_Password");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "hash", r->hash, 16);
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
+static enum ndr_err_code ndr_push_samr_UserInfo18(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo18 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lm_pwd));
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->nt_pwd));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_pwd_active));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_pwd_active));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_samr_UserInfo18(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo18 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lm_pwd));
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->nt_pwd));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_pwd_active));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_pwd_active));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r)
+{
+ ndr_print_struct(ndr, name, "samr_UserInfo18");
+ ndr->depth++;
+ ndr_print_samr_Password(ndr, "lm_pwd", &r->lm_pwd);
+ ndr_print_samr_Password(ndr, "nt_pwd", &r->nt_pwd);
+ ndr_print_uint8(ndr, "lm_pwd_active", r->lm_pwd_active);
+ ndr_print_uint8(ndr, "nt_pwd_active", r->nt_pwd_active);
+ ndr->depth--;
+}
+
static enum ndr_err_code ndr_push_samr_UserInfo20(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo20 *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -3092,6 +3176,10 @@ static enum ndr_err_code ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_fl
NDR_CHECK(ndr_push_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17));
break;
+ case 18:
+ NDR_CHECK(ndr_push_samr_UserInfo18(ndr, NDR_SCALARS, &r->info18));
+ break;
+
case 20:
NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20));
break;
@@ -3184,6 +3272,9 @@ static enum ndr_err_code ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_fl
case 17:
break;
+ case 18:
+ break;
+
case 20:
NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20));
break;
@@ -3288,6 +3379,10 @@ static enum ndr_err_code ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_fl
NDR_CHECK(ndr_pull_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17));
break; }
+ case 18: {
+ NDR_CHECK(ndr_pull_samr_UserInfo18(ndr, NDR_SCALARS, &r->info18));
+ break; }
+
case 20: {
NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20));
break; }
@@ -3379,6 +3474,9 @@ static enum ndr_err_code ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_fl
case 17:
break;
+ case 18:
+ break;
+
case 20:
NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20));
break;
@@ -3478,6 +3576,10 @@ _PUBLIC_ void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, c
ndr_print_samr_UserInfo17(ndr, "info17", &r->info17);
break;
+ case 18:
+ ndr_print_samr_UserInfo18(ndr, "info18", &r->info18);
+ break;
+
case 20:
ndr_print_samr_UserInfo20(ndr, "info20", &r->info20);
break;
@@ -3507,51 +3609,6 @@ _PUBLIC_ void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, c
}
}
-_PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r)
-{
- {
- uint32_t _flags_save_STRUCT = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 1));
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- ndr->flags = _flags_save_STRUCT;
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r)
-{
- {
- uint32_t _flags_save_STRUCT = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 1));
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- ndr->flags = _flags_save_STRUCT;
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r)
-{
- ndr_print_struct(ndr, name, "samr_Password");
- {
- uint32_t _flags_save_STRUCT = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
- ndr->depth++;
- ndr_print_array_uint8(ndr, "hash", r->hash, 16);
- ndr->depth--;
- ndr->flags = _flags_save_STRUCT;
- }
-}
-
_PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -6498,9 +6555,12 @@ static enum ndr_err_code ndr_push_samr_EnumDomainUsers(struct ndr_push *ndr, int
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.sam));
- if (r->out.sam) {
- NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam));
+ if (r->out.sam == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
+ if (*r->out.sam) {
+ NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
}
if (r->out.num_entries == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -6517,6 +6577,7 @@ static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int
TALLOC_CTX *_mem_save_domain_handle_0;
TALLOC_CTX *_mem_save_resume_handle_0;
TALLOC_CTX *_mem_save_sam_0;
+ TALLOC_CTX *_mem_save_sam_1;
TALLOC_CTX *_mem_save_num_entries_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -6539,6 +6600,8 @@ static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
NDR_PULL_ALLOC(ndr, r->out.resume_handle);
*r->out.resume_handle = *r->in.resume_handle;
+ NDR_PULL_ALLOC(ndr, r->out.sam);
+ ZERO_STRUCTP(r->out.sam);
NDR_PULL_ALLOC(ndr, r->out.num_entries);
ZERO_STRUCTP(r->out.num_entries);
}
@@ -6550,18 +6613,24 @@ static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int
NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sam);
+ }
+ _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
if (_ptr_sam) {
- NDR_PULL_ALLOC(ndr, r->out.sam);
+ NDR_PULL_ALLOC(ndr, *r->out.sam);
} else {
- r->out.sam = NULL;
+ *r->out.sam = NULL;
}
- if (r->out.sam) {
- _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, 0);
- NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, 0);
+ if (*r->out.sam) {
+ _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
+ NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.num_entries);
}
@@ -6605,10 +6674,13 @@ _PUBLIC_ void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *
ndr->depth--;
ndr_print_ptr(ndr, "sam", r->out.sam);
ndr->depth++;
- if (r->out.sam) {
- ndr_print_samr_SamArray(ndr, "sam", r->out.sam);
+ ndr_print_ptr(ndr, "sam", *r->out.sam);
+ ndr->depth++;
+ if (*r->out.sam) {
+ ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
ndr->depth++;
ndr_print_uint32(ndr, "num_entries", *r->out.num_entries);
diff --git a/source3/librpc/gen_ndr/ndr_samr.h b/source3/librpc/gen_ndr/ndr_samr.h
index f769cddddb..c21b5455fb 100644
--- a/source3/librpc/gen_ndr/ndr_samr.h
+++ b/source3/librpc/gen_ndr/ndr_samr.h
@@ -206,6 +206,10 @@ void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const st
void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r);
void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r);
void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r);
+enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r);
+enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r);
+void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r);
+void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r);
void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r);
void ndr_print_samr_FieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r);
@@ -218,9 +222,6 @@ void ndr_print_samr_CryptPasswordEx(struct ndr_print *ndr, const char *name, con
void ndr_print_samr_UserInfo25(struct ndr_print *ndr, const char *name, const struct samr_UserInfo25 *r);
void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name, const struct samr_UserInfo26 *r);
void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, const union samr_UserInfo *r);
-enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r);
-enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r);
-void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r);
enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r);
enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttribute *r);
void ndr_print_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttribute *r);
diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h
index d02b577612..376feae5d1 100644
--- a/source3/librpc/gen_ndr/samr.h
+++ b/source3/librpc/gen_ndr/samr.h
@@ -400,6 +400,17 @@ struct samr_UserInfo17 {
NTTIME acct_expiry;
};
+struct samr_Password {
+ uint8_t hash[16];
+}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+struct samr_UserInfo18 {
+ struct samr_Password lm_pwd;
+ struct samr_Password nt_pwd;
+ uint8_t lm_pwd_active;
+ uint8_t nt_pwd_active;
+};
+
struct samr_UserInfo20 {
struct lsa_String parameters;
};
@@ -518,6 +529,7 @@ union samr_UserInfo {
struct samr_UserInfo14 info14;/* [case(14)] */
struct samr_UserInfo16 info16;/* [case(16)] */
struct samr_UserInfo17 info17;/* [case(17)] */
+ struct samr_UserInfo18 info18;/* [case(18)] */
struct samr_UserInfo20 info20;/* [case(20)] */
struct samr_UserInfo21 info21;/* [case(21)] */
struct samr_UserInfo23 info23;/* [case(23)] */
@@ -526,10 +538,6 @@ union samr_UserInfo {
struct samr_UserInfo26 info26;/* [case(26)] */
}/* [switch_type(uint16)] */;
-struct samr_Password {
- uint8_t hash[16];
-}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
-
struct samr_RidWithAttribute {
uint32_t rid;
uint32_t attributes;
@@ -939,7 +947,7 @@ struct samr_EnumDomainUsers {
} in;
struct {
- struct samr_SamArray *sam;/* [unique] */
+ struct samr_SamArray **sam;/* [ref] */
uint32_t *num_entries;/* [ref] */
uint32_t *resume_handle;/* [ref] */
NTSTATUS result;
diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c
index 24b1abb222..374df34a96 100644
--- a/source3/librpc/gen_ndr/srv_samr.c
+++ b/source3/librpc/gen_ndr/srv_samr.c
@@ -1086,7 +1086,7 @@ static bool api_samr_EnumDomainUsers(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.resume_handle = r->in.resume_handle;
- r->out.sam = talloc_zero(r, struct samr_SamArray);
+ r->out.sam = talloc_zero(r, struct samr_SamArray *);
if (r->out.sam == NULL) {
talloc_free(r);
return false;