librpc:ndr: Introduce ‘libndr_flags’ type
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 10 Jul 2023 03:47:03 +0000 (15:47 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 1 Nov 2023 20:10:45 +0000 (20:10 +0000)
commitc4f281e9ae36c225b6003e0fa1cb8fb2e67bf543
treef670d762a55c2f7168f47f6da2441eb034e1d47f
parent4ec7578e79cf821e6dc8945eee393635cd4c62ca
librpc:ndr: Introduce ‘libndr_flags’ type

The LIBNDR_FLAG_ namespace is getting dangerously full, with only a
single flag value (1 << 9) remaining for use. After that flag is put
into use, we won’t be able to add any new flags without increasing the
flag width to 64‐bit.

Up to now we’ve used a haphazard mix of int, unsigned, and uint32_t to
store these flags. Introduce a new type, ‘libndr_flags’, to be used
consistently to hold LIBNDR flags. If in the future we find we need to
move to 64‐bit flags, this type gives us an opportunity to do that.

Bump the NDR version to 4.0.0 — an major version increment, for we’re
changing the function ABI and adding the new symbol
ndr_print_libndr_flags.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
39 files changed:
lib/fuzzing/fuzz_ndr_X.c
libcli/security/secace.h
librpc/ABI/ndr-4.0.0.sigs [new file with mode: 0644]
librpc/idl/ntprinting.idl
librpc/ndr/libndr.h
librpc/ndr/ndr.c
librpc/ndr/ndr_basic.c
librpc/ndr/ndr_bkupblobs.c
librpc/ndr/ndr_cab.c
librpc/ndr/ndr_dcerpc.c
librpc/ndr/ndr_dns.c
librpc/ndr/ndr_drsblobs.c
librpc/ndr/ndr_drsuapi.c
librpc/ndr/ndr_drsuapi.h
librpc/ndr/ndr_frsrpc.c
librpc/ndr/ndr_frsrpc.h
librpc/ndr/ndr_krb5pac.c
librpc/ndr/ndr_krb5pac.h
librpc/ndr/ndr_nbt.c
librpc/ndr/ndr_negoex.c
librpc/ndr/ndr_ntlmssp.c
librpc/ndr/ndr_ntlmssp.h
librpc/ndr/ndr_ntprinting.c
librpc/ndr/ndr_ntprinting.h
librpc/ndr/ndr_preg.c
librpc/ndr/ndr_sec_helper.c
librpc/ndr/ndr_spoolss_buf.c
librpc/ndr/ndr_spoolss_buf.h
librpc/ndr/ndr_string.c
librpc/ndr/ndr_witness.c
librpc/ndr/ndr_xattr.c
librpc/wscript_build
pidl/lib/Parse/Pidl/NDR.pm
pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
pidl/lib/Parse/Pidl/Samba4/Python.pm
pidl/lib/Parse/Pidl/Typelist.pm
source4/torture/ndr/ndr.c
source4/torture/ndr/ndr.h
source4/torture/ndr/string.c