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
- 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
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
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
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
- 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
- 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