s3:trusts_util: generate completely random passwords in trust_pw_change()
authorStefan Metzmacher <metze@samba.org>
Fri, 30 Jan 2015 09:21:59 +0000 (09:21 +0000)
committerGünther Deschner <gd@samba.org>
Mon, 30 Mar 2015 11:41:25 +0000 (13:41 +0200)
commit54e68e94ee878878df394e596ca5ea118b105bba
tree109970b1d524fa63e1d0f7c779fb78f4518c63ff
parent3e1e58711c7fb8047cb90d61ee0d0402f5aa0be8
s3:trusts_util: generate completely random passwords in trust_pw_change()

Instead of having every 2nd byte as '\0' in the utf16 password,
because the utf8 form is based on an ascii subset, we convert
the random buffer from CH_UTF16MUNGED to CH_UTF8.

This way we have a random but valid utf8 string,
which is almost like what Windows is doing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/libsmb/trusts_util.c