* [Cluster-devel] cluster/ccs/lib libccs.c
@ 2007-10-11 5:10 rmccabe
0 siblings, 0 replies; 5+ messages in thread
From: rmccabe @ 2007-10-11 5:10 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rmccabe at sourceware.org 2007-10-11 05:10:50
Modified files:
ccs/lib : libccs.c
Log message:
E2BIG is more appropriate than ENOSPC here
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/lib/libccs.c.diff?cvsroot=cluster&r1=1.11&r2=1.12
--- cluster/ccs/lib/libccs.c 2007/10/08 16:43:21 1.11
+++ cluster/ccs/lib/libccs.c 2007/10/11 05:10:49 1.12
@@ -658,7 +658,7 @@
ret = snprintf(path, sizeof(path),
"/cluster/clusternodes/clusternode[@name=\"%s\"]/@name", nodename);
if (ret < 0 || (size_t) ret >= sizeof(path))
- return (-ENOSPC);
+ return (-E2BIG);
str = NULL;
error = ccs_get(cd, path, &str);
@@ -668,7 +668,7 @@
}
if (nodename_len >= sizeof(host_only))
- return (-ENOSPC);
+ return (-E2BIG);
/* Try just the hostname */
strcpy(host_only, nodename);
@@ -680,7 +680,7 @@
"/cluster/clusternodes/clusternode[@name=\"%s\"]/@name",
host_only);
if (ret < 0 || (size_t) ret >= sizeof(path))
- return (-ENOSPC);
+ return (-E2BIG);
str = NULL;
error = ccs_get(cd, path, &str);
@@ -733,14 +733,14 @@
if (altcnt == 0) {
if (strlen(str) >= sizeof(canonical_name)) {
free(str);
- return (-ENOSPC);
+ return (-E2BIG);
}
strcpy(canonical_name, str);
}
if (strlen(str) >= sizeof(cur_node)) {
free(str);
- return (-ENOSPC);
+ return (-E2BIG);
}
strcpy(cur_node, str);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Cluster-devel] cluster/ccs/lib libccs.c
@ 2007-10-11 5:11 rmccabe
0 siblings, 0 replies; 5+ messages in thread
From: rmccabe @ 2007-10-11 5:11 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-10-11 05:11:26
Modified files:
ccs/lib : libccs.c
Log message:
E2BIG is more appropriate than ENOSPC here
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/lib/libccs.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.10.2.1&r2=1.10.2.2
--- cluster/ccs/lib/libccs.c 2007/10/08 20:29:00 1.10.2.1
+++ cluster/ccs/lib/libccs.c 2007/10/11 05:11:26 1.10.2.2
@@ -658,7 +658,7 @@
ret = snprintf(path, sizeof(path),
"/cluster/clusternodes/clusternode[@name=\"%s\"]/@name", nodename);
if (ret < 0 || (size_t) ret >= sizeof(path))
- return (-ENOSPC);
+ return (-E2BIG);
str = NULL;
error = ccs_get(cd, path, &str);
@@ -668,7 +668,7 @@
}
if (nodename_len >= sizeof(host_only))
- return (-ENOSPC);
+ return (-E2BIG);
/* Try just the hostname */
strcpy(host_only, nodename);
@@ -680,7 +680,7 @@
"/cluster/clusternodes/clusternode[@name=\"%s\"]/@name",
host_only);
if (ret < 0 || (size_t) ret >= sizeof(path))
- return (-ENOSPC);
+ return (-E2BIG);
str = NULL;
error = ccs_get(cd, path, &str);
@@ -733,14 +733,14 @@
if (altcnt == 0) {
if (strlen(str) >= sizeof(canonical_name)) {
free(str);
- return (-ENOSPC);
+ return (-E2BIG);
}
strcpy(canonical_name, str);
}
if (strlen(str) >= sizeof(cur_node)) {
free(str);
- return (-ENOSPC);
+ return (-E2BIG);
}
strcpy(cur_node, str);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Cluster-devel] cluster/ccs/lib libccs.c
@ 2007-10-26 19:18 rmccabe
0 siblings, 0 replies; 5+ messages in thread
From: rmccabe @ 2007-10-26 19:18 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rmccabe at sourceware.org 2007-10-26 19:18:10
Modified files:
ccs/lib : libccs.c
Log message:
Keep gcc from reporting a bogus warning when compiling with -Wformat=2
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/lib/libccs.c.diff?cvsroot=cluster&r1=1.12&r2=1.13
--- cluster/ccs/lib/libccs.c 2007/10/11 05:10:49 1.12
+++ cluster/ccs/lib/libccs.c 2007/10/26 19:18:10 1.13
@@ -702,7 +702,6 @@
** Try to match against each clusternode in cluster.conf.
*/
for (i = 1 ; ; i++) {
- const char *pathstr = NULL;
char canonical_name[128];
unsigned int altcnt;
@@ -717,7 +716,9 @@
char cur_node[128];
if (altcnt != 0) {
- ret = snprintf(path, sizeof(path), pathstr, i, altcnt);
+ ret = snprintf(path, sizeof(path),
+ "/cluster/clusternodes/clusternode[%u]/altname[%u]/@name",
+ i, altcnt);
if (ret < 0 || (size_t) ret >= sizeof(path))
continue;
}
@@ -788,8 +789,7 @@
free(str);
- /* Try any altnames */
- pathstr = "/cluster/clusternodes/clusternode[%u]/altname[%u]/@name";
+ /* Now try any altnames */
}
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Cluster-devel] cluster/ccs/lib libccs.c
@ 2007-11-14 16:51 lhh
0 siblings, 0 replies; 5+ messages in thread
From: lhh @ 2007-11-14 16:51 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: lhh at sourceware.org 2007-11-14 16:51:20
Modified files:
ccs/lib : libccs.c
Log message:
Allow ccs_connect to fail correctly if a non-root user calls it; needed for #289501
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/lib/libccs.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.10.2.2&r2=1.10.2.3
--- cluster/ccs/lib/libccs.c 2007/10/11 05:11:26 1.10.2.2
+++ cluster/ccs/lib/libccs.c 2007/11/14 16:51:20 1.10.2.3
@@ -199,7 +199,7 @@
error = PF_INET;
break;
}
- if(error == -ECONNREFUSED){
+ if(error == -ECONNREFUSED || error == -EACCES){
break;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Cluster-devel] cluster/ccs/lib libccs.c
@ 2008-01-21 22:31 jbrassow
0 siblings, 0 replies; 5+ messages in thread
From: jbrassow @ 2008-01-21 22:31 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: jbrassow at sourceware.org 2008-01-21 22:31:54
Modified files:
ccs/lib : libccs.c
Log message:
- ccs library now checks for bad file descriptors as input
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/lib/libccs.c.diff?cvsroot=cluster&r1=1.14&r2=1.15
--- cluster/ccs/lib/libccs.c 2008/01/07 05:52:28 1.14
+++ cluster/ccs/lib/libccs.c 2008/01/21 22:31:42 1.15
@@ -409,6 +409,9 @@
ENTER("ccs_disconnect");
+ if (desc < 0)
+ return -EINVAL;
+
if(!(buffer = malloc(512))){
error = -ENOMEM;
goto fail;
@@ -452,6 +455,9 @@
ENTER("_ccs_get");
+ if (desc < 0)
+ return -EINVAL;
+
if(!(buffer = malloc(512))){
error = -ENOMEM;
goto fail;
@@ -535,6 +541,9 @@
ENTER("ccs_get_state");
+ if (desc < 0)
+ return -EINVAL;
+
if(!(buffer = malloc(512))){
error = -ENOMEM;
goto fail;
@@ -594,6 +603,9 @@
ENTER("ccs_set_state");
+ if (desc < 0)
+ return -EINVAL;
+
if(!(buffer = malloc(512))){
error = -ENOMEM;
goto fail;
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-01-21 22:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-14 16:51 [Cluster-devel] cluster/ccs/lib libccs.c lhh
-- strict thread matches above, loose matches on Subject: below --
2008-01-21 22:31 jbrassow
2007-10-26 19:18 rmccabe
2007-10-11 5:11 rmccabe
2007-10-11 5:10 rmccabe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).