summaryrefslogtreecommitdiff
path: root/libbb/obscure.c
diff options
context:
space:
mode:
authorMike Frysinger2006-08-24 03:06:55 +0000
committerMike Frysinger2006-08-24 03:06:55 +0000
commitf23b96cebfe169eee7131efd8b879748587d1845 (patch)
treea4a0caf443011bdfed1e103871066ea8fb90faf3 /libbb/obscure.c
parentf86a5ba510ef62ab46d14bd0761a1d88289a398d (diff)
downloadbusybox-f23b96cebfe169eee7131efd8b879748587d1845.zip
busybox-f23b96cebfe169eee7131efd8b879748587d1845.tar.gz
tag busybox-1.2.11_2_1
Diffstat (limited to 'libbb/obscure.c')
-rw-r--r--libbb/obscure.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libbb/obscure.c b/libbb/obscure.c
index 3353df9..464d3b5 100644
--- a/libbb/obscure.c
+++ b/libbb/obscure.c
@@ -46,6 +46,11 @@
#include "libbb.h"
+
+/* passwords should consist of 6 (to 8 characters) */
+#define MINLEN 6
+
+
static int string_checker_helper(const char *p1, const char *p2) __attribute__ ((__pure__));
static int string_checker_helper(const char *p1, const char *p2)
@@ -95,13 +100,13 @@ static const char *obscure_msg(const char *old_p, const char *new_p, const struc
int c;
int length;
int mixed = 0;
- /* Add 2 for each type of characters to the minlen of password */
- int size = CONFIG_PASSWORD_MINLEN + 8;
+ /* Add 1 for each type of characters to the minlen of password */
+ int size = MINLEN + 8;
const char *p;
char hostname[255];
/* size */
- if (!new_p || (length = strlen(new_p)) < CONFIG_PASSWORD_MINLEN)
+ if (!new_p || (length = strlen(new_p)) < MINLEN)
return("too short");
/* no username as-is, as sub-string, reversed, capitalized, doubled */