Ticket 47427 - Overflow in nsslapd-disk-monitoring-threshold

Bug Description:  If you directory try and set the threshold to -2,
                  the server allows it, but it should be rejected.

Fix Description:  With PR_snprintf and other NSPR formatting functions,
                  %lld must be used with LONG_MAX, instead of %ld which
                  must be used with regular printf.

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

Reviewed by: mreynolds (Thanks!)
Ticket 47450 - Fix compiler formatting warning errors for 32/64 bit arch

Description:  Properly cast NSPR integer data types when formatting strings for logging.

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

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

Description: This patch removes unused function compare_entries
in back-ldbm/sort.c.

https://fedorahosted.org/389/ticket/47378
Ticket 47447 - logconv.pl man page missing -m,-M,-B,-D

Fix Description:  Added the missing info, and also updated the main arguments
                  with their long option names.

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

Reviewed by: nhosoi(Thanks!)
 Ticket 47323 - resurrected entry is not correctly indexed

Bug Description:  If a tombstone entry is resurrected to a glue entry
                  the indexes are not updated correctly.  The objectclass
                  index still shows the resurrected ID in the nsTombstone key.

Fix Description:  Add the correct EQUALITY flag to the index delete function.
                  Otherwise the delete operation is skipped in
                  index_addordel_values_ext_sv().

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

Reviewed by: richm(Thanks!!)
CVE-2013-2219 ACLs inoperative in some search scenarios
 fix compiler warning
Ticket 47440 - Fix compilation warnings and header files

Original patches submitted by: 	lslebodn(Thanks!!)

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

Reviewed by: richm(Thanks!)
Ticket 47440 - Fix runtime errors caused by last patch.

Author: richm

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

Reviewed by: mreynolds
Ticket #47448 - Segfault in 389-ds-base-1.3.1.4-1.fc19 when setting up FreeIPA replication

https://fedorahosted.org/389/ticket/47448
Reviewed by: lkrispenz (Thanks!)
Branch: master
Fix Description: valueset_add_valueset() sets the values in the vs1
destination valueset.  It expects that vs1 is empty.  Particularly, the
sorted array.  If the source valueset vs2->sorted is NULL, it assumes
vs1->sorted is NULL already, and does not free it and set it to NULL.
The fix is to free both vs1->sorted and vs1->va.  NOTE: this fixes
the crash, but does not address the larger issue that the semantics of
valueset_add_valueset are not correct - valueset_add_valueset should add
the values from vs2 to vs1, rather than replace vs1 with vs2.
Also added post-condition assertions.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
Ticket #47455 - valgrind - value mem leaks, uninit mem usage

https://fedorahosted.org/389/ticket/47455
Reviewed by: lkrispenz, nhosoi (Thanks!)
Branch: master
Fix Description: Make sure to use slapi_valueset_done to free valuesets to
clean up everything.  Make sure to free the values in valueset_set_valueset
before setting them.  The calculation of the size of the values to write
to the changelog was wrong.  It was finding the size of the length by doing
sizeof(bv.bv_len) which is 8 bytes on 64-bit platforms, but using PRInt32 which
is 4 bytes on all platforms to actually store the length.  So each length
calculation was using an extra 4 bytes, and writing this as uninitialized
memory to the changelog db.
In slapi_valueset_add_attr_valuearray_ext(), if an error is returned, and
the PASSIN flag was used, set the vs->va[0] to NULL - this will allow the
called to use both slapi_valueset_done(vs) and valuearray_free(&addvals) -
addvals will still own all of the values.
Cleaned up some other memory leaks and uninitialized memory uses.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit 5633e125a462fa174186d1a8adba3ee00c43e3cd)
Ticket #47456 - delete present values should append values to deleted values

https://fedorahosted.org/389/ticket/47456
Reviewed by: lkrispenz (Thanks!)
Branch: master
Fix Description: When deleting all values, entry_delete_present_values_wsi was
deleting all values in the deleted_values set and replacing them with the
present_values set.  It should not delete the values in the deleted_values
set, it should just add to them.  This also renames valueset_add_valueset
to valueset_set_valueset, which is what it was doing anyway.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
fix coverity 11895 - null deref - caused by fix to ticket 47392

reviewed by: nhosoi (Thanks!)
fix coverity 11915 - dead code - introduced with fix for ticket 346

just get rid of unused variable was_present_null
reviewed by: nhosoi (Thanks!)
Ticket 47411 - Replace substring search with plain search in referint plugin

Bug Description:  RI plugin uses a substring search by default, which is much more
                  expensive than an equality search filter.

Fix Description:  Only use the substring search if the operation is a modrdn.

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

Reveiwed by: richm(Thanks!)
Ticket 47425 - should only call windows_update_done if repl agmt type is windows

Description:  we should only call windows_update_done() if the agreement is for AD.

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

Reveiwed by: richm(Thanks!)
Ticket #47455 - valgrind - value mem leaks, uninit mem usage

https://fedorahosted.org/389/ticket/47455
Reviewed by: lkrispenz, nhosoi (Thanks!)
Branch: master
Fix Description: Can only free import job if it is not a task.  If it is
a task, the job will be freed by the task destructor.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
Ticket 47426 - move compute_idletimeout out of handle_pr_read_ready

Description:  Instead of calculating the idletimeout everytime new data is received,
              set the anonymous reslimit idletimeout and handle in the connection struct when the
              connection first comes in.  Then update idletimeout after each bind.

              I removed compute_idletimeout() because bind_credentials_set_nolock()
              basically does the same thing, so it was just extended to update
              the idletimeout.

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

Reviewed by: richm(Thanks!)
Ticket47426 - Coverity issue with last commit(move compute_idletimeout out of handle_pr_read_ready)

I had added a NULL check trying to avoid a coverity error, but pb->pb_conn can not be
NULL when it gets to this code.  Removed NULL check.

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

Reviewed by: ?
Ticket #626 - Possible to add nonexistent target to ACI

Fix description: This patch checks if the acl target exists and logs
a warning in the server log if the target does not exist. It does
not, however, validate targets containing wildcards or macros

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

Reviewed by rmeggins and nhosoi.