libcli/security: allow round-trip for conditional ACE octal integers
commitd33ed63147930377697535066fa96b9b4965ea41
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 13 Dec 2023 04:20:38 +0000 (13 17:20 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 14 Dec 2023 03:31:37 +0000 (14 03:31 +0000)
treee4dd3c4dc4dfdd3a08b4fb7e6bf7b6ba8e0813cd
parentbbe217604bd304454ae07fa817a50ef6d220e200
libcli/security: allow round-trip for conditional ACE octal integers

The string "00" will decode into an integer tagged as octal, but
`snprintf("%#oll")` will write the string "0", which would decode as
decimal, so the in the SDDL1->SD1->SDDL2->SD2 round trip, SD1 would
not be the same as SD2.

The effect is really only relevant to SDDL, which wants to remember
what base the numbers were presented in, though the fuzzers and tests
don't directly compare SDDL, which can have extra spaces and so forth.

Credit to OSS-Fuzz.

REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62929

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/sddl_conditional_ace.c