aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/lsb/passwd.c4
-rw-r--r--toys/posix/grep.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/toys/lsb/passwd.c b/toys/lsb/passwd.c
index 0f51c0c0..73024832 100644
--- a/toys/lsb/passwd.c
+++ b/toys/lsb/passwd.c
@@ -46,8 +46,8 @@ static void weak_check(char *new, char *old, char *user)
if (strlen(new) < 6) msg = "too short";
if (*new) {
- if (strnstr(new, user) || strnstr(user, new)) msg = "user";
- if (*old && (strnstr(new, old) || strnstr(old, new))) msg = "old";
+ if (strcasestr(new, user) || strcasestr(user, new)) msg = "user";
+ if (*old && (strcasestr(new, old) || strcasestr(old, new))) msg = "old";
}
if (msg) xprintf("BAD PASSWORD: %s\n",msg);
}
diff --git a/toys/posix/grep.c b/toys/posix/grep.c
index f0332cee..14cebf95 100644
--- a/toys/posix/grep.c
+++ b/toys/posix/grep.c
@@ -152,7 +152,7 @@ static void do_grep(int fd, char *name)
fseek.arg = s = line;
break;
}
- if (toys.optflags & FLAG_i) s = strnstr(line, seek->arg);
+ if (toys.optflags & FLAG_i) s = strcasestr(line, seek->arg);
else s = strstr(line, seek->arg);
if (s) break;
}