removal of flag NO-ALIGN if a align flag is specified in pidl/ndr
Stefan (metze) Metzmacher
metze at samba.org
Thu Sep 8 09:57:31 MDT 2011
Am 08.09.2011 10:48, schrieb Matthieu Patou:
> Hello,
>
> I face a situation with ndr generated code when a top structure is
> unaligned but one of its substructure can contain a security descriptor
> that needs to have alignment.
>
> I'm proposing the following change:
>
> diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
> index 7cb6e21..0094938 100644
> --- a/librpc/ndr/ndr.c
> +++ b/librpc/ndr/ndr.c
> @@ -381,7 +381,7 @@ _PUBLIC_ void ndr_set_flags(uint32_t *pflags,
> uint32_t new_flags)
> (*pflags) &= ~LIBNDR_ALIGN_FLAGS;
> }
> if (new_flags & LIBNDR_ALIGN_FLAGS) {
> - (*pflags) &= ~LIBNDR_FLAG_REMAINING;
> + (*pflags) &= ~(LIBNDR_FLAG_REMAINING|LIBNDR_FLAG_NOALIGN);
> }
> if (new_flags & LIBNDR_FLAG_NO_RELATIVE_REVERSE) {
> (*pflags) &= ~LIBNDR_FLAG_RELATIVE_REVERSE;
>
> Is there any remarks ?
What about this patches:
http://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=e9148f683326ab8a2a0ce8d083b7cb6ab0a5ae58
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110908/90ca1c8b/attachment.pgp>
More information about the samba-technical
mailing list