aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-05-19 12:30:00 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-05-19 12:30:00 +0000
commita2a647dfc1c003eacc53c2abe744ba4b3d7b2fbc (patch)
tree91766f417783ee69b93d44f1a39a70e874285f98
parenta85a63f6ee9f5815887158976bbf6b9a5a441db4 (diff)
downloadbusybox-w32-a2a647dfc1c003eacc53c2abe744ba4b3d7b2fbc.tar.gz
busybox-w32-a2a647dfc1c003eacc53c2abe744ba4b3d7b2fbc.tar.bz2
busybox-w32-a2a647dfc1c003eacc53c2abe744ba4b3d7b2fbc.zip
- include strings.h
Thanks to Rich Felker for pointing this out.
-rw-r--r--editors/awk.c1
-rw-r--r--editors/vi.c1
-rw-r--r--libbb/obscure.c15
-rw-r--r--libbb/u_signal_names.c1
-rw-r--r--networking/wget.c1
5 files changed, 12 insertions, 7 deletions
diff --git a/editors/awk.c b/editors/awk.c
index 9c8bef53a..f4eb1ab90 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -12,6 +12,7 @@
12#include <unistd.h> 12#include <unistd.h>
13#include <errno.h> 13#include <errno.h>
14#include <string.h> 14#include <string.h>
15#include <strings.h>
15#include <time.h> 16#include <time.h>
16#include <math.h> 17#include <math.h>
17#include <ctype.h> 18#include <ctype.h>
diff --git a/editors/vi.c b/editors/vi.c
index 9aacae439..0c0c930b9 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -53,6 +53,7 @@
53#include <stdio.h> 53#include <stdio.h>
54#include <stdlib.h> 54#include <stdlib.h>
55#include <string.h> 55#include <string.h>
56#include <strings.h>
56#include <termios.h> 57#include <termios.h>
57#include <unistd.h> 58#include <unistd.h>
58#include <sys/ioctl.h> 59#include <sys/ioctl.h>
diff --git a/libbb/obscure.c b/libbb/obscure.c
index a152456b2..d6a87b5de 100644
--- a/libbb/obscure.c
+++ b/libbb/obscure.c
@@ -18,12 +18,12 @@
18 This password types should not be permitted: 18 This password types should not be permitted:
19 a) pure numbers: birthdates, social security number, license plate, phone numbers; 19 a) pure numbers: birthdates, social security number, license plate, phone numbers;
20 b) words and all letters only passwords (uppercase, lowercase or mixed) 20 b) words and all letters only passwords (uppercase, lowercase or mixed)
21 as palindromes, consecutive or repetitive letters 21 as palindromes, consecutive or repetitive letters
22 or adjacent letters on your keyboard; 22 or adjacent letters on your keyboard;
23 c) username, real name, company name or (e-mail?) address 23 c) username, real name, company name or (e-mail?) address
24 in any form (as-is, reversed, capitalized, doubled, etc.). 24 in any form (as-is, reversed, capitalized, doubled, etc.).
25 (we can check only against username, gecos and hostname) 25 (we can check only against username, gecos and hostname)
26 d) common and obvious letter-number replacements 26 d) common and obvious letter-number replacements
27 (e.g. replace the letter O with number 0) 27 (e.g. replace the letter O with number 0)
28 such as "M1cr0$0ft" or "P@ssw0rd" (CAVEAT: we cannot check for them 28 such as "M1cr0$0ft" or "P@ssw0rd" (CAVEAT: we cannot check for them
29 without the use of a dictionary). 29 without the use of a dictionary).
@@ -42,12 +42,13 @@
42#include <ctype.h> 42#include <ctype.h>
43#include <unistd.h> 43#include <unistd.h>
44#include <string.h> 44#include <string.h>
45#include <strings.h>
45 46
46#include "libbb.h" 47#include "libbb.h"
47 48
48 49
49/* passwords should consist of 6 (to 8 characters) */ 50/* passwords should consist of 6 (to 8 characters) */
50#define MINLEN 6 51#define MINLEN 6
51 52
52 53
53static int string_checker_helper(const char *p1, const char *p2) __attribute__ ((__pure__)); 54static int string_checker_helper(const char *p1, const char *p2) __attribute__ ((__pure__));
@@ -93,7 +94,7 @@ static int string_checker(const char *p1, const char *p2)
93#define NUMBERS 4 94#define NUMBERS 4
94#define SPECIAL 8 95#define SPECIAL 8
95 96
96static const char *obscure_msg(const char *old_p, const char *new_p, const struct passwd *pw) 97static const char *obscure_msg(const char *old_p, const char *new_p, const struct passwd *pw)
97{ 98{
98 int i; 99 int i;
99 int c; 100 int c;
@@ -107,7 +108,7 @@ static const char *obscure_msg(const char *old_p, const char *new_p, const struc
107 /* size */ 108 /* size */
108 if (!new_p || (length = strlen(new_p)) < MINLEN) 109 if (!new_p || (length = strlen(new_p)) < MINLEN)
109 return("too short"); 110 return("too short");
110 111
111 /* no username as-is, as sub-string, reversed, capitalized, doubled */ 112 /* no username as-is, as sub-string, reversed, capitalized, doubled */
112 if (string_checker(new_p, pw->pw_name)) { 113 if (string_checker(new_p, pw->pw_name)) {
113 return "similar to username"; 114 return "similar to username";
@@ -152,11 +153,11 @@ static const char *obscure_msg(const char *old_p, const char *new_p, const struc
152 return "too many similar characters"; 153 return "too many similar characters";
153 } 154 }
154 } 155 }
155 for(i=0;i<4;i++) 156 for (i=0; i<4; i++)
156 if (mixed & (1<<i)) size -= 2; 157 if (mixed & (1<<i)) size -= 2;
157 if (length < size) 158 if (length < size)
158 return "too weak"; 159 return "too weak";
159 160
160 if (old_p && old_p[0] != '\0') { 161 if (old_p && old_p[0] != '\0') {
161 /* check vs. old password */ 162 /* check vs. old password */
162 if (string_checker(new_p, old_p)) { 163 if (string_checker(new_p, old_p)) {
diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c
index 31ebd895a..bf65fa3e9 100644
--- a/libbb/u_signal_names.c
+++ b/libbb/u_signal_names.c
@@ -11,6 +11,7 @@
11#include <signal.h> 11#include <signal.h>
12#include <ctype.h> 12#include <ctype.h>
13#include <string.h> 13#include <string.h>
14#include <strings.h>
14#include <stdlib.h> 15#include <stdlib.h>
15#include <stdio.h> 16#include <stdio.h>
16 17
diff --git a/networking/wget.c b/networking/wget.c
index 90ab48f9b..6efa3bf21 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -12,6 +12,7 @@
12#include <unistd.h> 12#include <unistd.h>
13#include <ctype.h> 13#include <ctype.h>
14#include <string.h> 14#include <string.h>
15#include <strings.h>
15#include <unistd.h> 16#include <unistd.h>
16#include <signal.h> 17#include <signal.h>
17#include <sys/ioctl.h> 18#include <sys/ioctl.h>