Coverity Fixes (Part 4)

11753 - Resource leak (aclparse.c)
11754 - Resource leak (dna.c)
11755 - Resource leak (dna.c)
11756 - Resource leak (linked_attrs.c)
11757 - Resource leak (pam_ptconfig.c)
11758 - Resource leak (repl5_replica_config.c)
11759 - Resource leak (windows_inc_protocol.c)
11760 - Resource leak (syntaxes/value.c)
11761 - Resource leak (dblayer.c)
11764 - Resource leak (dblayer.c)
11766 - Resource leak (dblayer.c)
11769 - Resource leak (entry.c)
11770 - Resource leak (entry.c)
11771 - Resource leak (entrywsi.c)
11772 - Resource leak (entrywsi.c)
11773 - Resource leak (schema.c)
11774 - Resource leak (snmp_collator.c)
11775 - Resource leak (ldclt/data.c)
11776 - Resource leak (tools/mmldif.c)
11777 - Resource leak (snmp/main.c)
11778 - Resource leak (lib/libutil/dbconf.c)
11779 - Resource leak (lib/libaccess/register.cpp)
11781 - Resource leak (lib/libadmin/error.c)
11872 - Resource leak (agtmmap.c)

https://bugzilla.redhat.com/show_bug.cgi?id=970221

Reviewed by: nhosoi(Thanks!)
Coverity Fixes (Part 5)

11784 - Deference before null check (uiduniq/uid.c)
11785 - Deference before null check (conntable.c)
11786 - Deference before null check (opshared.c)
11787 - Deference before null check (tools/dbscan.c)
11788 - Deference before null check (tools/dbscan.c)
11789 - Deference before null check (tools/dbscan.c)
11790 - Allocation size mismatch (idl.c)
11791 - Allocation size mismatch (idl.c)
11792 - Wrong sizeof argument (dna.c)
11793 - Stray semicolon (lib/base/util.c)
11794 - Stray semicolon (lib/base/util.c)
11795 - Destination buffer too small (log.c)
11809 - Use after free (repl5_mtnode_ext.c)
11849 - Unitialized sclara variable (dblayer.c)

https://bugzilla.redhat.com/show_bug.cgi?id=970221

Reviewed by: richm(Thanks!!)
Ticket #47378 - fix recent compiler warnings

https://fedorahosted.org/389/ticket/47378
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Fix the various compiler warnings as reported by
http://jenkins.cloud.fedoraproject.org/job/389-ds-base/ws/build-warns.1370449480.txt
In addition, fixed a bug in the slapi_re_subs_ext - if there was an
ampersand that did not need to be replaced, that is, if the ampersand
was part of an LDAP search filter, it was replaced with a '('.  Also, an
ampersand preceeded by an open parenthesis and followed by a non-open
parenthesis is supposed to be replaced in the string, but this was not
working.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
Ticket 47350 - (Cont.) Allow search to look up 'in memory RUV'

Bug Description:
	Returning the in memory RUV in place of the DB RUV is not
	systematically the right thing to do.
	For administrative operations (like total update), the server
	wants to access the real DB RUV and not the in memory RUV.

Fix Description:
	The fix checks if the search is an internal search.
	if it is it returns the DB RUV (tombstone)

https://fedorahosted.org/389/ticket/47350

Reviewed by: Rich and Noriko (thanks for your review and help :) )

Platforms tested: Fedora 18

Flag Day: no

Doc impact: no
Ticket 47385 - DS not shutting down when disk monitoring threshold is reached

Bug Description:  If verbose logging is enabled, it fails to correctly
                  identify that the logging was disabled, and it gets
                  stuck in an endless loop - never shutting the server down.

                  Also, whe the server does shutdown due to a disk full, the
                  pid file is not removed.

Fix Description:  Check for the two possible error log levels that indicate
                  verbose logging is disabled.  There were also logic errors
                  when determining if it was ok to disable access/audit logging,
                  and if to delete rotated logs.

                  Also removed the "nsslapd-disk-monitoring-preserve-logging"
                  setting, as it really didn't served a purpose because it was
                  basically the same as "nsslapd-disk-monitoring-logging-critical".

                  Lastly, if the server is being shutdown from a "disk full"
                  condition, then we need to manually remove the pidfile.

https://fedorahosted.org/389/ticket/47385

Reviewed by: Noriko(Thanks!)
Fri Jun 7 10:41:00 2013 -0400

    Coverity Fixes (Part 6)

    11611 - Unchecked value (main.c)
    11671 - Copy-paste error (cb_instance.c)
    11704 - Dereference after null check (repl5_replica_config.c)
    11766 - Resource leak (dblayer.c)
    11873 - Argument can not be negative (ldclt/data.c)
    Jenkins error:  mmldif.c
    11876 - Deference before null check (cl5_clcache.c)

    https://bugzilla.redhat.com/show_bug.cgi?id=970221

    Reviewed by: Rich(Thanks!)