samba-tool: validate password early in `domain provision`
authorJamie McClymont <jamiemcclymont@catalyst.net.nz>
Tue, 28 Nov 2017 02:45:30 +0000 (15:45 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 9 Dec 2017 23:47:30 +0000 (00:47 +0100)
commit698d28ee8cf4ff8258f2e6fe9b88d81f842584aa
tree2603e7d297702dcd43e6e37e21f8c91c45cdc39a
parent704bbae25c07c08c051a66ae0a83fb5abda373f1
samba-tool: validate password early in `domain provision`

Checks password against default quality and length standards when it is entered,
allowing a second chance to enter one (if interactive), rather than running
through the provisioning process and bailing on an exception

Includes unit tests for the newly-added python wrapper of check_password_quality
plus black-box tests for the checks in samba-tool.

Breaks an openldap test which uses an invalid password.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9710
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12235

Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
python/pyglue.c
python/samba/__init__.py
python/samba/netcmd/domain.py
python/samba/provision/__init__.py
python/samba/tests/password_quality.py [new file with mode: 0644]
python/samba/tests/samba_tool/provision_password_check.py [new file with mode: 0644]
selftest/knownfail.d/validate-password-early [new file with mode: 0644]
selftest/tests.py
source4/selftest/tests.py
source4/setup/provision_basedn_modify.ldif