Ticket 47729 - Directory Server crashes if shutdown during a replication initialization

Bug Description:  When a shutdown was detected we marked that the total update was done
                  prematurely(prp->stopped).  This allowed the replication plugin to close
                  while the total update was still in progress. Other plugins continued to
                  be shutdown (e.g. ldbm database), while the total update was using shared
                  resources - which lead to a crash.

Fix Description:  Only mark the total update protocol as stopped, after it is finished using
                  shared resources.

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

Reviewed by: nhosoi(Thanks!)
(cherry picked from commit e7f7e9127717c1d432b10493b626fed334cc595f)
Ticket 47722 - rsearch filter error on any search filter

Bug Description:  A NULL gets incorrectly added to the search filter, which
                  creates an invalid filter.

Fix Description:  Do not add a NULL character to the search filter.

Original fix submitted by nkinder(Thanks!)

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

Reviewed by: nhoosi(Thanks!)
(cherry picked from commit 8afcf90b0d9d6599144bb1666ca79cef9e91b3ef)
Ticket47722 - Fixed filter not correctly identified

Bug Description:  Due to an improper table initialization, fixed filters
                  were not correctly identifed, which lead to incorrect
                  code execution.

Fix Description:  Correct the table initialization.  Also, removed all the
                  fixed buffers for user supplied values.  Also increased
                  the maximum string length to handle a 64bit unsigned integer.

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

Reviewed by: richm(Thanks!)
Ticket 47740 - Coverity Fixes (Mark - part 1)

Fixed these issues:

12510 - resource leak in lib/libutil/certmap.c
12509 - resource leak in ldap/servers/plugins/chainingdb/cb_bind.c
12508 - resource leak in ldap/servers/plugins/replication/repl5_replica_config.c
12507 - resource leak in ldap/servers/plugins/replication/repl5_replica_config.c
12506 - resource leak in ldap/servers/plugins/chainingdb/cb_config.c
12505 - resource leak in ldap/servers/plugins/posix-winsync/posix-winsync.c
12500 - resource leak in ldap/servers/plugins/chainingdb/cb_instance.c

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

Reviewed by: nhosoi(Thanks!)
(cherry picked from commit d3ed247b7ed59eac8776ea9e73ee21ec8bcd2011)
Ticket 47538 - RFE: repl-monitor.pl plain text output, cmdline config options

RFE Description:  Request option to print report in plain text(instead of HTML), and
                  be able to add the configfuration file directives as command line
                  options.

Fix Description:  Add a new option "-s" for displaying plain text report.

                  Added new options for the config file directives:

                      -c "connection value"
                      -a "alias value"
                      -k "color value"

                  Added a new option (-W, --prompt) to prompt for passwords.

                  Added "long names" to the commandline options.
                  Updated to use:  GetOpts::Long, strict, warnings

                  Cleaned up some HTML code/colors, and indentation.

                  Update man page.

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

Reviewed by: nhosoi, nkinder, and rmeggins(Thanks!!!)
(cherry picked from commit 76abd736d3bf763cc0e7bc1987fe76c27159db6f)
Ticket 47640 - Fix coverity issues - part 3

12504 - resource leak - /ldap/servers/slapd/back-ldbm/import-threads.c
12499 - resource leak - /ldap/servers/slapd/passwd_extop.c
12497 - resource leak - /ldap/servers/slapd/mapping_tree.c
12496 - resource leak - /ldap/servers/slapd/mapping_tree.c
12495 - resource leak - /ldap/servers/plugins/replication/legacy_consumer.c
12493 - resource leak - /ldap/servers/slapd/tools/rsearch/sdattable.c
12492 - resource leak - /ldap/servers/slapd/tools/pwenc.c
12491 - resource leak - /ldap/servers/slapd/tools/mmldif.c

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

Reviewed by: rmeggins(Thanks!)
(cherry picked from commit ff78177452f1ac3da6039640815cc2eaf55b0b40)
Ticket 47740 - Fix coverity erorrs - Part 4

12498 - resource leak - /ldap/servers/plugins/chainingdn/cb_instance.c
12490 - resource leak - /ldap/servers/plugins/chainingdn/cb_controls.c
12489 - resource leak - /ldap/servers/plugins/replication/repl5_replica_config.c
12488 - resource leak - /ldap/servers/slapd/main.c
12485 - resource leak - /ldap/servers/plugins/replication/repl5_replica_config.c
12484 - resource leak - /ldap/servers/plugins/replication/repl5_replica_config.c
12483 - resource leak - /ldap/servers/slapd/back-ldbm/upgrade.c
12482 - resource leak - /ldap/servers/plugins/replication/repl5_replica.c
12481 - resource leak - /ldap/servers/plugins/acl/aclplugin.c
12476 - resource leak - /ldap/servers/slapd/back-ldbm/upgrade.c
12475 - resource leak - /ldap/servers/slapd/back-ldbm/upgrade.c

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

Reviewed by: nhosoi(Thanks!)