75e953789d
- corosync-2.4.4 is available now(bsc#1089836) man:fix in corosync-qdevice.8 quorumtool: remove duplicated help message cfg: nodeid should be unsigned int coroparse: Use readdir instead of readdir_r wd: fix snprintf warnings Fix compile errors in qdevice on FreeBSD qdevice: mv free(str) after port validation Fix various typos Fix typo: recomended -> recommended man: support SOURCE_DATE_EPOCH configure: add --with-initconfigdir option Use static case blocks to determine distro flavor Use RuntimeDirectory instead of tmpfiles.d coroparse: Do not convert empty uid, gid to 0 sam: Fix snprintf compiler warnings quorumtool: Use full buffer size in snprintf man: Add note about qdevice parallel cmds start sync: Remove unneeded determine sync code sync: Call sync_init of all services at once corosync.conf: publicize nodelist.node.name totemudp[u]: Drop truncated packets on receive logging: Make blackbox configurable logging: Close before and open blackbox after fork init: Quote subshell result properly blackbox: Quote subshell result properly qdevice: quote certutils scripts properly sam_test_agent: Remove unused assignment qdevice: Fix NULL pointer dereference quorumtool: Don't set our_flags without v_handle OBS-URL: https://build.opensuse.org/request/show/598458 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=143
43 lines
1.1 KiB
Diff
43 lines
1.1 KiB
Diff
From 31d931be66ef9ebf0aeb8e1dffa33e3280bfe732 Mon Sep 17 00:00:00 2001
|
|
From: Bin Liu <bliu@suse.com>
|
|
Date: Tue, 17 Apr 2018 17:06:20 +0800
|
|
Subject: [PATCH] do not convert empty uid gid to 0
|
|
|
|
---
|
|
exec/coroparse.c | 12 ++++++++++++
|
|
1 file changed, 12 insertions(+)
|
|
|
|
diff --git a/exec/coroparse.c b/exec/coroparse.c
|
|
index 96bb83a..da82d54 100644
|
|
--- a/exec/coroparse.c
|
|
+++ b/exec/coroparse.c
|
|
@@ -139,6 +139,12 @@ static int uid_determine (const char *req_user)
|
|
long int id;
|
|
char *ep;
|
|
|
|
+ if(*req_user == '\0') {
|
|
+ sprintf (error_string_response,
|
|
+ "The user can not be empty, please read the documentation.");
|
|
+ return (-1);
|
|
+ }
|
|
+
|
|
id = strtol(req_user, &ep, 10);
|
|
if (*req_user != '\0' && *ep == '\0' && id >= 0 && id <= UINT_MAX) {
|
|
return (id);
|
|
@@ -193,6 +199,12 @@ static int gid_determine (const char *req_group)
|
|
long int id;
|
|
char *ep;
|
|
|
|
+ if(*req_group == '\0') {
|
|
+ sprintf (error_string_response,
|
|
+ "The group can not be empty, please read the documentation.");
|
|
+ return (-1);
|
|
+ }
|
|
+
|
|
id = strtol(req_group, &ep, 10);
|
|
if (*req_group != '\0' && *ep == '\0' && id >= 0 && id <= UINT_MAX) {
|
|
return (id);
|
|
--
|
|
2.13.6
|
|
|