diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-07-19 17:39:23 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-07-19 17:39:23 +0200 |
commit | 8557d14f65212faceb3e7223818b34b8869a0470 (patch) | |
tree | 77979da96009cd84c850db60a1300b9956fe8587 /lib/util/genrand.c | |
parent | 7a765b65b739c38ea1e3cfc136c92d2fb5ed4fa7 (diff) | |
parent | 4447bd96b90ce4bfca793d482f9dcbd98e6579a5 (diff) | |
download | samba-8557d14f65212faceb3e7223818b34b8869a0470.tar.gz samba-8557d14f65212faceb3e7223818b34b8869a0470.tar.bz2 samba-8557d14f65212faceb3e7223818b34b8869a0470.zip |
Merge branch 'master' of git://git.samba.org/samba
Diffstat (limited to 'lib/util/genrand.c')
-rw-r--r-- | lib/util/genrand.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/util/genrand.c b/lib/util/genrand.c index cd1823a9a0..c51f9384b8 100644 --- a/lib/util/genrand.c +++ b/lib/util/genrand.c @@ -294,6 +294,7 @@ _PUBLIC_ uint32_t generate_random(void) _PUBLIC_ bool check_password_quality(const char *s) { int has_digit=0, has_capital=0, has_lower=0, has_special=0, has_high=0; + char* reals = s; while (*s) { if (isdigit((unsigned char)*s)) { has_digit |= 1; @@ -310,7 +311,7 @@ _PUBLIC_ bool check_password_quality(const char *s) } return ((has_digit + has_lower + has_capital + has_special) >= 3 - || (has_high > strlen(s)/2)); + || (has_high > strlen(reals)/2)); } /** |