mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
python/samdb: validation of group member types for group member filter
Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
committed by
Stefan Metzmacher
parent
f9bf6b7856
commit
a4d77bfd90
@ -264,6 +264,12 @@ pwdLastSet: 0
|
||||
if 'all' in member_types:
|
||||
member_types = all_member_types
|
||||
|
||||
for member_type in member_types:
|
||||
if member_type not in all_member_types:
|
||||
raise Exception('Invalid group member type "%s". '
|
||||
'Valid types are %s and all.' %
|
||||
(member_type, ", ".join(all_member_types)))
|
||||
|
||||
if 'user' in member_types:
|
||||
filter += ('(&(sAMAccountName=%s)(samAccountType=%d))' %
|
||||
(ldb.binary_encode(member), dsdb.ATYPE_NORMAL_ACCOUNT))
|
||||
|
Reference in New Issue
Block a user