libcli/security: disallow sddl access masks greater than 32 bits
commit56da318ceea55763134587ab615cbfbbf955df11
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 11 Apr 2023 22:46:30 +0000 (12 10:46 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 28 Apr 2023 02:15:36 +0000 (28 02:15 +0000)
treee61d61df77c2c2c73e574c258256728613dfa2af
parent11add4d631f559996dd5fda0a6cce7eb675cc6ae
libcli/security: disallow sddl access masks greater than 32 bits

Our previous behaviour (at least with glibc) was to clip off the extra
bits, so that 0x123456789 would become 0x23456789. That's kind of the
obvious thing, but is not what Windows does, which is to saturate the
value, rounding to 0xffffffff. The effect of this is to turn on all
the flags, which quite possibly not what you meant.

Now we just return an error.

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