summaryrefslogtreecommitdiff
path: root/libbb/obscure.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/obscure.c')
-rw-r--r--libbb/obscure.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libbb/obscure.c b/libbb/obscure.c
index d6a87b5de..4a8fbf72c 100644
--- a/libbb/obscure.c
+++ b/libbb/obscure.c
@@ -46,11 +46,6 @@
46 46
47#include "libbb.h" 47#include "libbb.h"
48 48
49
50/* passwords should consist of 6 (to 8 characters) */
51#define MINLEN 6
52
53
54static int string_checker_helper(const char *p1, const char *p2) __attribute__ ((__pure__)); 49static int string_checker_helper(const char *p1, const char *p2) __attribute__ ((__pure__));
55 50
56static int string_checker_helper(const char *p1, const char *p2) 51static int string_checker_helper(const char *p1, const char *p2)
@@ -101,12 +96,12 @@ static const char *obscure_msg(const char *old_p, const char *new_p, const struc
101 int length; 96 int length;
102 int mixed = 0; 97 int mixed = 0;
103 /* Add 1 for each type of characters to the minlen of password */ 98 /* Add 1 for each type of characters to the minlen of password */
104 int size = MINLEN + 8; 99 int size = CONFIG_PASSWORD_MINLEN + 8;
105 const char *p; 100 const char *p;
106 char hostname[255]; 101 char hostname[255];
107 102
108 /* size */ 103 /* size */
109 if (!new_p || (length = strlen(new_p)) < MINLEN) 104 if (!new_p || (length = strlen(new_p)) < CONFIG_PASSWORD_MINLEN)
110 return("too short"); 105 return("too short");
111 106
112 /* no username as-is, as sub-string, reversed, capitalized, doubled */ 107 /* no username as-is, as sub-string, reversed, capitalized, doubled */