Medium: VirtualDomain: if the configuration file is missing on stop exit with success
Merge branch 'master' of github.com:ClusterLabs/resource-agents
Medium: oracle: connect as a regular user in monitor

Every connection as sysdba is logged in an audit log. This can
result in a large number of new files created. A new user named
OCFMON is created (if it doesn't exist) in the start action and
subsequently used in monitor. It has very limited rights.
Med: tools/sfex_lib.c: sfex_init fails on a 64 bit big endian platform

sfex_init failed on a 64 bit big endian platform.
Message at that time is the following.
 "ERROR: Failed to allocate aligned memory"

The same problem also occurs in sfex_stat,sfex_daemon that use the sfex_lib.

This issue caused by difference of the variable type.
The ioctl() system call return sector_size as a int type,
but sector_size is defined as a unsigned long type in the sfex_lib.

This patch has made the following changes to the sfex_lib.
 - add a new int value(sec_tmp) for ioctl() argument.
 - in after ioctl(), a new value(sec_tmp) is copied to sector_size as unsigned long.
Merge pull request #139 from higashik/sfex-patch

Med: tools/sfex_lib.c: sfex_init fails on a 64 bit big endian platform
Medium: Xen: repair node_ip_attribute use
Medium: Squid: fix getting PIDs of squid processes (lf#2653)

Squid uses netstat -apn to figure out the list of processes
serving clients, but didn't take into account the connections in
the TIME_WAIT state which have no process. This could result in
failed stop (probably other false positives too).

Thanks to bugsquid@fantasymail.de for finding the problem and
suggesting a fix.
Low: Squid: use the advertised stop escalation timeout of 10 seconds (lf#2653)
Medium: portblock: use end-of-word instead of space at the end of the line

On newer distros (eg. Ubuntu 12.04) with iptables 1.4.12 there's no
space at the end of the output anymore, so use "end-of-word" - that
works with "end-of-string" and a space.
Merge branch 'master' of github.com:ClusterLabs/resource-agents
Medium: named: use pgrep instead of searching in ps(1) output (thanks to Timur Bakeyev)
Medium: named: fix monitor if named_rootdir is set to /
Low: tools/findif: fix comment typos

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Low: tools/findif: make ConvertQuadToInt use netmask_bits fnc

This is not only to simplify ConvertQuadToInt and practice DRY
principle, but also to make it a little bit safer.  Because
of vague data types involved (instead of uint32_t at al.),
this at least adds one assurance and that is that the logic
will not get broken on architecture with 16bit int
(provided that long has still 32bit, which is not guaranteed
either).

Newly, failure of inet_pton (especially, malformed IP address
format) is indicated via -1 return value.  Previously, such
case was not handled safely.

The patch also unifies tab usage (ConvertQuadToInt was the only
function using spaces for indentation).

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Low: tools/findif: split ValidateNetmaskBits (conv.+valid.)

This commits moves conversion logic from ValidateNetmaskBits into
a separate function (ConvertNetmaskBitsToInt).  This way, we can
validate resulting number of netmask's bits, no matter if the original
string specified netmask as IP expression (via ConvertQuadToInt) or
directly as number of its bits (via ConvertNetmaskBitsToInt).

In turn, we are reaching the original goal to remove ill-advised
reuse of the storage with a string obtained by getenv call
(see netmaskbits, its initialization and rewrite using snprintf).

Strictly viewed, pointer to string returned by getenv should rather
not be stored at all (see [1]), but at least, this patch makes
the program conform to "[t]he application shall ensure that it does
not modify the string pointed to by the getenv() function" part
of getent POSIX documentation (per [1], C standard ditto).

[1] https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=1703960

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Medium: IPaddr2: use better test for infiniband (bnc#783353)
Low: tools/findif: remove superfluous string termination

The string is already terminated at that position
(see "man fgets strlen").

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Low: tools/findif: sanitize SearchUsingRouteCmd a bit

Not knowing how the input SearchUsingRouteCmd generates and subsequently
processing [*], only the most conservative changes are contained in this
patch.

First, there was a futile assigment that would only be valid if
commented out strsep calls were in effect.  Due to this, the assigment
was also only commented out.

Next, return value used to be taken from the first strtok in sequence,
only to be overwritten by another one.

Finally, if strtok unexpectedly returned NULL (due to input format other
than expected), it was not handled gracefully.

[*] "route -n get <addr>" is not supported in RHEL neither in Fedora

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Med: heartbeat/IPv6addr.c: missing check for socket call

Suggested-by: Pavel Raiskup <praiskup@redhat.com>
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Med: heartbeat/IPv6addr.c: bad check for socket call

Suggested-by: Pavel Raiskup <praiskup@redhat.com>
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>