26 lines
899 B
Diff
26 lines
899 B
Diff
From 5df2b9bd2b4b88881d03930183c07cc0027362df Mon Sep 17 00:00:00 2001
|
|
From: renxudong <renxudong1@huawei.com>
|
|
Date: Sat, 11 Jan 2020 12:05:57 +0800
|
|
Subject: Limit number of comparison characters to 4
|
|
|
|
Replace the function strcasecmp with strncasecmp
|
|
---
|
|
warnquota.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/warnquota.c b/warnquota.c
|
|
index 5158094..daa29d9 100644
|
|
--- a/warnquota.c
|
|
+++ b/warnquota.c
|
|
@@ -843,7 +843,7 @@ cc_parse_err:
|
|
}
|
|
#ifdef USE_LDAP_MAIL_LOOKUP
|
|
else if (!strcmp(var, "LDAP_MAIL")) {
|
|
- if(strcasecmp(value, "true") == 0)
|
|
+ if(strncasecmp(value, "true", 4) == 0)
|
|
config->use_ldap_mail = 1;
|
|
else
|
|
config->use_ldap_mail = 0;
|
|
--
|
|
1.8.3.1
|