revise patch fuzz
This commit is contained in:
parent
f324ba5ef7
commit
94c173a316
@ -1,7 +1,7 @@
|
||||
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
|
||||
From 72ffc473b79180c38918d2e8e46f8f6707e35628 Mon Sep 17 00:00:00 2001
|
||||
From: kangenbo <kangenbo@huawei.com>
|
||||
Date: Sat, 11 Jan 2020 13:04:09 +0800
|
||||
Subject: [PATCH 1/2] Limit number of comparison characters to 4
|
||||
|
||||
Replace the function strcasecmp with strncasecmp
|
||||
---
|
||||
@ -13,13 +13,14 @@ 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;
|
||||
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
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 7f45919a7b70824e49687f11a43ebc09b4bca2c2 Mon Sep 17 00:00:00 2001
|
||||
From: renxudong <renxudong1@huawei.com>
|
||||
Date: Sat, 11 Jan 2020 12:13:45 +0800
|
||||
Subject: Limit maximum of RPC port
|
||||
From f73a0e2c031a482683f39fd8a6aa122186b67a99 Mon Sep 17 00:00:00 2001
|
||||
From: kangenbo <kangenbo@huawei.com>
|
||||
Date: Sat, 11 Jan 2020 13:08:08 +0800
|
||||
Subject: [PATCH 2/2] Limit maximum of RPC port
|
||||
|
||||
---
|
||||
rquota_svc.c | 8 +++++++-
|
||||
@ -11,7 +11,7 @@ diff --git a/rquota_svc.c b/rquota_svc.c
|
||||
index 6e856bb..d0be63f 100644
|
||||
--- a/rquota_svc.c
|
||||
+++ b/rquota_svc.c
|
||||
@@ -53,6 +53,12 @@ int deny_severity, allow_severity; /* Needed by some versions of libwrap */
|
||||
@@ -53,6 +53,12 @@ int deny_severity, allow_severity; /* Needed by some versions of libwrap */
|
||||
char *progname;
|
||||
|
||||
/*
|
||||
@ -25,13 +25,14 @@ index 6e856bb..d0be63f 100644
|
||||
*/
|
||||
struct authunix_parms *unix_cred;
|
||||
@@ -140,7 +146,7 @@ static void parse_options(int argc, char **argv)
|
||||
break;
|
||||
case 'p':
|
||||
port = strtol(optarg, &endptr, 0);
|
||||
- if (*endptr || port <= 0) {
|
||||
+ if (*endptr || port <= PORT_LOWER || port > PORT_UPPER) {
|
||||
errstr(_("Illegal port number: %s\n"), optarg);
|
||||
show_help();
|
||||
exit(1);
|
||||
break;
|
||||
case 'p':
|
||||
port = strtol(optarg, &endptr, 0);
|
||||
- if (*endptr || port <= 0) {
|
||||
+ if (*endptr || port <= PORT_LOWER || port > PORT_UPPER) {
|
||||
errstr(_("Illegal port number: %s\n"), optarg);
|
||||
show_help();
|
||||
exit(1);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user