lib/util: add generate_random_machine_password() function
authorStefan Metzmacher <metze@samba.org>
Tue, 23 Aug 2016 07:30:05 +0000 (09:30 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 21 Feb 2017 15:09:21 +0000 (16:09 +0100)
commitad12cfae42cc592166d6a1c1ee323f1aae82f235
tree30f2ea0f5c6eebc713e13ffb229f908803d35a62
parentabe427775ee8ed1d278d5094ca127f85289ca5a3
lib/util: add generate_random_machine_password() function

It generates more random password for the use as machine password,
restricted to codepoints <= 0xFFFF in order to be compatible
with MIT krb5 and Heimdal.

Note: the fallback to ascii if 'unix charset' is not 'utf8'.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
lib/util/genrand_util.c
lib/util/samba_util.h