diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-06-24 01:18:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:18:44 -0500 |
commit | 152a6a00c31f52d14a63bfc977ac54713c56c9cd (patch) | |
tree | 82a0b1a45404f08f32b647a47b7c332469650fc8 /source4/librpc/ndr/ndr_sec_helper.c | |
parent | d60b11c1f0151dbd758b896ba2934a8efa4ada75 (diff) | |
download | samba-152a6a00c31f52d14a63bfc977ac54713c56c9cd.tar.gz samba-152a6a00c31f52d14a63bfc977ac54713c56c9cd.tar.bz2 samba-152a6a00c31f52d14a63bfc977ac54713c56c9cd.zip |
r7865: changed pidl to take a "const void *" instead of a "void *" for the
structure in ndr_push_*() and ndr_print_*(). The push and print
functions really should not modify the structure.
metze, to make this work I had to change your spoolss hand
marshaller. Can you please check it is OK? I think that the IN and OUT
sides of that function are not ever called on the same structure, so I
think that attempt at remembering the value by assigning to
r->in._offered was not doing anything anyway, but please correct me if
I have misunderstood it.
If you really do need to remember something on those structures I'd
suggest the ndr_token_store() and ndr_token_retrieve() functions,
which are used by pidl for just this sort of thing.
(This used to be commit eee528be97fa43ca53bdc5652b4d29a0a2caf563)
Diffstat (limited to 'source4/librpc/ndr/ndr_sec_helper.c')
-rw-r--r-- | source4/librpc/ndr/ndr_sec_helper.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/librpc/ndr/ndr_sec_helper.c b/source4/librpc/ndr/ndr_sec_helper.c index 268f270ebe..8325aef93d 100644 --- a/source4/librpc/ndr/ndr_sec_helper.c +++ b/source4/librpc/ndr/ndr_sec_helper.c @@ -27,7 +27,7 @@ /* return the wire size of a dom_sid */ -size_t ndr_size_dom_sid(struct dom_sid *sid) +size_t ndr_size_dom_sid(const struct dom_sid *sid) { if (!sid) return 0; return 8 + 4*sid->num_auths; @@ -36,7 +36,7 @@ size_t ndr_size_dom_sid(struct dom_sid *sid) /* return the wire size of a dom_sid */ -size_t ndr_length_dom_sid(struct dom_sid *sid) +size_t ndr_length_dom_sid(const struct dom_sid *sid) { if (!sid) return 0; if (sid->sid_rev_num == 0) return 0; @@ -46,7 +46,7 @@ size_t ndr_length_dom_sid(struct dom_sid *sid) /* return the wire size of a security_ace */ -size_t ndr_size_security_ace(struct security_ace *ace) +size_t ndr_size_security_ace(const struct security_ace *ace) { if (!ace) return 0; return 8 + ndr_size_dom_sid(&ace->trustee); @@ -56,7 +56,7 @@ size_t ndr_size_security_ace(struct security_ace *ace) /* return the wire size of a security_acl */ -size_t ndr_size_security_acl(struct security_acl *acl) +size_t ndr_size_security_acl(const struct security_acl *acl) { size_t ret; int i; @@ -71,7 +71,7 @@ size_t ndr_size_security_acl(struct security_acl *acl) /* return the wire size of a security descriptor */ -size_t ndr_size_security_descriptor(struct security_descriptor *sd) +size_t ndr_size_security_descriptor(const struct security_descriptor *sd) { size_t ret; if (!sd) return 0; @@ -87,17 +87,17 @@ size_t ndr_size_security_descriptor(struct security_descriptor *sd) /* print a dom_sid */ -void ndr_print_dom_sid(struct ndr_print *ndr, const char *name, struct dom_sid *sid) +void ndr_print_dom_sid(struct ndr_print *ndr, const char *name, const struct dom_sid *sid) { ndr->print(ndr, "%-25s: %s", name, dom_sid_string(ndr, sid)); } -void ndr_print_dom_sid2(struct ndr_print *ndr, const char *name, struct dom_sid *sid) +void ndr_print_dom_sid2(struct ndr_print *ndr, const char *name, const struct dom_sid *sid) { ndr_print_dom_sid(ndr, name, sid); } -void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, struct dom_sid *sid) +void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid) { ndr_print_dom_sid(ndr, name, sid); } |