代码拉取完成,页面将自动刷新
From f73a0e2c031a482683f39fd8a6aa122186b67a99 Mon Sep 17 00:00:00 2001
From: kangenbo <[email protected]>
Date: Sat, 11 Jan 2020 13:08:08 +0800
Subject: Limit maximum of RPC port
Limit maximum of RPC port
---
rquota_svc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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 */
char *progname;
/*
+ * Port upper and lower limits
+ */
+#define PORT_UPPER 0xFFFF
+#define PORT_LOWER 0
+
+/*
* Global authentication credentials.
*/
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);
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。