summaryrefslogtreecommitdiffstats
path: root/lib/util/genrand.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-03-11 15:34:01 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-03-11 15:34:01 +1100
commit6441a5b0b97973b834ba025f1762abe2b5c3f3c9 (patch)
treed073ccb804a3303a3c3359477dd0bec243321be6 /lib/util/genrand.c
parenta6253a45c0733e81a8d2200d1d8892383bc00c31 (diff)
downloadsamba-6441a5b0b97973b834ba025f1762abe2b5c3f3c9.tar.gz
samba-6441a5b0b97973b834ba025f1762abe2b5c3f3c9.tar.xz
samba-6441a5b0b97973b834ba025f1762abe2b5c3f3c9.zip
Explain why we don't use certain characters in the generated pw
Diffstat (limited to 'lib/util/genrand.c')
-rw-r--r--lib/util/genrand.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/util/genrand.c b/lib/util/genrand.c
index f8aceae40a..7fe55f345e 100644
--- a/lib/util/genrand.c
+++ b/lib/util/genrand.c
@@ -368,6 +368,12 @@ again:
_PUBLIC_ char *generate_random_password(TALLOC_CTX *mem_ctx, size_t min, size_t max)
{
char *retstr;
+ /* This list does not include { or } because they cause
+ * problems for our provision (it can create a substring
+ * ${...}, and for Fedora DS (which treats {...} at the start
+ * of a stored password as special
+ * -- Andrew Bartlett 2010-03-11
+ */
const char *c_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+_-#.,@$%&!?:;<=>()[]~";
size_t len = max;
size_t diff;