libcli/security: avoid leak when converting SID claims
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Mon, 27 Nov 2023 21:35:43 +0000 (10:35 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 27 Nov 2023 22:37:31 +0000 (22:37 +0000)
commitfa96bbbe8160fa5bfdbae21baf77103ffeaf1995
tree51b11fac7be3dcc4ff200ba49cbfae9181e66b66
parent8f42b8431efcdeee9e270423bab9e111775430c9
libcli/security: avoid leak when converting SID claims

Apart from the leak fix, this is faster and stricter, not accepting
SID string buffers with trailing garbage ("S-1-2-3qwerty" would have
been accepted, but not now).

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