Commit Graph

32 Commits

Author SHA1 Message Date
Steven Dake
6992410df6 Remove checking of sub parameters in service.d files.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3024 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-08-24 18:45:43 +00:00
Jan Friesse
eda1e364f4 Remove pathconf which may fall
Corosync has problem with readdir_r if pathconf function fails.

Main problem is hidden in calling pathconf (internally calls statfs)
which may fail. After this fail, newly allocated memory for readdir_r
was smaller than expected and memory was overwritten by readdir_r.

Patch removes calling of pathconf and rather use NAME_MAX constant which
is always large enough for all file systems.

Also return value of malloc SHOULD be checked.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2962 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-06-23 08:39:49 +00:00
Angus Salkeld
8236a0873e cov 10404: don't assign loc pointer when not used.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2847 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-18 00:14:02 +00:00
Angus Salkeld
20f3331d0e convert strerror() into strerror_r()
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2665 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-25 19:28:36 +00:00
Angus Salkeld
2290913d28 convert readdir into readdir_r
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2664 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-25 19:26:54 +00:00
Jan Friesse
99db356765 Fix coroparse to allow white chars before comment
- allows white characters before #
- new function to parse log destinations (remove code duplicity)
- clarify man page


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2642 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-01-13 09:52:07 +00:00
Angus Salkeld
73b7aa19bb Add value types to objdb keys.
This allows you to create a key with a know type.
And then get the type with the key value.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2511 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-10 03:20:38 +00:00
Fabio M. Di Nitto
3ffb151aa7 Fix missing symbol error when loading plugins without executive
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2405 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-07 10:41:42 +00:00
Jan Friesse
996850db39 Support for service.d
This patch is very similar to uidgid.d patch, but support for loading
services (so read service section).


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2368 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-22 08:25:45 +00:00
Fabio M. Di Nitto
2135d91c27 Fix handling of sysconfdir
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2265 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 07:02:55 +00:00
Jan Friesse
c54e74e3f6 Make /etc/corosync/corosync.conf default configuration file
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2235 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-12 10:22:32 +00:00
Steven Dake
ae5895c3f7 Call initializer directly for broken platforms which don't honor ctors in the shared object on dlopen.
This could probably be more tidy to detect those OS platforms which don't do this instead of hardcoding
to a specific platform we intend to port to.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2221 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 07:47:10 +00:00
Steven Dake
6fd822c485 Include limits.h in coroparse.c to properly define PATH_MAX.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2220 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 07:36:44 +00:00
Steven Dake
1bd8aba6bb Change NAME_MAX to FILENAME_MAX to compile properly on Posix OS.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2219 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 07:36:11 +00:00
Steven Dake
1e0d40cdeb Make readdir operation portable by removing BSDism from coroparse.c.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2215 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 02:30:13 +00:00
Jan Friesse
ae22983140 Support for uidgid feature
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2198 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-20 13:30:29 +00:00
Jim Meyering
1f40a10983 don't include <signal.h> when it's not used
* exec/coroparse.c: Likewise.
* exec/quorum.c: Likewise.
* exec/sync.c: Likewise.
* exec/totemmrp.c: Likewise.
* exec/totemnet.c: Likewise.
* exec/totemrrp.c: Likewise.
* exec/totemsrp.c: Likewise.
* exec/vsf_quorum.c: Likewise.
* exec/vsf_ykd.c: Likewise.
* lcr/uic.c: Likewise.
* lcr/uis.c: Likewise.
* lib/cfg.c: Likewise.
* services/cfg.c: Likewise.
* services/cpg.c: Likewise.
* services/evs.c: Likewise.
* services/pload.c: Likewise.
* services/testquorum.c: Likewise.
* services/votequorum.c: Likewise.
* test/testconfdb.c: Likewise.
* test/testcpg.c: Likewise.
* test/testcpgzc.c: Likewise.
* test/testzcgc.c: Likewise.
* tools/corosync-cfgtool.c: Likewise.
* tools/corosync-objctl.c: Likewise.
* tools/corosync-pload.c: Likewise.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2193 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 16:41:46 +00:00
Jan Friesse
94b64352a4 coroparse: Handle different EOLs and pass error_string
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2186 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 11:44:58 +00:00
Steven Dake
e9d718d01d Remove mempool since it is unused and isn't going to be a feature in
this release.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2141 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-23 19:39:20 +00:00
Jim Meyering
283011c669 rename function: s/strstr_rs/strchr_rs/ to reflect new semantics
* exec/coroparse.c (parse_section):
* exec/util.c (strchr_rs, strstr_rs):
* exec/util.h (corosync_exit_error):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2112 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-21 11:56:55 +00:00
Jim Meyering
89c6d6a1a1 rewrite strstr_rs not to use strdup
strstr_rs used strdup and didn't handle failure.  This change removes
the use of strdup as well as the uses of strstr, since all callers
passed a string of length 1 as the second argument.  This also changes
the prototype so that the 2nd parameter is a byte, not a string.

* util.h (strstr_rs): Adjust prototype.
* util.c (strstr_rs): Rewrite/simplify.
* sa-confdb.c (strstr_rs): Remove duplicate definition.
* coroparse.c (parse_section): Update callers.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2111 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-21 11:56:47 +00:00
Steven Dake
870046d065 Patch to use snprintf where appropriate to avoid buffer overrun.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1990 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-02 18:49:24 +00:00
Jim Meyering
23c64c6413 coroparse.c: add const: avoid 2 warnings
* exec/coroparse.c: Add const.  Tweak s/fp==0/fp==NULL/

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1956 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:15:57 +00:00
Fabio M. Di Nitto
031c02f589 - Every .c file should include "config.h" to get the right defines...
- services/Makefile.am: add include search paths for config.h

- include/corosync/cs_config.h.in exports LCRSODIR and SOCKETDIR

- tools/Makefile.am: drop -D defines for dirs that are now in
cs_config.h or config.h

- configure.ac: sanitize prefix and exec_prefix paths. Export DIRS in
*config.h

- lib/Makefile.am: : drop -D defines for dirs that are now in
cs_config.h or config.h. Add rule to build lcr_ifact.o or building from
lib/ fails miserably



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1877 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 12:58:53 +00:00
Steven Dake
5eacc5df82 Don't clobber stack on strings with length of zero.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1874 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 10:20:19 +00:00
Fabio M. Di Nitto
20e0336de5 configure.ac:
- Fix white space for --help.
 - Drop LCRSODIR as global and move it to local directory.

all */Makefile.am:
 - export -DDIRECTORY_NAME as required (for now only LCRSO and
SYSCONFDIR)

top level Makefile.am:
- drop hardcoded ETCDIR that is just wrong and use the configured one

*.c files around:
- drop hardcoded ETCDIR and use configured one.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1853 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-16 13:54:40 +00:00
Steven Dake
58ab8d4a65 Unification around hdb_handle_t data type.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1782 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-25 11:14:47 +00:00
Steven Dake
dd3991c0bb Proper rename of openais usage to corosync throughout tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1637 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:54:46 +00:00
Steven Dake
e1f531380a Revert patch 1633 which breaks build.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1636 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:44:26 +00:00
Steven Dake
c4a1c7eb96 Change all occurances of openais to corosync.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1633 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:04:01 +00:00
Fabien Thomas
0c92a5e564 reorganize include file to match installed tree to build openais without installing corosync; correct some warnings and error under FreeBSD and Darwin
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1632 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 14:59:50 +00:00
Steven Dake
617dbdf2f0 Split openais and corosync tree into two seperate repositories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1622 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-05 13:23:46 +00:00