r14891: fix a bug found by the ibm checker
authorStefan Metzmacher <metze@samba.org>
Mon, 3 Apr 2006 14:39:46 +0000 (14:39 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:00:12 +0000 (14:00 -0500)
commit5559f5e3e5b283a4fe85984589d61598b14fcfff
treecb1f7c52db85d10534af50b0c3040ca4a7ec295d
parented56a2c147befea36e40844d3d295fd74402b64f
r14891: fix a bug found by the ibm checker

the problem was that we shift with <<= (privilege-1)

and we called the function with privilege=0

add some checks to catch invalid privilege values
and hide the mask representation in privilege.c

metze
(This used to be commit a69f000324764bcd4cf420f2ecba1aca788258e4)
source4/dsdb/samdb/samdb_privilege.c
source4/libcli/security/privilege.c
source4/libcli/security/security_token.c