diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-14 21:39:13 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-14 21:39:13 +0000 |
commit | 5a1779b982569201decc8a09765d5361212813d7 (patch) | |
tree | dedcf4e90ff7a2455135fe2c61591e0fbac4e33e /source4/librpc/ndr | |
parent | f147a707955d3c57ecd0ecc7e19307adb2aed02b (diff) | |
download | samba-5a1779b982569201decc8a09765d5361212813d7.tar.gz samba-5a1779b982569201decc8a09765d5361212813d7.tar.bz2 samba-5a1779b982569201decc8a09765d5361212813d7.zip |
it turns out that all MS servers ignore the artifact struct_len fields
in OpenPolicy and OpenPolicy2, so we don't in fact need the
[struct_len] attribute. This makes our IDL much closer to the MS IDL.
(This used to be commit f0a8f063a680b5d0a68c5ac7cccf9c9a13adfb81)
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r-- | source4/librpc/ndr/ndr_dfs.c | 4 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_dfs.h | 4 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_lsa.c | 22 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_lsa.h | 2 |
4 files changed, 10 insertions, 22 deletions
diff --git a/source4/librpc/ndr/ndr_dfs.c b/source4/librpc/ndr/ndr_dfs.c index 60a1252720..325e88adad 100644 --- a/source4/librpc/ndr/ndr_dfs.c +++ b/source4/librpc/ndr/ndr_dfs.c @@ -40,7 +40,7 @@ NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, struct dfs_Remove *r) return NT_STATUS_OK; } -NTSTATUS ndr_push_dfs_UNKNOWN3(struct ndr_push *ndr, struct dfs_UNKNOWN3 *r) +NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, struct dfs_SetInfo *r) { return NT_STATUS_OK; @@ -425,7 +425,7 @@ NTSTATUS ndr_pull_dfs_Remove(struct ndr_pull *ndr, struct dfs_Remove *r) return NT_STATUS_OK; } -NTSTATUS ndr_pull_dfs_UNKNOWN3(struct ndr_pull *ndr, struct dfs_UNKNOWN3 *r) +NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, struct dfs_SetInfo *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); diff --git a/source4/librpc/ndr/ndr_dfs.h b/source4/librpc/ndr/ndr_dfs.h index c36477cd20..af46b3dabf 100644 --- a/source4/librpc/ndr/ndr_dfs.h +++ b/source4/librpc/ndr/ndr_dfs.h @@ -38,7 +38,7 @@ struct dfs_Remove { }; -struct dfs_UNKNOWN3 { +struct dfs_SetInfo { struct { } in; @@ -195,6 +195,6 @@ struct dfs_Enum { #define DCERPC_DFS_EXIST 0 #define DCERPC_DFS_ADD 1 #define DCERPC_DFS_REMOVE 2 -#define DCERPC_DFS_UNKNOWN3 3 +#define DCERPC_DFS_SETINFO 3 #define DCERPC_DFS_GETINFO 4 #define DCERPC_DFS_ENUM 5 diff --git a/source4/librpc/ndr/ndr_lsa.c b/source4/librpc/ndr/ndr_lsa.c index 713e87cbbc..a480e9ca62 100644 --- a/source4/librpc/ndr/ndr_lsa.c +++ b/source4/librpc/ndr/ndr_lsa.c @@ -61,35 +61,23 @@ NTSTATUS ndr_push_lsa_ChangePassword(struct ndr_push *ndr, struct lsa_ChangePass static NTSTATUS ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, struct lsa_QosInfo *r) { - struct ndr_push_save _save1, _save2, _save3; - ndr_push_save(ndr, &_save1); NDR_CHECK(ndr_push_align(ndr, 4)); if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_align(ndr, sizeof(uint32))); - ndr_push_save(ndr, &_save2); - NDR_CHECK(ndr_push_uint32(ndr, 0)); + NDR_CHECK(ndr_push_uint32(ndr, r->len)); NDR_CHECK(ndr_push_uint16(ndr, r->impersonation_level)); NDR_CHECK(ndr_push_uint8(ndr, r->context_mode)); NDR_CHECK(ndr_push_uint8(ndr, r->effective_only)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; - ndr_push_save(ndr, &_save3); - ndr_push_restore(ndr, &_save2); - NDR_CHECK(ndr_push_uint32(ndr, _save3.offset - _save1.offset)); - ndr_push_restore(ndr, &_save3); done: return NT_STATUS_OK; } static NTSTATUS ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int ndr_flags, struct lsa_ObjectAttribute *r) { - struct ndr_push_save _save1, _save2, _save3; - ndr_push_save(ndr, &_save1); NDR_CHECK(ndr_push_align(ndr, 4)); if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_align(ndr, sizeof(uint32))); - ndr_push_save(ndr, &_save2); - NDR_CHECK(ndr_push_uint32(ndr, 0)); + NDR_CHECK(ndr_push_uint32(ndr, r->len)); NDR_CHECK(ndr_push_ptr(ndr, r->root_dir)); NDR_CHECK(ndr_push_ptr(ndr, r->object_name)); NDR_CHECK(ndr_push_uint32(ndr, r->attributes)); @@ -109,10 +97,6 @@ buffers: if (r->sec_qos) { NDR_CHECK(ndr_push_lsa_QosInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_qos)); } - ndr_push_save(ndr, &_save3); - ndr_push_restore(ndr, &_save2); - NDR_CHECK(ndr_push_uint32(ndr, _save3.offset - _save1.offset)); - ndr_push_restore(ndr, &_save3); done: return NT_STATUS_OK; } @@ -1630,6 +1614,7 @@ void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, struct lsa_Q { ndr_print_struct(ndr, name, "lsa_QosInfo"); ndr->depth++; + ndr_print_uint32(ndr, "len", r->len); ndr_print_uint16(ndr, "impersonation_level", r->impersonation_level); ndr_print_uint8(ndr, "context_mode", r->context_mode); ndr_print_uint8(ndr, "effective_only", r->effective_only); @@ -1640,6 +1625,7 @@ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, stru { ndr_print_struct(ndr, name, "lsa_ObjectAttribute"); ndr->depth++; + ndr_print_uint32(ndr, "len", r->len); ndr_print_ptr(ndr, "root_dir", r->root_dir); ndr->depth++; if (r->root_dir) { diff --git a/source4/librpc/ndr/ndr_lsa.h b/source4/librpc/ndr/ndr_lsa.h index 306afd5a2c..109e88c84f 100644 --- a/source4/librpc/ndr/ndr_lsa.h +++ b/source4/librpc/ndr/ndr_lsa.h @@ -86,12 +86,14 @@ struct lsa_ChangePassword { }; struct lsa_QosInfo { + uint32 len; uint16 impersonation_level; uint8 context_mode; uint8 effective_only; }; struct lsa_ObjectAttribute { + uint32 len; uint8 *root_dir; const char *object_name; uint32 attributes; |