61daef1e89
Secure locate provides a secure way to index and quickly search for files on your system. It uses incremental encoding just like GNU locate to compress its database to make searching faster, but it will also check file permissions and ownership so that users will not see files they do not have access to.
32 lines
623 B
Text
32 lines
623 B
Text
$NetBSD: patch-ab,v 1.1.1.1 2003/05/31 09:37:34 poppnk Exp $
|
|
|
|
--- main.c.orig 2003-01-25 04:39:48.000000000 +0000
|
|
+++ main.c 2003-05-30 15:05:50.000000000 +0000
|
|
@@ -103,6 +103,27 @@
|
|
# undef FNM_CASEFOLD
|
|
#endif
|
|
|
|
+#ifndef HAVE_STRCASESTR
|
|
+char *
|
|
+ strcasestr(char *one, char *two)
|
|
+{
|
|
+ char *a,*b,*ret;
|
|
+ int la,lb,i=0;
|
|
+
|
|
+ if (!one||!two) return NULL;
|
|
+
|
|
+ a=strdup(one); b=strdup(two);
|
|
+ la=strlen(one); lb=strlen(two);
|
|
+ do { a[i]=toupper(a[i]); } while(a[++i]); i=0;
|
|
+ do { b[i]=toupper(b[i]); } while(b[++i]);
|
|
+
|
|
+ ret=strstr(a,b);
|
|
+
|
|
+ free (a); free(b);
|
|
+ return(ret);
|
|
+}
|
|
+#endif
|
|
+
|
|
|
|
/* GLOBALS */
|
|
|