summaryrefslogtreecommitdiff
path: root/src/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf.c')
-rw-r--r--src/conf.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/conf.c b/src/conf.c
index 84149c1..2704e52 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -1754,6 +1754,37 @@ valid_tkline(const char *p, int minutes)
return result;
}
+/* valid_wild_card_simple()
+ *
+ * inputs - data to check for sufficient non-wildcard characters
+ * outputs - 1 if valid, else 0
+ * side effects - none
+ */
+int
+valid_wild_card_simple(const char *data)
+{
+ const unsigned char *p = (const unsigned char *)data;
+ unsigned char tmpch = '\0';
+ int nonwild = 0;
+
+ while ((tmpch = *p++))
+ {
+ if (tmpch == '\\')
+ {
+ ++p;
+ if (++nonwild >= ConfigFileEntry.min_nonwildcard_simple)
+ return 1;
+ }
+ else if (!IsMWildChar(tmpch))
+ {
+ if (++nonwild >= ConfigFileEntry.min_nonwildcard_simple)
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
/* valid_wild_card()
*
* input - pointer to client