The Univention modules have a issue with an unassigned variable. (#55083)

The variable diff is only assigned if state is 'present', else the
variable is unused. But the module will return the diff variable as a
return value. If the state isn't 'present' the module will fail with an
python UnboundLocalError exception.
This commit is contained in:
Tobias Rüetschi 2019-04-10 11:43:56 +02:00 committed by John R Barker
commit ee25c34d00
5 changed files with 5 additions and 0 deletions

View file

@ -413,6 +413,7 @@ def main():
subpath = module.params['subpath']
state = module.params['state']
changed = False
diff = None
users = list(ldap_search(
'(&(objectClass=posixAccount)(uid={0}))'.format(username),