Changes to 'refs/tags/389-ds-base-1.2.10.2'
by Richard Allen Megginson
Changes since 389-ds-base-1.2.6.a1:
Endi S. Dewata (168):
Bug 545620 - Password cannot start with minus sign
Bug 538525 - Ability to create instance as non-root user
Bug 570542 - Root password cannot contain matching curly braces
Bug 470684 - Pam_passthru plugin doesn't verify account activation
Bug 573375 - MODRDN operation not logged
Bug 520151 - Error when modifying userPassword with proxy user
Bug 455489 - Address compiler warnings about strict-aliasing rules
Bug 566320 - RFE: add exception to removal of attributes in cn=config for aci
Bug 566043 - startpid file is only cleaned by initscript runs
Bug 584109 - Slapd crashes while parsing DNA configuration
Bug 542570 - Directory Server port number is not validated in the beginning.
Bug 145181 - Plugin target/bind subtrees only take 1 value.
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 628096 - spurious error message from /sbin/service when doing a stop on no instances
Bug 573889 - Migration does not remove deprecated schema
Bug 606545 - core schema should include numSubordinates
Bug 643979 - Strange byte sequence for attribute with no values (nsslapd-referral)
Endi Sukma Dewata (16):
Bug 630092 - Coverity #12117: Resource leaks issues
Bug 630092 - Coverity #15478: Resource leaks issues
Bug 630092 - Coverity #15479: Resource leaks issues
Bug 630092 - Coverity #15481: Resource leaks issues
Bug 630092 - Coverity #15482: Resource leaks issues
Bug 630092 - Coverity #15483: Resource leaks issues
Bug 630092 - Coverity #15484: Resource leaks issues
Bug 630092 - Coverity #15485: Resource leaks issues
Bug 630092 - Coverity #15487: Resource leaks issues
Bug 630092 - Coverity #15490: Resource leaks issues
Bug 630092 - Coverity #15497: Resource leaks issues
Bug 630092 - Coverity #11991: Resource leaks issues
Bug 630092 - Coverity #12000: Resource leaks issues
Bug 630092 - Coverity #12003: Resource leaks issues
Bug 630092 - Coverity #11985: Resource leaks issues
Bug 630092 - Coverity #11992,11993: Resource leaks issues
Mark Reynolds (17):
Ticket #71 - unable to delete managed entry config
Ticket #159 - Managed Entry Plugin runs against managed entries upon any update without validating
Ticket #177 - logconv.pl doesn't detect restarts
Merge branch 'ticket159'
Ticket #49 - better handling for server shutdown while long running tasks are active
Ticket #50 - server should not call a plugin after the plugin close function is calle
Updated for ticket#50
Ticket #55 - Limit of 1024 characters for nsMatchingRule
Ticket #140 - incorrect memset parameters
Revert "Ticket #140 - incorrect memset parameters"
Revert "Ticket #55 - Limit of 1024 characters for nsMatchingRule"
Ticket #38 - nisDomain schema is incorrect
Ticket #6 - protocol error from proxied auth operation
Ticket #55 - Limit of 1024 characters for nsMatchingRule
Ticket #39 - Account Policy Plugin does not work for simple binds when PAM Pass Through Auth plugin is enabled
Ticket 175 - logconv.pl improvements
Ticket 175 - minor fixes
Nathan Kinder (188):
Bug 549554 - Trim single-valued attributes before sending to AD
Improve search for pcre header file
Bug 434735 - Allow SASL ANONYMOUS mech to work
Bug 570912 - Avoid selinux context conflict with httpd
Allow instance name to be parsed from start-slapd
Add managed entries plug-in
Bug 572355 - Label instance files and ports during upgrade.
Bug 578863 - Password modify extop needs to send referrals on replicas
Bug 584156 - Remove ldapi socket file during upgrade
Fix rsearch usage of name files for random filters
Bug 584497 - Allow DNA plugin to set same value on multiple attributes
Add replication session hooks
Correct function prototype for repl session hook
Bug 592389 - Set anonymous resource limits properly
Bug 601433 - Add man pages for start-dirsrv and related commands
Bug 604263 - Fix memory leak when password change is rejected
Bug 612242 - membership change on DS does not show on AD
Bug 613833 - Allow dirsrv_t to bind to rpc ports
Bug 594745 - Get rid of dirsrv_lib_t label
Bug 620927 - Allow multiple membership attributes in memberof plugin
Bug 612264 - ACI issue with (targetattr='userPassword')
Bug 630098 - fix coverity Defect Type: Code maintainability issues
Bug 630098 - fix coverity Defect Type: Code maintainability issues
Bug 630093 - (cov#15511) Don't use unintialized search_results in refint plugin
Bug 630093 - (cov#15518) Need to intialize fd in ldbm2ldif code
Bug 630096 - (cov#11778) check return value of ldap_parse_result
Bug 630096 - (cov#15446) check return value of ber_scanf()
Bug 630096 - (cov#15449,15450) Check return value of stat()
Bug 630096 - (cov#15448) Check return value of cache_replace()
Bug 630096 - (cov#15447) - Check return value of idl_append_extend()
Bug 630090 - (cov#11974) Remove unused ACL functions
Bug 630090 - (cov#15445) Fix illegal free in archive code
Bug 630094 - (cov#11818) Fix unreachable return in snmp subagent
Bug 630094 - (cov#15451) Get rid of unreachable free statements
Bug 630094 - (cov#15452) Remove NULL checking for op_string
Bug 630094 - (cov#15453) Eliminate NULL check for local_newentry
Bug 630094 - (cov#15454) Fix deadcode issue in mapping tree code
Bug 630094 - (cov#15455) Remove deadcode in attr_index_config()
Bug 630094 - (cov#15456) Remove NULL check for srdn in import code
Bug 630094 - (cov#15457) Remove deadcode in import code
Bug 630094 - (cov#15458) Fix deadcode issue in moddn code
Bug 630094 - (cov#15459) Remove NULL check for srdn in ldif2ldbm code
Bug 630094 - (cov#15520) Fix unreachable code issue if perfctrs code
Bug 630094 - (cov#15581) Add missing breaks in agt_mopen_stats()
Bug 690090 - (cov#11974) Remove additional unused ACL functions
Bug 630091 - (cov#15512) Fix usage of uninitialized bervals
Bug 630091 - (cov#15513) Fix usage of uninitialized bervals
Bug 630091 - (cov#15514) Initialize DBT in entryrdn_get_parent()
Bug 630091 - (cov#15515) Use of uninitialized array in index config code
Bug 630091 - (cov#15516,15517) Initialize pointers before attempting to free
Bug 630091 - (cov#15519) Initialize bervals in search_easter_egg()
Bug 630091 - (cov#15582) Free of uninitialized pointer in attr_index_config()
Bug 630097 - (cov#11933) Fix NULL dereference in schema code
Bug 630097 - (cov#11938) NULL dereference in mmldif
Bug 630097 - (cov#11946) NULL dereference in ResHashCreate()
Bug 630097 - (cov#11964) Remove dead code from libaccess
Bug 630097 - (cov#12143) NULL dereference in cos cache code
Bug 630097 - (cov#12148) NULL dereference in ruvInit()
Bug 630097 - (cov#12182,12183) NULL dereference in import code
Bug 630097 - (cov#15460) NULL deference in ACL URL code
Bug 630097 - (cov#15461) Remove unnecessary NULL check in DNA
Bug 630097 - (cov#15462) NULL dereference in mep_modrdn_post_op()
Bug 630097 - (cov#15463) Remove NULL check in referint plugin
Bug 630097 - (cov#15464) NULL dereference in repl code
Bug 630097 - (cov#15465) Null dereference in USN code
Bug 630097 - (cov#15473) NULL dereference in ResHashCreate()
Bug 630097 - (cov#15505) NULL dereference in memberOf code
Bug 630097 - (cov#15506) NULL dereference in dblayer code
Bug 630097 - (cov#15507,15508) NULL dereference in entryrdn code
Bug 630097 - (cov#15509) NULL dereference in idsktune
Bug 630097 - (cov#11938) NULL dereference in mmldif
Bug 630097 - (cov#15477) NULL dereference in ACL plug-in code
Bug 630091 - (cov#12209) Use of uninitialized pointer in libaccess
Bug 630092 - (cov#12116) Resource leak in ldclt code
Bug 630092 - (cov#12105) Resource leak in pwdscheme config code
Bug 630092 - (cov#12068) Resource leak in certmap code
Bug 630091 - (cov#11973) Array overrun in libaccess
Bug 522055 - Scope check for managed attribute fails
Bug 625335 - Self-write aci has permission to invalid attribute
Bug 631993 - Log authzid when proxy auth control is used
Cov #16300 - Unused variable in account policy plugin
Bug 544321 - remove-ds.pl should not throw error unlabelling port
Bug 555955 - Allow CoS values to be merged
Bug 643937 - Initialize replication version flags
Bug 305131 - Allow empty modify operation
Bug 619633 - Make attribute uniqueness obey requiredObjectClass
Bug 619623 - attr-unique-plugin ignores requiredObjectClass on modrdn operations
Bug 189985 - Improve attribute uniqueness error message
Bug 647932 - multiple memberOf configuration adding memberOf where there is no member
Bug 521088 - DNA should check ACLs before getting a value from the range
Bug 635009 - Add one-way AD sync capability
Bump VERSION.sh to 1.2.8.a1
Bug 648949 - Move selinux policy into base OS
Bug 648949 - Update configure
Roll back VERSION.sh for 1.2.7 release
Bug 625950 - hash nsslapd-rootpw changes in audit log
Bug 656392 - Remove calls to ber_err_print()
Bug 656515 - Allow Name and Optional UID syntax for grouping attributes
Bug 197886 - Avoid overflow of UUID generator
Bug 658312 - Allow mapped attribute types to be quoted
Bug 197886 - Initialize return value for UUID generation code
Bug 658309 - Process escaped characters in managed entry mappings
Bug 659456 - Incorrect usage of ber_printf() in winsync code
Bug 641944 - Don't normalize non-DN RDN values
Bug 658312 - Invalid free in Managed Entry plug-in
Bug 661792 - Valid managed entry config rejected
Bug 588791 - Allow anonymous rootDSE access only
Bug 606439 - Creating server instance with LDAPI takes too long
Bug 632670 - Chain-on-update logs managed-entries-plugin errors
Bug 621008 - parsing purge RUV from changelog at startup fails
Bug 663191 - Don't use $USER in DSCreate.pm
Bug 663597 - Memory leaks in normalization code
Bug 659131 - Incorrect RDN values added with multi-valued RDN
Bug 661102 - Rename of managed entries not handled correctly
Bug 193297 - Call pre-bind plug-ins for all SASL bind steps
Bug 201652 - LDAPv2 bind with expired password doesn't unbind correctly
Bug 470576 - Migration could do addition checks before commiting actions
Bug 481195 - Missing op type in log when password change required
Bug 509897 - Validate dnaScope to ensure it is a legal DN
Bug 505722 - Allow ntGroup to have mail attribute present
Bug 543633 - replication problems if supplier is killed under update load
Bug 671033 - range sharing between server breaks with SASL/GSSAPI auth
Bug 527912 - setup-ds.pl appears to hang when DNS is unreachable
Bug 252249 - Add pkg-config file for plug-in developers
Bug 670616 - Allow SSF to be set for local (ldapi) connections
Bug 668862 - init scripts return wrong error code
Bug 674430 - Improve error messages for attribute uniqueness
Bug 675853 - dirsrv crash segfault in need_new_pw()
Bug 678646 - Ignore tombstone operations in managed entry plug-in
Bug 671199 - Don't allow other to write to rundir
Bug 672468 - Don't use empty path elements in LD_LIBRARY_PATH
Bug 674852 - crash in ldap-agent when using OpenLDAP
Bug 681345 - setup-ds.pl should set SuiteSpotGroup automatically
Bug 680558 - Winsync plugin fails to restrain itself to the configured subtree
Bug 504803 - Allow maxlogsize to be set if logmaxdiskspace is -1
Bug 687974 - (cov#10715) Fix Coverity uninitialized variables issues
Bug 688341 - (cov#10709) Fix Coverity code maintainability issues
Bug 688341 - (cov#10708) Fix Coverity code maintainability issues
Bug 688341 - (cov#10706,10707) Fix Coverity code maintainability issues
Bug 688341 - (cov#10704,10705) Fix Coverity code maintainability issues
Bug 688341 - (cov#10703) Fix Coverity code maintainability issues
Bug 688341 - (cov#10702) Fix Coverity code maintainability issues
Bug 688341 - (cov#10709) Fix Coverity code maintainability issues
Bug 689537 - (cov#10699) Fix Coverity NULL pointer dereferences
Bug 689537 - (cov#10610) Fix Coverity NULL pointer dereferences
Bug 689537 - (cov#10608) Fix Coverity NULL pointer dereferences
Bug 689952 - (cov#10581) Incorrect bit check in replication connection code
Bug 690526 - (cov#10734) Double free in dse_add()
Bug 690649 - (cov#10731) Use of free'd pointer in indexing code
Bug 690882 - (cov#10571) Incorrect sizeof use in uuid code
Bug 690882 - (cov#10636,10637) Useless comparison in attrcrypt
Bug 690882 - (cov#10703) Incorrect sizeof use in vattr code
Bug 690882 - (cov#10572,10710) Incorrect sizeof use in uuid code
Bug 691574 - (cov#10579) Check return value of ber_scanf() in sort code
Bug 691574 - (cov#10577) Check return types when adding RDN CSNs
Bug 691574 - (cov#10573) check return value in GER code
Bug 691574 - (cov#10575) Check return value of ldap_get_option
Bug 691574 - (cov#10573) Fix syntax error
Bug 693868 - Add managed entry config during in-place upgrade
Add Auto Membership Plug-in
Bug 698428 - Make auto membership use Slapi_DN for DN comparisons
Bug 695779 - windows sync can lose old values when a new value is added
Bug 700557 - Linked attrs callbacks access free'd pointers after close
Bug 700557 - Leak at shutdown in DNA plug-in
Bug 703304 - Auto membership alternate config area should override default area
Bug 703304 - Auto membership alternate config area should override default area
Bug 703530 - Allow Managed Entry config to be relocated
Bug 697961 - memberOf needs to be triggered by internal operations
Bug 710377 - Import with chain-on-update crashes ns-slapd
Split automember regex rules into separate entries
Bug 713209 - Update sudo schema
Bug 691313 - Need TLS/SSL error messages in repl status and errors log
Bug 723937 - Slapi_Counter API broken on 32-bit F15
Bug 725743 - Make memberOf use PRMonitor for it's operation lock
Bug 729717 - Fatal error messages when syncing deletes from AD
Bug 728510 - Run dirsync after sending updates to AD
Bug 730387 - Add slapi_rwlock API and use POSIX rwlocks
Bug 611438 - Add Account Usability Control support
Bug 728592 - Allow ns-slapd to start with an invalid server cert
Bug 732541 - Ignore error 32 when adding automember config
Bug 722292 - Entries in DS are not updated properly when using WinSync API
Bug 722292 - (cov#11030) Leak of mapped_sdn in winsync rename code
Bug 735114 - renaming a managed entry does not update mepmanagedby
Bug 739172 - Allow separate fractional attrs for incremental and total protocols
Bug 743966 - Compiler warnings in account usability plugin
Bug 744946 - (cov#11046) NULL dereference in IDL code
Bug 752155 - Use restorecon after creating init script lock file
Ticket 284 - Remove unnecessary SNMP MIB files
Noriko Hosoi (302):
544089 - Referential Integrity Plugin does not take into account the attribute
557224 - subtree rename breaks the referential integrity plug-in
247413 - Incorrect error on multiple identical value add
559016 - Attempting to rename suffix returns inappropriate errors
555577 - Syntax validation fails for "ou=NetscapeRoot" tree
Undo - 555577 - Syntax validation fails for "ou=NetscapeRoot" tree
560827 - Admin Server templates: DistinguishName validation fails
548535 - memory leak in attrcrypt
563365 - Error handling problems in the backend functions
565664 - Incorrect parameter for CACHE_RETURN()
565987 - redhat-ds-base fails to build due to undefined struct
527848 - make sure db upgrade to 4.7 and later works correctly
539618 - Replication bulk import reports Invalid read/write
567370 - dncache: assertion failure in id2entry_delete
548115 - memory leak in schema reload
555970 - missing read lock in the combination of cos and nsview
539618 - Replication bulk import reports Invalid read/write
570667 - MMR: simultaneous total updates on the masters cause
Merge branch '547503'
Revert "Merge branch '547503'"
Bug 554573 - ACIs use bind DN from bind req rather than cert mapped DN from sasl/external
199923 - subtree search fails to find items under a db
570107 - The import of LDIFs with base-64 encoded DNs fails,
572649 - DS8.2 crashes on RHEL 4 (corresponding to bob, ber_2 test case)
573060 - DN normalizer: ESC HEX HEX is not normalized (
573896 - initializing subtree with invalid syntax crashes ns-slapd
515805 - Stop "initialize Database" crashes the server
548533 - memory leak in Repl_5_Inc_Protocol_new
Fixing a syntax error
Update to New DN Format
585905 - ACL with targattrfilters error crashes the server
574167 - An escaped space at the end of the RDN value is not
590931 - rhds81 import - hardcoded pages_limit for nsslapd-import-cache-autosize
591336 - Implementing upgrade DN format tool
593453 - Creating password policy with ns-newpolicy.pl on Replicated
593110 - backup-restore does not ALWAYS work
593899 - adding specific ACI causes very large mem allocate request
588867 - entryusn plugin fails on solaris
593899 - adding specific ACI causes very large mem allocate request
595893 - Base DN in SASL mapping is not normalized
511112 - Password history limited to 25 values
597375 - Deleting LDBM database causes backup/restore problem
574101 - MODRDN request never returns - possible deadlock
606920 - anonymous resource limit - nstimelimit -
605827 - In-place upgrade: upgrade dn format should not run in setup-ds-admin.pl
578296 - Attribute type entrydn needs to be added when subtree
609256 - Selinux: pwdhash fails if called via Admin Server CGI
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
609255 - fix coverity Defect Type: Memory - illegal accesses issues
616618 - 389 v1.2.5 accepts 2 identical entries with different DN formats
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
610281 - fix coverity Defect Type: Control flow issues
616608 - SIGBUS in RDN index reads on platforms with strict alignments
619595 - Upgrading sub suffix under non-normalized suffix disappears
513166 - Simple Paged result doesn't provide the server's estimate
621928 - Unable to enable replica (rdn problem?) on 1.2.6 rc6
Bug 194531 - db2bak is too noisy
Bug 622628 - fix coverity Defect Type: Integer handling issues
Bug 622628 - fix coverity Defect Type: Integer handling issues
Bug 622628 - fix coverity Defect Type: Integer handling issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 622903 - fix coverity Defect Type: Code maintainability issues
Bug 623118 - Simplepaged results going in infinite loop
Bug 614511 - fix coverity Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 619122 - fix coverity Defect Type: Resource leaks issues CID 11975 - 12051
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 617630 - fix coverity Defect Type: Resource leaks issues CID 12052 - 12093
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 616500 - fix coverity Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverity Defect Type: Resource leaks issues CID 12094 - 12136
Bug 616500 - fix coverity Defect Type: Resource leaks issues CID 12094 - 12136
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892 - 11939
Bug 613056 - fix coverify Defect Type: Null pointer dereferences issues 11892
Bug 616500 - fix coverity Defect Type: Resource leaks issues
Bug 623507 - fix coverity Defect Type: Incorrect expression issues
Bug 623507 - fix coverity Defect Type: Incorrect expression issues
Bug 613056 - fix coverify Defect Type: Null pointer dereferences
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166
Removed redundant code in agmt_new_from_entry
Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093
Bug 628300 - DN is not normalized in dn/entry cache when an entry is added, entrydn is not present in search results
Bug 531642 - EntryUSN: RFE: a configuration option to make entryusn "global"
Bug 627738 - The cn=monitor statistics entries for the dnentry cache do not change or change very rarely
DN normalizer should check the invalid type
Bug 627738 - The cn=monitor statistics entries for the dnentry cache
Bug 629710 - escape_string does not check '\<HEX><HEX>'
agmtlist_shutdown (repl5_agmtlist.c) had an illegal access defect.
Bug 633168 - Share backend dbEnv with the replication changelog
Bug 633168 - Share backend dbEnv with the replication changelog
Bug 631862 - crash - delete entries not in cache + referint
Bug 625014 - SubTree Renames: ModRDN operation fails and the server hangs if the entry is moved to "under" the same DN.
Bug 558099 - Enhancement request: Log more information about the search result being a paged one
Bug 635987 - Incorrect sub scope search result with
Bug 606920 - anonymous resource limit- nstimelimit -
Bug 635987 - Incorrect sub scope search result with ACL containing ldap:///self
Bug 639289 - Adding a new CN entry with UpperCase UTF-8 Character
Bug 640027 - Naming attribute with a special char sequence parsing bug
Bug 640854 - changelog db: _cl5WriteOperation: failed to
Bug 637852 - sasl_io_start_packet: failed - read only 3 bytes
Bug 586966 - Sample update script has syntax errors
Bug 586973 - Sample update ldif points to non-existent directory
Bug 602456 - Allow to add any cn=config attributes;
Bug 244229 - targetattr not verified against schema when setting an aci
Bug 643532 - Incorrect DNs sometimes returned on searches
Bug 592397 - Upgrade tool dn2rdn: it does not clean up
Bug 645061 - Upgrade: 06inetorgperson.ldif and 05rfc4524.ldif
Bug 629681 - Retro Changelog trimming does not behave as expected
Bug 644608 - RHDS 8.1->8.2 upgrade fails to properly migrate ACIs
Bug 644608 - RHDS 8.1->8.2 upgrade fails to properly migrate ACIs
Bug 644608 - RHDS 8.1->8.2 upgrade fails to properly migrate ACIs
Bug 638773 - permissions too loose on pid and lock files
Bug 491733 - dbtest crashes
Bug 329751 - "nested" filtered roles searches candidates more
Bug 567282 - server can not abandon searchRequest of "simple paged results"
Bug 572018 - Upgrading from 1.2.5 to 1.2.6.a2 deletes userRoot
Bug 651571 - When attrcrypt is on, entrydn is stored in the backend db
Bug 661918 - 389-ds MMR plugin's changelogdb path logic is incorrect
Bug 182507 - clear-password mod from replica is discarded before changelogged
Bug 602456 - Allow to add any cn=config attributes;
Bug 489379 - passwordExpirationTime in entry being added
Bug 663484 - Entry usn plugin fails to properly tag entries on initialization
Bug 664563 - GER: ger for non-present entry is not correct
Bug 653007 - db2ldif export of clear text passwords lacks storage scheme
Bug 667488 - Cannot recreate numsubordinates index with db2index
Bug 663752 - Cert renewal for attrcrypt and encchangelog
Bug 615100 - log rotationinfo always recreated at startup,
Bug 624442 - MMR: duplicate replica ID
Bug 669205 - db2bak: backed up changelog should include RUVs
Bug 616850 - ldapmodify failed to reject the replace operation
Bug 627993 - Inconsistent storage of password expiry times
Bug 627993 - Inconsistent storage of password expiry times
dn2rdn should respect the DB version info
Bug 646381 - Faulty password for nsmultiplexorcredentials does not give any error message in logs
Bug 624547 - attrcrypt should query the given slot/token for
Bug 668619 - slapd stops responding
Bug 151705 - Need to update Console Cipher Preferences with new ciphers
Bug 615052 - intrinsics and 64-bit atomics code fails to compile
Bug 616213 - insufficient stack size for HP-UX on PA-RISC
Bug 675265 - preventryusn gets added to entries on a failed delete
Bug 604881 - admin server log files have incorrect permissions/ownerships
Bug 676053 - export task followed by import task causes cache assertion
Bug 676053 - export task followed by import task causes cache assertion
Bug 676053 - export task followed by import task causes cache assertion
Bug 450016 - RFE- Console display values in KB/MB/GB
Cancelling commit aef19508c4f618285116d2068655183658f564d9
Bug 625424 - repl-monitor.pl doesn't work in hub node
Bug 679978 - modifying attr value crashes the server, which is supposed to
Bug 681015 - RFE: allow fine grained password policy duration attributes in days, hours, minutes, as well
Bug 668909 - Can't modify replication agreement in some cases
Bug 684996 - Exported tombstone cannot be imported correctly
Bug 681015 - RFE: allow fine grained password policy duration attributes in days, hours, minutes, as well
Bug 689866 - ns-newpwpolicy.pl needs to use the new DN format
Bug 690955 - Mrclone fails due to the replica generation id mismatch
Bug 696407 - If an entry with a mixed case RDN is turned to be
Bug 697027 - 1 - minor memory leaks found by Valgrind + TET
Bug 697027 - 2 - minor memory leaks found by Valgrind + TET
Bug 697027 - 3 - minor memory leaks found by Valgrind + TET
Bug 697027 - 4 - minor memory leaks found by Valgrind + TET
Bug 697027 - 5 - minor memory leaks found by Valgrind + TET
Bug 697027 - 6 - minor memory leaks found by Valgrind + TET
Bug 697027 - 7 - minor memory leaks found by Valgrind + TET
Bug 697027 - 8 - minor memory leaks found by Valgrind + TET
Bug 697027 - 9 - minor memory leaks found by Valgrind + TET
Bug 697027 - 10 - minor memory leaks found by Valgrind + TET
Bug 697027 - 11 - minor memory leaks found by Valgrind + TET
Bug 697027 - 12 - minor memory leaks found by Valgrind + TET
Bug 697027 - 13 - minor memory leaks found by Valgrind + TET
Bug 697027 - 14 - minor memory leaks found by Valgrind + TET
Bug 697027 - 15 - minor memory leaks found by Valgrind + TET
Bug 697027 - 16 - minor memory leaks found by Valgrind + TET
Bug 697027 - 3 - minor memory leaks found by Valgrind + TET
Bug 697027 - 3 - minor memory leaks found by Valgrind + TET
Bug 700215 - ldclt core dumps
Bug 668619 - slapd stops responding
Bug 709826 - Memory leak: when extra referrals configured
Bug 706179 - DS can not restart after create a new objectClass has entryusn attribute
Bug 663752 - Cert renewal for attrcrypt and encchangelog
Bug 663752 - Cert renewal for attrcrypt and encchangelog
Bug 711679 - unresponsive LDAP service when deleting vlv on replica
Bug 711679 - unresponsive LDAP service when deleting vlv on replica
Bug 718303 - Intensive updates on masters could break the consumer's cache
Merge branch '718303'
Bug 719069 - clean up compiler warnings in 389-ds-base 1.2.9
Bug 712855 - Directory Server 8.2 logs "Netscape Portable
Bug 663752 - Cert renewal for attrcrypt and encchangelog
Bug 732153 - subtree and user account lockout policies implemented?
Introducing an environment variable USE_VALGRIND to clean up the entry cache and dn cache on exit.
Bug 744945 - nsslapd-counters attribute value cannot be set to "off"
Keep unhashed password psuedo-attribute in the adding entry
Reduce the number of DN normalization
Bug 745259 - Incorrect entryUSN index under high load
Bug 750622 - Fix Coverity (11104) Resource leak:
Bug 750624 - Fix Coverity (11053) Explicit null dereferenced:
Bug 750625 - Fix Coverity (11066) Unused pointer value
Bug 750625 - Fix Coverity (11065) Uninitialized pointer read
Bug 750625 - Fix Coverity (11064) Dereference before null check
Bug 750625 - Fix Coverity (11061) Resource leak
Bug 750625 - Fix Coverity (11060) Dereference null return value
Bug 750625 - Fix Coverity (11058, 11059) Dereference null return value
Bug 750625 - Fix Coverity (11057) Dereference null return value
Bug 750625 - Fix Coverity (11055) Explicit null dereferenced
Bug 750625 - Fix Coverity (11054) Dereference after null check
Bug 750625 - Fix Coverity (11117) Uninitialized pointer read
Bug 750625 - Fix Coverity (11116) Uninitialized pointer read
Bug 750625 - Fix Coverity (11114, 11115) Uninitialized value use
Bug 750625 - Fix Coverity (11113) Uninitialized pointer read
Bug 750625 - Fix Coverity (11112) Uninitialized pointer read
Bug 750625 - Fix Coverity (11109, 11110, 11111) Uninitialized pointer read
Bug 750625 - Fix Coverity (11108) Sizeof not portable
Bug 750625 - Fix Coverity (11107) Dereference before null check
Bug 750625 - Fix Coverity (11096) Explicit null dereferenced
Bug 750625 - Fix Coverity (11095) Explicit null dereferenced
Bug 750625 - Fix Coverity (11094) Dereference after null check
Bug 750625 - Fix Coverity (11091) Unchecked return value
Bug 750625 - Fix Coverity (11055-2) Explicit null dereferenced
Bug 750625 - Fix Coverity (11062) Resource leak
Bug 750625 - Fix Coverity (11066-2) Unused pointer value
Bug 750625 - Fix Coverity (12195) Dereference after null check
Bug 750625 - Fix Coverity (12196) Dereference before null check
Bug 750625 - Fix Coverity (11066-3) Unused pointer value
Bug 745259 - Incorrect entryUSN index under high load in
Trac Ticket 2 - If node entries are tombstone'd,
Trac Ticket 2 - If node entries are tombstone'd,
Trac Ticket 26 - Please support setting
Trac Ticket 75 - Unconfigure plugin opperations are being called.
Trac Ticket 168 - minssf should not apply to rootdse
Trac Ticket #18 - Data inconsitency during replication
Trac Ticket #52 - FQDN set to nsslapd-listenhost
Trac Ticket 139 - eliminate the use of char *dn in favor of Slapi_DN *dn
Trac Ticket 35 - Log not clear enough on schema errors
Trac Ticket #274 - Reindexing entryrdn fails if
Trac Ticket #275 - Invalid read reported by valgrind
Trac Ticket 51 - memory leaks in 389-ds-base-1.2.8.2-1.el5?
Trac Ticket #26 - Please support setting defaultNamingContext in the rootdse.
Trac Ticket #298 - crash when replicating orphaned tombstone entry
Trac Ticket #290 - server hangs during shutdown if betxn pre/post op fails
Rich Megginson (305):
Net::LDAP password modify extop breaks; msgid in response is 0xFF
Clean up assert for entrydn
Bug 543080 - Bitwise plugin fails to return the exact matched entries for Bitwise search filter
Bug 537466 - nsslapd-distribution-plugin should not require plugin name to begin with "lib"
bump version to 1.2.6.a2
Do not use syntax plugins directly for filters, indexing
wrap new style matching rule plugins for use in old style indexing code
change extensible filter code to use new syntax function style mr funcs
change syntax plugins to register required matching rule plugins
crash looking up compat syntax; numeric string syntax using integer; make octet string ordering work correctly
fix memory leak in attr replace when replacement fails
fix dso linking issues found by fedora 13 linking
problems linking with -z defs
389 DS segfaults on libsyntax-plugin.so - part 1
389 DS segfaults on libsyntax-plugin.so - part 2
389 DS segfaults on libsyntax-plugin.so - part 3
Bug 460162 - FedoraDS "with-FHS" installs init.d StartupScript in wrong location on non-RHEL/Fedora OS
Bug 568196 - Install DS8.2 on Solaris fails
Bug 568196 - Install DS8.2 on Solaris fails - part 2
Bug 551198 - LDAPI: incorrect logging to access log
bump version to 1.2.6.a3
fix various memory leaks
Bug 551198 - LDAPI: incorrect logging to access log - part 2
Bug 554573 - ACIs use bind DN from bind req rather than cert mapped DN from sasl/external
cleanup build warnings
Bug 571514 - upgrade to 1.2.6 should upgrade 05rfc4523.ldif (cert schema)
Bug 570905 - postalAddress syntax should allow empty lines (should allow $$)
Add support for additional schema/matching rules included with 389
Bug 572677 - Memory leak in searches including GER control
Bug 571677 - Busy replica on consumers when directly deleting a replication conflict
Bug 576074 - search filters with parentheses fail
Bug 567429 - slapd didn't close connection and get into CLOSE_WAIT state
Bug 578167 - repl. of mod/replace deletes multi-valued attrs
Bug 561575 - setup-ds-admin fails to supply nsds5ReplicaName when configuring via ConfigFile
Bug 572162 - the string "|*" within a search filter on a non-indexed attribute returns all elements.
Bug 576644 - segfault while multimaster replication (paired node won't find deleted entries)
start of 1.2.6.a4
Bug 572018 - Upgrading from 1.2.5 to 1.2.6.a2 deletes userRoot
Fix too few args for format warning in acllas
Bug 586571 - DS Console shows escaped DNs
Bug 591685 - Server instances Fail to Start on Solaris due to Library Path and pcre
bump console version to 1.2.3
Repl Session API needs to check for NULL api before init
Bug 593392 - setup-ds-admin.pl -k creates world readable file
Bug 595874 - 99user.ldif getting overpopulated
bump version to 1.2.6.a5
bump version to 1.2.6.rc1
bump version to 1.2.6.rc2
bump version to 1.2.6.rc3
Bug 604453 - SASL Stress and Server crash: Program quits with the assertion failure in PR_Poll
Bug 604453 - SASL Stress and Server crash: Program quits with the assertion failure in PR_Poll
Bug 603942 - null deref in _ger_parse_control() for subjectdn
bump version to 1.2.6.rc4
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
Bug 602530 - coverity: op_shared_modify: compare pre, post and original entries before freeing them
Bug 602531 - coverity: op_shared_delete: compare preop entry and GLUE_PARENT_ENTRY before freeing them
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
Bug 610177 - fix coverity Defect Type: Uninitialized variables issues
Bug 610276 - fix coverity Defect Type: API usage errors issues
Bug 611850 - fix coverity Defect Type: Error handling issues
Bug 614242 - C99/ANSI C++ related compile errors on HP-UX
Bug 547503 - replication broken again, with 389 MMR replication and TCP errors
Bug 617013 - repl-monitor.pl use cpu upto 90%
fix build failures due to libtool problems
Bug 617629 - Missing aliases in new schema files
Bug 617862 - Replication: Unable to delete tombstone errors
bump version to 1.2.7.a1
Bug 610281 - fix coverity Defect Type: Control flow issues - daemon.c:write_function()
Bug 610281 - fix coverity Defect Type: Control flow issues - last repl init status
postalAddress syntax does not accept empty values
ger should support both "dn" and "distinguishedName"
openldap - ldap_url_parse_ext is not part of the public api
fix memleak in ldbm_config_read_instance_entries
Add -x option to ldap tools when using openldap
openldap - add support for missing controls, add ldif api, fix NSS usage
port client tools to use openldap API
use the mozldap versions of the proxy auth control create function
document slapi wrappers for openldap/mozldap functions that differ
fix some compiler warnings
use strcasecmp with ptype and type->bv_val
ber_printf 'o' cannot handle NULL bv_val
fix the url_parse logic when looking for a missing suffix DN
openldap ldapsearch uses -LLL to suppress # version: N
add ldaptool_opts for the non BUNDLE case in Makefile.am
openldap ldapsearch returns empty line at end of LDIF output
have to use LDAP_OPT_X_TLS_NEVER to defeat cert hostname checking
openldap_read_function needs to set EWOULDBLOCK if the buffer is empty
do not terminate unwrapped LDIF line with another newline
slapi_ldap_url_parse must handle multiple host:port in url
convert mozldap host list to openldap uri list
move the out pointer back if continuation lines were removed
check src < *out only; only check for \nspace if src < *out - 2
use slapi_ldap_url_parse in the acl code
do not un-null-terminate normalized DN until new url is constructed
implement slapi_ldap_explode_dn and slapi_ldap_explode_rdn
use slapi_pblock_set to set the ldap result code for the be postop plugins
pass the string copy to slapi_dn_normalize_original
bug 614511 - fix coverity null reference - revert macro aci $dn logic
fix compiler warnings - unused vars/funcs, invalid casts
use slapi_mods_init_passin/get_ldapmods_passout if modifying the smods
Have to explicitly set protocol version to 3
Only check modrdn ops for backend/suffix correctness if not the default backend
Bug 634561 - Server crushes when using Windows Sync Agreement
openldap ber_init will assert if the bv->bv_val is NULL
add the account policy plugin and related server code, schema, and config
fix pblock memory leak
do not register pre/post op plugins if disabled
add support for global inactivity limit
fix typos in Makefile.am, acctpolicy schema
bump version to 1.2.7.a2
remove extra format argument; use %lu for size_t printf format
Bug 644013 - uniqueness plugin segfault bug
bump version to 1.2.7.a3
bump to 1.2.7.a4
bump version to 1.2.7.a5
put replication config entries in separate file
bump version to 1.2.7.a6
bump version to 1.2.7.1
bump version to 1.2.7.2
bump version to 1.2.7.3
bump version to 1.2.7.4
Bug 515329 - Multiple mods in one operation can result in an inconsistent replica
bump version to 1.2.8.a1
Bug 642046 - Segfault when using SASL/GSSAPI multimaster replication, possible krb5_creds doublefree
Bug 624485 - setup dsktune check step should default to "yes" if no problems found
Bug 622907 - support piped passwords to perl-based maintenance commands
Bug 624485 - setup dsktune check step should default to "yes" if no problems found
Bug 576534 - Password displayed on console when entered in command-line utilities
Bug 667935 - DS pipe log script's logregex.py plugin is not redirecting the log output to the text file
bump version to 1.2.8.a2
Bug 668385 - DS pipe log script is executed as many times as the dirsrv service is restarted
Bug 676689 - crash while adding a new user to be synced to windows
Bug 675113 - ns-slapd core dump in windows_tot_run if oneway sync is used
Bug 677440 - clean up compiler warnings in 389-ds-base 1.2.8
Bug 677774 - DS fails to start after reboot
Bug 666076 - dirsrv crash (1.2.7.5) with multiple simple paged result searches
Bug 675320 - empty modify operation with repl on or lastmod off will crash server
bump version to 1.2.9.a1 - console version to 1.2.4
Bug 677705 - ds-logpipe.py script is failing to validate "-s" and "--serverpid" options with "-t".
Bug 676655 - winsync stops working after server restart
Bug 680555 - ns-slapd segfaults if I have more than 100 DBs
Bug 514190 - setup-ds-admin.pl --debug does not log to file
Bug 518890 - setup-ds-admin.pl - improve hostname validation
Bug 644784 - Memory leak in "testbind.c" plugin
Bug 683250 - slapd crashing when traffic replayed
Bug 690584 - #10691 ldbm_back_init() - fix coverity resource leak issues
Bug 690584 - #10690 #10689 attrcrypt_get_ssl_cert_name() - fix coverity resource leak issues
Bug 690584 - #10688 - dblayer_make_env - fix coverity resource leak issues
Bug 690584 - #10669 #10668 cl5ImportLDIF - fix coverity resource leak issues
Bug 690584 - #10658 linked_attrs_pre_op - fix coverity resource leak issues
Bug 690584 - #10655 acllas__handle_group_entry - fix coverity resource leak issues
Bug 690584 - #10654 #10653 str2entry_dupcheck - fix coverity resource leak issues
Bug 690584 - #10652 #10651 #10650 #10649 #10648 #10647 send_specific_attrs send_all_attrs - fix coverity resource leak issues
Bug 690584 - #10643 hash_rootpw - fix coverity resource leak issues
Bug 690584 - #10641 reslimit_bv2int - fix coverity resource leak issues
Bug 691422 - sdt_destroy - fix coverity control flow issues
Bug 691422 - ldbm_back_upgradedb - fix coverity control flow issues
Bug 691422 - csnplFree - fix coverity control flow issues
Bug 691422 - SetUnicodeStringFromUTF_8 - fix coverity control flow issues
Bug 691422 - cl5DeleteRUV - fix coverity control flow issues
Bug 691422 - acl_read_access_allowed_on_entry - fix coverity control flow issues
Bug 691422 - search_internal_callback_pb - fix coverity control flow issues
Bug 691422 - cl5WriteRUV - fix coverity control flow issues
Bug 691422 - windows_replay_update - fix coverity control flow issues
Bug 690584 - #10691 ldbm_back_init() - fix coverity resource leak issues
Bug 690584 - #10652 #10651 #10650 #10649 #10648 #10647 send_specific_attrs send_all_attrs - fix coverity resource leak issues
Bug 668385 - DS pipe log script is executed as many times as the dirsrv service is restarted
Bug 692937 - Replica install fails after step for "enable GSSAPI for replication"
Bug 692331 - Segfault on index update during full replication push on 1.2.7.5
Bug 693451 - cannot use localized matching rules
Bug 693455 - nsMatchingRule does not work with multiple values
Bug 693503 - matching rules do not inherit from superior attribute type
Bug 693466 - Unable to change schema online
Bug 692991 - rhds82 - windows_tot_run: failed to obtain data to send to the consumer; LDAP error - -1
Bug 693473 - rhds82 rfe - windows_tot_run to log Sizelimit exceeded instead of LDAP error - -1
Bug 693962 - Full replica push loses some entries with multi-valued RDNs
Bug 694336 - Group sync hangs Windows initial Sync
Bug 700145 - userpasswd not replicating
Bug 703990 - Support upgrade from Red Hat Directory Server
bump console version to 1.2.5
Bug 703990 - Support upgrade from Red Hat Directory Server
Bug 703990 - Support upgrade from Red Hat Directory Server
Bug 707015 - Cannot disable SSLv3 and use TLS only
bump version to 1.2.9.a2
Bug 707384 - only allow FIPS approved cipher suites in FIPS mode
Bug 711906 - ns-slapd segfaults using suffix referrals
Bug 706209 - LEGAL: RHEL6.1 License issue for 389-ds-base package
Bug 703703 - setup-ds-admin.pl asks for legal agreement to a non-existant file
Bug 711679 - unresponsive LDAP service when deleting vlv on replica
bump console version to 1.2.6
Bug 697694 - rhds82 - incr update state stop_fatal_error "requires administrator action", with extop_result: 9
Bug 716980 - winsync uses old AD entry if new one not found
add support for ldif files with changetype: add
writing Inf file shows SchemaFile = ARRAY(0xhexnum)
look for separate openldap ldif library
bump version to 1.2.9.a3
Bug 709468 - RSA Authentication Server timeouts when using simple paged results on RHDS 8.2.
Bug 720059 - RDN with % can cause crashes or missing entries
bump version to 1.2.9.0
Bug 725542 - Instance upgrade fails when upgrading 389-ds-base package
Bug 725953 - Winsync: DS entries fail to sync to AD, if the User's CN entry contains a comma
Bug 723937 - replication failing on RUV errors
bump version to 1.2.9.1
Bug 727511 - ldclt SSL search requests are failing with "illegal error number -1" error
bump version to 1.2.9.2
Bug 727511 - ldclt SSL search requests are failing with "illegal error numbe
bump version to 1.2.9.3
Bug 727511 - ldclt SSL search requests are failing with "illegal error number -1" error
bump version to 1.2.9.4
Bug 727511 - ldclt SSL search requests are failing with "illegal error number -1" error
bump version to 1.2.9.5
Bug 729378 - delete user subtree container in AD + modify password in DS == DS crash
Bug 723937 - replication failing on RUV errors
Bug 729369 - upgrade DB to upgrade from entrydn to entryrdn format is not working.
make sure the DBVERSION file ends in a newline
bump version to 1.2.10.a1
Bug 633803 - passwordisglobalpolicy attribute brakes TLS chaining
Bug 733103 - large targetattr list with syntax errors cause server to crash or hang
Bug 703990 - cross-platform - Support upgrade from Red Hat Directory Server
Bug 735121 - simple paged search + ip/dns based ACI hangs server
Bug 695736 - Providing native systemd file for upcoming F15 Feature Systemd
Bug 590826 - Reloading database from ldif causes changelog to emit "data no longer matches" errors
Bug 736712 - Modifying ruv entry deadlocks server
Add support for pre/post db transaction plugins
Make all backend operations transaction aware
Bug 741744 - MOD operations with chained delete/add get back error 53 on backend config
Bug 742324 - allow nsslapd-idlistscanlimit to be set dynamically and per-user
Bug 741744 - part2 - MOD operations with chained delete/add get back error 53 on backend config
Bug 740942 - allow resource limits to be set for paged searches independently of limits for other searches/operations
bump version to 1.2.10.a2
bump version to 1.2.10.a3
fix transaction support in ldbm_delete
bump version to 1.2.10.a4
set the ENTRY_POST_OP for modrdn betxnpostoperation plugins
pass the plugin config entry to the plugin init function
make memberof transaction aware and able to be a betxnpostoperation plugin
Bug 741744 - part3 - MOD operations with chained delete/add get back error 53
bump version to 1.2.10.a5
Change referential integrity to be a betxnpostoperation plugin
Use new PLUGIN_CONFIG_ENTRY feature to allow switching between txn and regular
Bug 748575 - rhds81 modrn operation and 100% cpu use in replication
Bug 748575 - part 2 - rhds81 modrdn operation and 100% cpu use in replication
Bug 751495 - 'setup-ds.pl -u' fails with undefined routine 'updateSystemD'
bump version to 1.2.10.a6
Bug 751645 - crash when simple paged fails to send entry to client
csn_as_string - use slapi_uN_to_hex instead of sprintf
uniqueid formatting - use slapi_u8_to_hex instead of sprintf
fix member variable name error in slapi_uniqueIDFormat
reduce calls to csn_as_string and slapi_log_error
csn_init_as_string should not use sscanf
use slapi_hexchar2int and slapi_str_to_u8 everywhere
Bug 755754 - Unable to start dirsrv service using systemd
Bug 755725 - 389 programs linked against openldap crash during shutdown
Ticket 1 - pre-normalize filter and pre-compile substring regex - and other optimizations
Ticket #162 - Infinite loop / spin inside strcmpi_fast, acl_read_access_allowed_on_attr, server DoS
bak2db gets stuck in infinite loop
Ticket #256 - debug build assertion in ACL_EvalDestroy()
bump version to 1.2.10.a7
Ticket #167 - Mixing transaction and non-transaction plugins can cause deadlock
fix mep sdn compiler warnings
add a hack to disable sasl hostname canonicalization - helps with testing when you don't want to set up correct host name resolution and/or cannot set the default system hostname
Ticket #12 - 389 DS DNA Plugin / Replication failing on GSSAPI
Ticket #257 - repl-monitor doesn't work if leftmost hostnames are the same
fix recent compiler warnings
Ticket #15 - Get rid of rwlock.h/rwlock.c and just use slapi_rwlock instead
fix compiler warnings
Remove redundant code - make a global into a static
Ticket #262 - pid file not removed with systemd
fix mozldap build issues
Ticket #264 - upgrade needs better check for "server is running"
Ticket #263 - add systemd include directive
bump version to 1.2.10.rc1
change version to 1.2.10.a8
Ticket #272 - add tombstonenumsubordinates to schema
bump version to 1.2.10.rc1
Ticket #161 - Review and address latest Coverity issues
Ticket #22 - RFE: Support sendmail LDAP routing schema
Ticket #29 - Samba3-schema is missing sambaTrustedDomainPassword
Ticket #273 - ruv tombstone searches don't work after reindex entryrdn
Ticket #273 - ruv tombstone searches don't work after reindex entryrdn
fix a couple of minor coverity issues
Ticket #87 - Manpages fixes
Ticket #13 - slapd process exits when put the database on read only mode while updates are coming to the server
Ticket #55 - Limit of 1024 characters for nsMatchingRule
Ticket #277 - cannot set repl referrals or state
Ticket #278 - Schema replication update failed: Invalid syntax
Ticket #277 - cannot set repl referrals or state
Ticket #279 - filter normalization does not use matching rules
Ticket #280 - extensible binary filters do not work
Ticket #281 - TLS not working with latest openldap
coverity 12488 Resource leak In attr_index_config(): Leak of memory or pointers to system resources
bump version to 1.2.10.rc2
bump version to 1.2.10.0
Ticket #294 - 389 DS Segfaults during replica install in FreeIPA
Ticket #281 - TLS not working with latest openldap
Trac Ticket #298 - crash when replicating orphaned tombstone entry
bump version to 1.2.10.2
nturpin (1):
Ticket #3: acl cache overflown problem
root (1):
Bug 480787 - Autoconf parameter --with and --without
---
.gitignore | 1
Makefile.am | 261
Makefile.in | 5215 -
README | 11
VERSION.sh | 7
aclocal.m4 | 6996 --
compile | 21
config.guess | 302
config.h.in | 22
config.sub | 232
configure |41932 +++++-------
configure.ac | 176
depcomp | 172
dirsrv.pc.in | 7
include/base/dbtbase.h | 2
include/base/file.h | 3
include/base/lexer.h | 126
include/base/rwlock.h | 91
include/i18n.h | 115
include/ldaputil/ldaputil.h | 10
include/libaccess/aclerror.h | 1
include/libaccess/aclproto.h | 15
include/libaccess/aclstruct.h | 2
include/libaccess/dbtlibaccess.h | 3
include/public/nsacl/aclapi.h | 7
install-sh | 517
ldap/admin/src/base-initconfig.in | 44
ldap/admin/src/initconfig.in | 37
ldap/admin/src/logconv.pl | 639
ldap/admin/src/scripts/10cleanupldapi.pl | 23
ldap/admin/src/scripts/10fixrundir.pl | 11
ldap/admin/src/scripts/50acctusabilityplugin.ldif | 21
ldap/admin/src/scripts/50automemberplugin.ldif | 15
ldap/admin/src/scripts/50fixNsState.pl | 240
ldap/admin/src/scripts/50managedentriesplugin.ldif | 16
ldap/admin/src/scripts/50refintprecedence.ldif | 4
ldap/admin/src/scripts/50smd5pwdstorageplugin.ldif | 5
ldap/admin/src/scripts/60upgradeschemafiles.pl | 2
ldap/admin/src/scripts/70upgradefromldif.pl | 108
ldap/admin/src/scripts/80upgradednformat.pl | 206
ldap/admin/src/scripts/81changelog.pl | 34
ldap/admin/src/scripts/90subtreerename.pl | 21
ldap/admin/src/scripts/91subtreereindex.pl | 148
ldap/admin/src/scripts/DSCreate.pm.in | 323
ldap/admin/src/scripts/DSDialogs.pm | 4
ldap/admin/src/scripts/DSMigration.pm.in | 47
ldap/admin/src/scripts/DSUpdate.pm.in | 50
ldap/admin/src/scripts/DSUtil.pm.in | 247
ldap/admin/src/scripts/DialogManager.pm | 241
ldap/admin/src/scripts/DialogManager.pm.in | 241
ldap/admin/src/scripts/Inf.pm | 67
ldap/admin/src/scripts/Migration.pm.in | 20
ldap/admin/src/scripts/Setup.pm.in | 20
ldap/admin/src/scripts/SetupDialogs.pm.in | 31
ldap/admin/src/scripts/SetupLog.pm | 8
ldap/admin/src/scripts/ds-logpipe.py | 221
ldap/admin/src/scripts/exampleupdate.ldif | 2
ldap/admin/src/scripts/exampleupdate.sh | 10
ldap/admin/src/scripts/logregex.py | 16
ldap/admin/src/scripts/migrate-ds.pl.in | 13
ldap/admin/src/scripts/remove-ds.pl.in | 28
ldap/admin/src/scripts/repl-monitor.pl.in | 86
ldap/admin/src/scripts/restart-dirsrv.in | 25
ldap/admin/src/scripts/setup-ds.pl.in | 7
ldap/admin/src/scripts/setup-ds.res.in | 35
ldap/admin/src/scripts/start-dirsrv.in | 43
ldap/admin/src/scripts/stop-dirsrv.in | 27
ldap/admin/src/scripts/template-bak2db.in | 49
ldap/admin/src/scripts/template-bak2db.pl.in | 29
ldap/admin/src/scripts/template-db2bak.in | 53
ldap/admin/src/scripts/template-db2bak.pl.in | 29
ldap/admin/src/scripts/template-db2index.in | 14
ldap/admin/src/scripts/template-db2index.pl.in | 33
ldap/admin/src/scripts/template-db2ldif.in | 15
ldap/admin/src/scripts/template-db2ldif.pl.in | 29
ldap/admin/src/scripts/template-dbverify.in | 15
ldap/admin/src/scripts/template-dn2rdn.in | 25
ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in | 29
ldap/admin/src/scripts/template-fixup-memberof.pl.in | 29
ldap/admin/src/scripts/template-ldif2db.in | 15
ldap/admin/src/scripts/template-ldif2db.pl.in | 29
ldap/admin/src/scripts/template-ldif2ldap.in | 19
ldap/admin/src/scripts/template-monitor.in | 19
ldap/admin/src/scripts/template-ns-accountstatus.pl.in | 33
ldap/admin/src/scripts/template-ns-activate.pl.in | 33
ldap/admin/src/scripts/template-ns-inactivate.pl.in | 33
ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in | 47
ldap/admin/src/scripts/template-restart-slapd.in | 2
ldap/admin/src/scripts/template-restoreconfig.in | 15
ldap/admin/src/scripts/template-saveconfig.in | 15
ldap/admin/src/scripts/template-schema-reload.pl.in | 29
ldap/admin/src/scripts/template-start-slapd.in | 3
ldap/admin/src/scripts/template-stop-slapd.in | 2
ldap/admin/src/scripts/template-suffix2instance.in | 15
ldap/admin/src/scripts/template-syntax-validate.pl.in | 29
ldap/admin/src/scripts/template-upgradedb.in | 15
ldap/admin/src/scripts/template-upgradednformat.in | 63
ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in | 29
ldap/admin/src/scripts/template-verify-db.pl.in | 19
ldap/admin/src/scripts/template-vlvindex.in | 15
ldap/admin/src/slapd.inf.in | 2
ldap/admin/src/template-initconfig.in | 18
ldap/docs/LICENSE.txt | 132
ldap/docs/README.txt | 11
ldap/include/ldaplog.h | 32
ldap/ldif/50replication-plugins.ldif | 26
ldap/ldif/template-baseacis.ldif.in | 2
ldap/ldif/template-bitwise.ldif.in | 6
ldap/ldif/template-dse.ldif.in | 96
ldap/ldif/template-suffix-db.ldif.in | 1
ldap/schema/00core.ldif | 72
ldap/schema/01core389.ldif | 19
ldap/schema/02common.ldif | 12
ldap/schema/05rfc4523.ldif | 14
ldap/schema/05rfc4524.ldif | 30
ldap/schema/06inetorgperson.ldif | 5
ldap/schema/10automember-plugin.ldif | 123
ldap/schema/10mep-plugin.ldif | 104
ldap/schema/30ns-common.ldif | 4
ldap/schema/50ns-directory.ldif | 4
ldap/schema/60acctpolicy.ldif | 47
ldap/schema/60nis.ldif | 2
ldap/schema/60qmail.ldif | 4
ldap/schema/60samba3.ldif | 34
ldap/schema/60sendmail.ldif | 54
ldap/schema/60sudo.ldif | 58
ldap/servers/plugins/acct_usability/acct_usability.c | 464
ldap/servers/plugins/acct_usability/acct_usability.h | 63
ldap/servers/plugins/acctpolicy/acct_config.c | 143
ldap/servers/plugins/acctpolicy/acct_init.c | 191
ldap/servers/plugins/acctpolicy/acct_plugin.c | 316
ldap/servers/plugins/acctpolicy/acct_util.c | 257
ldap/servers/plugins/acctpolicy/acctpolicy.h | 81
ldap/servers/plugins/acctpolicy/sampleconfig.ldif | 40
ldap/servers/plugins/acctpolicy/samplepolicy.ldif | 27
ldap/servers/plugins/acl/acl.c | 195
ldap/servers/plugins/acl/acl.h | 43
ldap/servers/plugins/acl/acl_ext.c | 152
ldap/servers/plugins/acl/aclanom.c | 13
ldap/servers/plugins/acl/acleffectiverights.c | 116
ldap/servers/plugins/acl/aclgroup.c | 19
ldap/servers/plugins/acl/aclinit.c | 2
ldap/servers/plugins/acl/acllas.c | 400
ldap/servers/plugins/acl/acllist.c | 77
ldap/servers/plugins/acl/aclparse.c | 610
ldap/servers/plugins/acl/aclplugin.c | 37
ldap/servers/plugins/acl/aclproxy.c | 232
ldap/servers/plugins/acl/aclutil.c | 110
ldap/servers/plugins/automember/automember.c | 1930
ldap/servers/plugins/automember/automember.h | 134
ldap/servers/plugins/bitwise/bitwise.c | 23
ldap/servers/plugins/chainingdb/cb.h | 8
ldap/servers/plugins/chainingdb/cb_add.c | 105
ldap/servers/plugins/chainingdb/cb_bind.c | 196
ldap/servers/plugins/chainingdb/cb_compare.c | 101
ldap/servers/plugins/chainingdb/cb_config.c | 37
ldap/servers/plugins/chainingdb/cb_conn_stateless.c | 102
ldap/servers/plugins/chainingdb/cb_controls.c | 36
ldap/servers/plugins/chainingdb/cb_delete.c | 125
ldap/servers/plugins/chainingdb/cb_init.c | 6
ldap/servers/plugins/chainingdb/cb_instance.c | 325
ldap/servers/plugins/chainingdb/cb_modify.c | 133
ldap/servers/plugins/chainingdb/cb_modrdn.c | 174
ldap/servers/plugins/chainingdb/cb_monitor.c | 6
ldap/servers/plugins/chainingdb/cb_schema.c | 4
ldap/servers/plugins/chainingdb/cb_search.c | 219
ldap/servers/plugins/chainingdb/cb_utils.c | 15
ldap/servers/plugins/collation/collate.c | 24
ldap/servers/plugins/collation/orfilter.c | 19
ldap/servers/plugins/cos/cos_cache.c | 773
ldap/servers/plugins/deref/deref.c | 12
ldap/servers/plugins/dna/dna.c | 900
ldap/servers/plugins/http/http_impl.c | 81
ldap/servers/plugins/linkedattrs/fixup_task.c | 154
ldap/servers/plugins/linkedattrs/linked_attrs.c | 284
ldap/servers/plugins/linkedattrs/linked_attrs.h | 8
ldap/servers/plugins/memberof/memberof.c | 841
ldap/servers/plugins/memberof/memberof.h | 8
ldap/servers/plugins/memberof/memberof_config.c | 242
ldap/servers/plugins/mep/mep.c | 2861
ldap/servers/plugins/mep/mep.h | 130
ldap/servers/plugins/pam_passthru/pam_passthru.h | 2
ldap/servers/plugins/pam_passthru/pam_ptconfig.c | 2
ldap/servers/plugins/pam_passthru/pam_ptimpl.c | 32
ldap/servers/plugins/pam_passthru/pam_ptpreop.c | 9
ldap/servers/plugins/passthru/passthru.h | 4
ldap/servers/plugins/passthru/ptbind.c | 6
ldap/servers/plugins/passthru/ptconfig.c | 43
ldap/servers/plugins/passthru/ptconn.c | 8
ldap/servers/plugins/passthru/ptpreop.c | 17
ldap/servers/plugins/pwdstorage/smd5_pwd.c | 9
ldap/servers/plugins/referint/referint.c | 761
ldap/servers/plugins/replication/cl4_api.c | 2
ldap/servers/plugins/replication/cl5.h | 1
ldap/servers/plugins/replication/cl5_api.c | 2655
ldap/servers/plugins/replication/cl5_api.h | 111
ldap/servers/plugins/replication/cl5_clcache.c | 55
ldap/servers/plugins/replication/cl5_clcache.h | 2
ldap/servers/plugins/replication/cl5_config.c | 247
ldap/servers/plugins/replication/cl5_init.c | 2
ldap/servers/plugins/replication/cl5_test.c | 2
ldap/servers/plugins/replication/cl_crypt.c | 203
ldap/servers/plugins/replication/cl_crypt.h | 53
ldap/servers/plugins/replication/csnpl.c | 44
ldap/servers/plugins/replication/legacy_consumer.c | 31
ldap/servers/plugins/replication/repl-session-plugin.h | 119
ldap/servers/plugins/replication/repl.h | 2
ldap/servers/plugins/replication/repl5.h | 65
ldap/servers/plugins/replication/repl5_agmt.c | 304
ldap/servers/plugins/replication/repl5_agmtlist.c | 106
ldap/servers/plugins/replication/repl5_connection.c | 155
ldap/servers/plugins/replication/repl5_inc_protocol.c | 92
ldap/servers/plugins/replication/repl5_init.c | 49
ldap/servers/plugins/replication/repl5_mtnode_ext.c | 13
ldap/servers/plugins/replication/repl5_plugins.c | 193
ldap/servers/plugins/replication/repl5_prot_private.h | 4
ldap/servers/plugins/replication/repl5_protocol.c | 107
ldap/servers/plugins/replication/repl5_protocol_util.c | 509
ldap/servers/plugins/replication/repl5_replica.c | 308
ldap/servers/plugins/replication/repl5_replica_config.c | 365
ldap/servers/plugins/replication/repl5_replica_dnhash.c | 26
ldap/servers/plugins/replication/repl5_replica_hash.c | 30
ldap/servers/plugins/replication/repl5_ruv.c | 419
ldap/servers/plugins/replication/repl5_ruv.h | 18
ldap/servers/plugins/replication/repl5_tot_protocol.c | 32
ldap/servers/plugins/replication/repl5_total.c | 22
ldap/servers/plugins/replication/repl5_updatedn_list.c | 2
ldap/servers/plugins/replication/repl_bind.c | 6
ldap/servers/plugins/replication/repl_compare.c | 18
ldap/servers/plugins/replication/repl_connext.c | 2
ldap/servers/plugins/replication/repl_controls.c | 2
ldap/servers/plugins/replication/repl_extop.c | 291
ldap/servers/plugins/replication/repl_globals.c | 2
ldap/servers/plugins/replication/repl_init.c | 1
ldap/servers/plugins/replication/repl_objset.c | 9
ldap/servers/plugins/replication/repl_session_plugin.c | 188
ldap/servers/plugins/replication/repl_shared.h | 17
ldap/servers/plugins/replication/replutil.c | 107
ldap/servers/plugins/replication/test_repl_session_plugin.c | 335
ldap/servers/plugins/replication/urp.c | 165
ldap/servers/plugins/replication/urp.h | 11
ldap/servers/plugins/replication/urp_glue.c | 14
ldap/servers/plugins/replication/urp_tombstone.c | 21
ldap/servers/plugins/replication/windows_connection.c | 166
ldap/servers/plugins/replication/windows_inc_protocol.c | 55
ldap/servers/plugins/replication/windows_private.c | 128
ldap/servers/plugins/replication/windows_protocol_util.c | 677
ldap/servers/plugins/replication/windows_tot_protocol.c | 125
ldap/servers/plugins/replication/windowsrepl.h | 14
ldap/servers/plugins/replication/winsync-plugin.h | 2
ldap/servers/plugins/retrocl/retrocl.c | 3
ldap/servers/plugins/retrocl/retrocl.h | 2
ldap/servers/plugins/retrocl/retrocl_create.c | 13
ldap/servers/plugins/retrocl/retrocl_po.c | 23
ldap/servers/plugins/retrocl/retrocl_trim.c | 20
ldap/servers/plugins/rever/des.c | 72
ldap/servers/plugins/rever/rever.c | 8
ldap/servers/plugins/roles/roles_cache.c | 128
ldap/servers/plugins/schema_reload/schema_reload.c | 5
ldap/servers/plugins/shared/plugin-utils.h | 112
ldap/servers/plugins/shared/utils.c | 508
ldap/servers/plugins/statechange/statechange.c | 26
ldap/servers/plugins/syntaxes/bin.c | 142
ldap/servers/plugins/syntaxes/bitstring.c | 68
ldap/servers/plugins/syntaxes/ces.c | 172
ldap/servers/plugins/syntaxes/cis.c | 321
ldap/servers/plugins/syntaxes/deliverymethod.c | 32
ldap/servers/plugins/syntaxes/dn.c | 72
ldap/servers/plugins/syntaxes/facsimile.c | 32
ldap/servers/plugins/syntaxes/guide.c | 32
ldap/servers/plugins/syntaxes/int.c | 96
ldap/servers/plugins/syntaxes/nameoptuid.c | 72
ldap/servers/plugins/syntaxes/numericstring.c | 148
ldap/servers/plugins/syntaxes/sicis.c | 32
ldap/servers/plugins/syntaxes/string.c | 402
ldap/servers/plugins/syntaxes/syntax.h | 61
ldap/servers/plugins/syntaxes/syntax_common.c | 118
ldap/servers/plugins/syntaxes/tel.c | 94
ldap/servers/plugins/syntaxes/teletex.c | 32
ldap/servers/plugins/syntaxes/telex.c | 31
ldap/servers/plugins/syntaxes/validate.c | 17
ldap/servers/plugins/syntaxes/value.c | 120
ldap/servers/plugins/uiduniq/7bit.c | 48
ldap/servers/plugins/uiduniq/plugin-utils.h | 96
ldap/servers/plugins/uiduniq/uid.c | 326
ldap/servers/plugins/uiduniq/utils.c | 256
ldap/servers/plugins/usn/usn.c | 179
ldap/servers/plugins/usn/usn.h | 3
ldap/servers/plugins/usn/usn_cleanup.c | 31
ldap/servers/plugins/views/views.c | 27
ldap/servers/slapd/abandon.c | 7
ldap/servers/slapd/add.c | 186
ldap/servers/slapd/agtmmap.c | 56
ldap/servers/slapd/attr.c | 84
ldap/servers/slapd/attrlist.c | 7
ldap/servers/slapd/attrsyntax.c | 143
ldap/servers/slapd/auditlog.c | 69
ldap/servers/slapd/auth.c | 59
ldap/servers/slapd/ava.c | 2
ldap/servers/slapd/back-ldbm/ancestorid.c | 104
ldap/servers/slapd/back-ldbm/archive.c | 91
ldap/servers/slapd/back-ldbm/back-ldbm.h | 96
ldap/servers/slapd/back-ldbm/backentry.c | 2
ldap/servers/slapd/back-ldbm/cache.c | 83
ldap/servers/slapd/back-ldbm/dbhelp.c | 12
ldap/servers/slapd/back-ldbm/dblayer.c | 1614
ldap/servers/slapd/back-ldbm/dblayer.h | 14
ldap/servers/slapd/back-ldbm/dbtest.c | 349
ldap/servers/slapd/back-ldbm/dbversion.c | 52
ldap/servers/slapd/back-ldbm/dn2entry.c | 63
ldap/servers/slapd/back-ldbm/filterindex.c | 244
ldap/servers/slapd/back-ldbm/findentry.c | 147
ldap/servers/slapd/back-ldbm/id2entry.c | 175
ldap/servers/slapd/back-ldbm/idl.c | 35
ldap/servers/slapd/back-ldbm/idl_common.c | 7
ldap/servers/slapd/back-ldbm/idl_new.c | 50
ldap/servers/slapd/back-ldbm/idl_shim.c | 17
ldap/servers/slapd/back-ldbm/import-merge.c | 28
ldap/servers/slapd/back-ldbm/import-threads.c | 1366
ldap/servers/slapd/back-ldbm/import.c | 403
ldap/servers/slapd/back-ldbm/import.h | 32
ldap/servers/slapd/back-ldbm/index.c | 246
ldap/servers/slapd/back-ldbm/init.c | 89
ldap/servers/slapd/back-ldbm/instance.c | 174
ldap/servers/slapd/back-ldbm/ldbm_add.c | 245
ldap/servers/slapd/back-ldbm/ldbm_attr.c | 392
ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c | 986
ldap/servers/slapd/back-ldbm/ldbm_attrcrypt_config.c | 2
ldap/servers/slapd/back-ldbm/ldbm_bind.c | 4
ldap/servers/slapd/back-ldbm/ldbm_compare.c | 4
ldap/servers/slapd/back-ldbm/ldbm_config.c | 309
ldap/servers/slapd/back-ldbm/ldbm_config.h | 9
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 323
ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c | 833
ldap/servers/slapd/back-ldbm/ldbm_index_config.c | 668
ldap/servers/slapd/back-ldbm/ldbm_instance_config.c | 262
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 140
ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | 361
ldap/servers/slapd/back-ldbm/ldbm_search.c | 411
ldap/servers/slapd/back-ldbm/ldbm_usn.c | 74
ldap/servers/slapd/back-ldbm/ldif2ldbm.c | 792
ldap/servers/slapd/back-ldbm/matchrule.c | 50
ldap/servers/slapd/back-ldbm/misc.c | 298
ldap/servers/slapd/back-ldbm/monitor.c | 14
ldap/servers/slapd/back-ldbm/nextid.c | 17
ldap/servers/slapd/back-ldbm/parents.c | 141
ldap/servers/slapd/back-ldbm/perfctrs.c | 24
ldap/servers/slapd/back-ldbm/proto-back-ldbm.h | 52
ldap/servers/slapd/back-ldbm/sort.c | 38
ldap/servers/slapd/back-ldbm/start.c | 61
ldap/servers/slapd/back-ldbm/vlv.c | 383
ldap/servers/slapd/back-ldbm/vlv_srch.c | 17
ldap/servers/slapd/back-ldbm/vlv_srch.h | 3
ldap/servers/slapd/back-ldif/back-ldif.h | 2
ldap/servers/slapd/back-ldif/modrdn.c | 12
ldap/servers/slapd/backend.c | 72
ldap/servers/slapd/backend_manager.c | 18
ldap/servers/slapd/bind.c | 320
ldap/servers/slapd/bulk_import.c | 39
ldap/servers/slapd/charray.c | 27
ldap/servers/slapd/compare.c | 41
ldap/servers/slapd/computed.c | 36
ldap/servers/slapd/config.c | 2
ldap/servers/slapd/configdse.c | 63
ldap/servers/slapd/connection.c | 196
ldap/servers/slapd/conntable.c | 3
ldap/servers/slapd/control.c | 26
ldap/servers/slapd/csn.c | 77
ldap/servers/slapd/csngen.c | 54
ldap/servers/slapd/csnset.c | 4
ldap/servers/slapd/daemon.c | 173
ldap/servers/slapd/delete.c | 127
ldap/servers/slapd/dn.c | 1561
ldap/servers/slapd/dse.c | 222
ldap/servers/slapd/dynalib.c | 29
ldap/servers/slapd/entry.c | 919
ldap/servers/slapd/entrywsi.c | 108
ldap/servers/slapd/eventq.c | 4
ldap/servers/slapd/extendop.c | 35
ldap/servers/slapd/factory.c | 1
ldap/servers/slapd/fe.h | 5
ldap/servers/slapd/fedse.c | 40
ldap/servers/slapd/filter.c | 141
ldap/servers/slapd/filter.h | 1
ldap/servers/slapd/filtercmp.c | 26
ldap/servers/slapd/filterentry.c | 36
ldap/servers/slapd/generation.c | 1
ldap/servers/slapd/index_subsystem.c | 28
ldap/servers/slapd/intrinsics.h | 7
ldap/servers/slapd/ldaputil.c | 776
ldap/servers/slapd/lenstr.c | 6
ldap/servers/slapd/libglobs.c | 642
ldap/servers/slapd/libslapd.def | 1
ldap/servers/slapd/log.c | 77
ldap/servers/slapd/log.h | 20
ldap/servers/slapd/main.c | 288
ldap/servers/slapd/mapping_tree.c | 478
ldap/servers/slapd/match.c | 96
ldap/servers/slapd/modify.c | 491
ldap/servers/slapd/modrdn.c | 357
ldap/servers/slapd/modutil.c | 14
ldap/servers/slapd/operation.c | 27
ldap/servers/slapd/opshared.c | 281
ldap/servers/slapd/pagedresults.c | 130
ldap/servers/slapd/passwd_extop.c | 203
ldap/servers/slapd/pblock.c | 559
ldap/servers/slapd/plugin.c | 328
ldap/servers/slapd/plugin_acl.c | 19
ldap/servers/slapd/plugin_internal_op.c | 176
ldap/servers/slapd/plugin_mr.c | 474
ldap/servers/slapd/plugin_syntax.c | 442
ldap/servers/slapd/protect_db.c | 24
ldap/servers/slapd/protect_db.h | 7
ldap/servers/slapd/proto-slap.h | 69
ldap/servers/slapd/proxyauth.c | 246
ldap/servers/slapd/psearch.c | 77
ldap/servers/slapd/pw.c | 519
ldap/servers/slapd/pw.h | 5
ldap/servers/slapd/pw_mgmt.c | 161
ldap/servers/slapd/pw_retry.c | 87
ldap/servers/slapd/rdn.c | 141
ldap/servers/slapd/referral.c | 29
ldap/servers/slapd/regex.c | 3
ldap/servers/slapd/resourcelimit.c | 80
ldap/servers/slapd/result.c | 81
ldap/servers/slapd/rootdse.c | 12
ldap/servers/slapd/rwlock.c | 257
ldap/servers/slapd/rwlock.h | 65
ldap/servers/slapd/sasl_io.c | 167
ldap/servers/slapd/sasl_map.c | 57
ldap/servers/slapd/saslbind.c | 160
ldap/servers/slapd/schema.c | 179
ldap/servers/slapd/schemaparse.c | 13
ldap/servers/slapd/search.c | 89
ldap/servers/slapd/security_wrappers.c | 36
ldap/servers/slapd/slap.h | 194
ldap/servers/slapd/slapi-plugin-compat4.h | 6
ldap/servers/slapd/slapi-plugin.h | 1258
ldap/servers/slapd/slapi-private.h | 57
ldap/servers/slapd/slapi2nspr.c | 79
ldap/servers/slapd/slapi_counter.c | 24
ldap/servers/slapd/snmp_collator.c | 19
ldap/servers/slapd/ssl.c | 323
ldap/servers/slapd/str2filter.c | 5
ldap/servers/slapd/task.c | 128
ldap/servers/slapd/test-plugins/testbind.c | 1
ldap/servers/slapd/test-plugins/testpostop.c | 1
ldap/servers/slapd/time.c | 91
ldap/servers/slapd/tools/dbscan.c | 76
ldap/servers/slapd/tools/ldclt/data.c | 70
ldap/servers/slapd/tools/ldclt/ldapfct.c | 1124
ldap/servers/slapd/tools/ldclt/ldclt.c | 48
ldap/servers/slapd/tools/ldclt/ldclt.h | 3
ldap/servers/slapd/tools/ldclt/ldcltU.c | 24
ldap/servers/slapd/tools/ldclt/parser.c | 19
ldap/servers/slapd/tools/ldclt/scalab01.c | 190
ldap/servers/slapd/tools/ldclt/threadMain.c | 6
ldap/servers/slapd/tools/ldif.c | 4
ldap/servers/slapd/tools/mmldif.c | 9
ldap/servers/slapd/tools/pwenc.c | 2
ldap/servers/slapd/tools/rsearch/addthread.c | 25
ldap/servers/slapd/tools/rsearch/sdattable.c | 4
ldap/servers/slapd/tools/rsearch/searchthread.c | 62
ldap/servers/slapd/uniqueid.c | 99
ldap/servers/slapd/utf8compare.c | 6
ldap/servers/slapd/util.c | 360
ldap/servers/slapd/uuid.c | 22
ldap/servers/slapd/value.c | 53
ldap/servers/slapd/valueset.c | 75
ldap/servers/slapd/vattr.c | 109
ldap/servers/snmp/NETWORK-SERVICES-MIB.txt | 650
ldap/servers/snmp/RFC-1215.txt | 38
ldap/servers/snmp/RFC1155-SMI.txt | 119
ldap/servers/snmp/SNMPv2-CONF.txt | 322
ldap/servers/snmp/SNMPv2-SMI.txt | 344
ldap/servers/snmp/SNMPv2-TC.txt | 772
ldap/servers/snmp/ldap-agent.c | 26
ldap/servers/snmp/main.c | 11
ldap/servers/snmp/netscape-ldap.mib | 759
ldap/systools/idsktune.c | 71
lib/base/crit.cpp | 6
lib/base/ereport.cpp | 2
lib/base/file.cpp | 24
lib/base/lexer.cpp | 1015
lib/base/plist.cpp | 3
lib/base/rwlock.cpp | 168
lib/base/util.cpp | 13
lib/ldaputil/cert.c | 4
lib/ldaputil/certmap.c | 409
lib/ldaputil/dbconf.c | 1
lib/ldaputil/utest/Makefile | 149
lib/ldaputil/utest/auth.cpp | 611
lib/ldaputil/utest/authtest | 138
lib/ldaputil/utest/certmap.conf | 68
lib/ldaputil/utest/dblist.conf | 47
lib/ldaputil/utest/example.c | 153
lib/ldaputil/utest/plugin.c | 152
lib/ldaputil/utest/plugin.h | 57
lib/ldaputil/utest/stubs.c | 144
lib/ldaputil/utest/stubs.cpp | 139
lib/ldaputil/utest/test.ref | 480
lib/ldaputil/vtable.c | 2
lib/libaccess/acl.tab.cpp | 25
lib/libaccess/aclcache.cpp | 105
lib/libaccess/aclflush.cpp | 1
lib/libaccess/aclpriv.h | 1
lib/libaccess/acltext.y | 4
lib/libaccess/acltools.cpp | 1896
lib/libaccess/aclutil.cpp | 13
lib/libaccess/authdb.cpp | 112
lib/libaccess/lasdns.cpp | 23
lib/libaccess/lasgroup.cpp | 10
lib/libaccess/lasip.cpp | 20
lib/libaccess/nseframe.cpp | 1
lib/libaccess/oneeval.cpp | 19
lib/libaccess/permhash.h | 11
lib/libaccess/register.cpp | 50
lib/libaccess/usrcache.cpp | 14
lib/libaccess/utest/.purify | 19
lib/libaccess/utest/Makefile | 147
lib/libaccess/utest/acl.dat | 44
lib/libaccess/utest/aclfile0 | 87
lib/libaccess/utest/aclfile1 | 43
lib/libaccess/utest/aclfile10 | 45
lib/libaccess/utest/aclfile11 | 43
lib/libaccess/utest/aclfile12 | 43
lib/libaccess/utest/aclfile13 | 43
lib/libaccess/utest/aclfile14 | 43
lib/libaccess/utest/aclfile15 | 43
lib/libaccess/utest/aclfile16 | 43
lib/libaccess/utest/aclfile17 | 43
lib/libaccess/utest/aclfile18 | 51
lib/libaccess/utest/aclfile19 | 46
lib/libaccess/utest/aclfile2 | 43
lib/libaccess/utest/aclfile3 | 43
lib/libaccess/utest/aclfile4 | 43
lib/libaccess/utest/aclfile5 | 43
lib/libaccess/utest/aclfile6 | 55
lib/libaccess/utest/aclfile7 | 43
lib/libaccess/utest/aclfile8 | 43
lib/libaccess/utest/aclfile9 | 43
lib/libaccess/utest/aclgrp0 | 42
lib/libaccess/utest/aclgrp1 | 42
lib/libaccess/utest/aclgrp2 | 42
lib/libaccess/utest/aclgrp3 | 42
lib/libaccess/utest/aclgrp4 | 42
lib/libaccess/utest/acltest.cpp | 794
lib/libaccess/utest/onetest.cpp | 77
lib/libaccess/utest/shexp.cpp | 331
lib/libaccess/utest/shexp.h | 168
lib/libaccess/utest/test.ref | 217
lib/libaccess/utest/testmain.cpp | 89
lib/libaccess/utest/twotest.cpp | 87
lib/libaccess/utest/ustubs.cpp | 331
lib/libadmin/error.c | 2
lib/libadmin/template.c | 2
lib/libadmin/util.c | 48
lib/libsi18n/coreres.c | 141
lib/libsi18n/coreres.h | 52
lib/libsi18n/getlang.c | 330
lib/libsi18n/getstrmem.c | 160
lib/libsi18n/getstrmem.h | 1
lib/libsi18n/getstrprop.c | 85
lib/libsi18n/makstrdb.c | 21
lib/libsi18n/propset.c | 442
lib/libsi18n/propset.h | 80
lib/libsi18n/reshash.c | 21
ltmain.sh |13199 ++-
m4/db.m4 | 21
m4/fhs.m4 | 4
m4/icu.m4 | 25
m4/kerberos.m4 | 4
m4/mozldap.m4 | 38
m4/netsnmp.m4 | 15
m4/nspr.m4 | 17
m4/nss.m4 | 17
m4/openldap.m4 | 30
m4/pcre.m4 | 28
m4/sasl.m4 | 25
m4/selinux.m4 | 13
m4/svrcore.m4 | 41
man/man1/cl-dump.1 | 18
man/man1/dbgen.pl.1 | 4
man/man1/infadd.1 | 8
man/man1/migratecred.1 | 6
man/man1/mmldif.1 | 4
man/man1/pwdhash.1 | 4
man/man1/repl-monitor.1 | 16
man/man8/ns-slapd.8 | 10
man/man8/remove-ds.pl.8 | 6
man/man8/restart-dirsrv.8 | 50
man/man8/setup-ds.pl.8 | 4
man/man8/start-dirsrv.8 | 50
man/man8/stop-dirsrv.8 | 50
missing | 104
selinux/dirsrv.fc.in | 2
selinux/dirsrv.if | 41
selinux/dirsrv.te | 11
wrappers/cl-dump.in | 11
wrappers/dbscan.in | 10
wrappers/infadd.in | 12
wrappers/initscript.in | 244
wrappers/ldap-agent-initscript.in | 20
wrappers/ldap-agent.in | 12
wrappers/ldclt.in | 12
wrappers/ldif.in | 12
wrappers/migratecred.in | 14
wrappers/mmldif.in | 14
wrappers/pwdhash.in | 14
wrappers/repl-monitor.in | 11
wrappers/rsearch.in | 12
wrappers/systemd-snmp.service.in | 16
wrappers/systemd.group.in | 6
wrappers/systemd.template.service.in | 28
wrappers/systemd.template.sysconfig | 3
615 files changed, 79499 insertions(+), 67901 deletions(-)
---
12 years, 2 months
Branch '389-ds-base-1.2.10' - 3 commits - ldap/servers VERSION.sh
by Richard Allen Megginson
VERSION.sh | 2
ldap/servers/slapd/back-ldbm/import.c | 14 +++-
ldap/servers/slapd/ldaputil.c | 101 +++++++++++++++++++++-------------
3 files changed, 75 insertions(+), 42 deletions(-)
New commits:
commit ccceaa308d598c6d4bed102a0cde84c5f775b947
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Wed Feb 22 11:15:31 2012 -0700
bump version to 1.2.10.2
diff --git a/VERSION.sh b/VERSION.sh
index f55163a..45f8369 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -10,7 +10,7 @@ vendor="389 Project"
# PACKAGE_VERSION is constructed from these
VERSION_MAJOR=1
VERSION_MINOR=2
-VERSION_MAINT=10.0
+VERSION_MAINT=10.2
# if this is a PRERELEASE, set VERSION_PREREL
# otherwise, comment it out
# be sure to include the dot prefix in the prerel
commit 48ba947361c9995832d2157aa3e4bab32b5376d5
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Wed Feb 22 16:26:05 2012 -0700
Trac Ticket #298 - crash when replicating orphaned tombstone entry
https://fedorahosted.org/389/ticket/298
Fix description: The previous fix for
4. Reducing repeated "WARNING: bad entry: ID ##" messages.
introduced a regression that caused the import to crash. This fixes
the crash by restoring the bad entry ID logic.
Reviewed by: nhosoi (Thanks!)
(cherry picked from commit 6939b2d3b0db4bd5abea981217e539179be228a8)
diff --git a/ldap/servers/slapd/back-ldbm/import.c b/ldap/servers/slapd/back-ldbm/import.c
index 4958dc0..e3966ff 100644
--- a/ldap/servers/slapd/back-ldbm/import.c
+++ b/ldap/servers/slapd/back-ldbm/import.c
@@ -106,13 +106,17 @@ FifoItem *import_fifo_fetch(ImportJob *job, ID id, int worker)
} else {
return NULL;
}
- if (fi->entry && fi->bad && (FIFOITEM_BAD == fi->bad)) {
- fi->bad = FIFOITEM_BAD_PRINTED;
+ if (fi->entry) {
if (worker) {
- import_log_notice(job, "WARNING: bad entry: ID %d", id);
- return NULL;
+ if (fi->bad) {
+ if (fi->bad == FIFOITEM_BAD) {
+ fi->bad = FIFOITEM_BAD_PRINTED;
+ import_log_notice(job, "WARNING: bad entry: ID %d", id);
+ }
+ return NULL;
+ }
+ PR_ASSERT(fi->entry->ep_refcnt > 0);
}
- PR_ASSERT(fi->entry->ep_refcnt > 0);
}
return fi;
}
commit 0771165807dc6bee6a2206e9bf15097306da47c3
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Tue Feb 21 20:21:36 2012 -0700
Ticket #281 - TLS not working with latest openldap
https://fedorahosted.org/389/ticket/281
Resolves: Ticket #281
Bug Description: TLS not working with latest openldap
Reviewed by: nkinder (Thanks!)
Branch: 389-ds-base-1.2.10
Fix Description: The previous fix did not take into account ssl client
auth. The way openldap ssl init works now is that you must set all of the
ssl parameters before creating the new ctx. Since slapi_ldap_init_ext()
does not know if client auth will be used, we have to do all of the ssl
init in slapi_ldap_bind. Doing setup_ol_tls_conn() again will free the
old TLS context and parameters. It is a little more time consuming in
the clientauth case, but is safer and saves time in the other cases.
Platforms tested: RHEL6 x86_64, Fedora 16
Flag Day: no
Doc impact: no
(cherry picked from commit e7d9bdd341b360048e62c0d01894da0281503488)
diff --git a/ldap/servers/slapd/ldaputil.c b/ldap/servers/slapd/ldaputil.c
index 10d7907..545c703 100644
--- a/ldap/servers/slapd/ldaputil.c
+++ b/ldap/servers/slapd/ldaputil.c
@@ -557,6 +557,59 @@ slapi_ldif_parse_line(
return rc;
}
+#if defined(USE_OPENLDAP)
+static int
+setup_ol_tls_conn(LDAP *ld, int clientauth)
+{
+ char *certdir = config_get_certdir();
+ int optval = 0;
+ int ssl_strength = 0;
+ int rc = 0;
+
+ if (config_get_ssl_check_hostname()) {
+ ssl_strength = LDAP_OPT_X_TLS_HARD;
+ } else {
+ /* verify certificate only */
+ ssl_strength = LDAP_OPT_X_TLS_NEVER;
+ }
+
+ if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_REQUIRE_CERT, &ssl_strength))) {
+ slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ "failed: unable to set REQUIRE_CERT option to %d\n", ssl_strength);
+ }
+ /* tell it where our cert db is */
+ if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_CACERTDIR, certdir))) {
+ slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ "failed: unable to set CACERTDIR option to %s\n", certdir);
+ }
+ slapi_ch_free_string(&certdir);
+#if defined(LDAP_OPT_X_TLS_PROTOCOL_MIN)
+ optval = LDAP_OPT_X_TLS_PROTOCOL_SSL3;
+ if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_PROTOCOL_MIN, &optval))) {
+ slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ "failed: unable to set minimum TLS protocol level to SSL3\n");
+ }
+#endif /* LDAP_OPT_X_TLS_PROTOCOL_MIN */
+ if (clientauth) {
+ rc = slapd_SSL_client_auth(ld);
+ if (rc) {
+ slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ "failed: unable to setup connection for TLS/SSL EXTERNAL client cert authentication - %d\n", rc);
+ }
+ }
+
+ /* have to do this last - this creates the new TLS handle and sets/copies
+ all of the parameters set above into that TLS handle context - note
+ that optval is ignored - what matters is that it is not NULL */
+ if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_NEWCTX, &optval))) {
+ slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ "failed: unable to create new TLS context\n");
+ }
+
+ return rc;
+}
+#endif /* defined(USE_OPENLDAP) */
+
/*
Perform LDAP init and return an LDAP* handle. If ldapurl is given,
that is used as the basis for the protocol, host, port, and whether
@@ -784,9 +837,11 @@ slapi_ldap_init_ext(
*/
if (secure > 0) {
#if defined(USE_OPENLDAP)
- char *certdir = config_get_certdir();
- int optval = 0;
-#endif /* !USE_OPENLDAP */
+ if (setup_ol_tls_conn(ld, 0)) {
+ slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ "failed: unable to set SSL/TLS options\n");
+ }
+#else
int ssl_strength = 0;
LDAP *myld = NULL;
@@ -799,43 +854,12 @@ slapi_ldap_init_ext(
if (config_get_ssl_check_hostname()) {
/* check hostname against name in certificate */
-#if defined(USE_OPENLDAP)
- ssl_strength = LDAP_OPT_X_TLS_HARD;
-#else /* !USE_OPENLDAP */
ssl_strength = LDAPSSL_AUTH_CNCHECK;
-#endif /* !USE_OPENLDAP */
} else {
/* verify certificate only */
-#if defined(USE_OPENLDAP)
- ssl_strength = LDAP_OPT_X_TLS_NEVER;
-#else /* !USE_OPENLDAP */
ssl_strength = LDAPSSL_AUTH_CERT;
-#endif /* !USE_OPENLDAP */
}
-#if defined(USE_OPENLDAP)
- if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_REQUIRE_CERT, &ssl_strength))) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
- "failed: unable to set REQUIRE_CERT option to %d\n", ssl_strength);
- }
- /* tell it where our cert db is */
- if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_CACERTDIR, certdir))) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
- "failed: unable to set CACERTDIR option to %s\n", certdir);
- }
- slapi_ch_free_string(&certdir);
-#if defined(LDAP_OPT_X_TLS_PROTOCOL_MIN)
- optval = LDAP_OPT_X_TLS_PROTOCOL_SSL3;
- if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_PROTOCOL_MIN, &optval))) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
- "failed: unable to set minimum TLS protocol level to SSL3\n");
- }
-#endif /* LDAP_OPT_X_TLS_PROTOCOL_MIN */
- if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_NEWCTX, &optval))) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
- "failed: unable to create new TLS context\n");
- }
-#else /* !USE_OPENLDAP */
if ((rc = ldapssl_set_strength(myld, ssl_strength)) ||
(rc = ldapssl_set_option(myld, SSL_ENABLE_SSL2, PR_FALSE)) ||
(rc = ldapssl_set_option(myld, SSL_ENABLE_SSL3, PR_TRUE)) ||
@@ -960,10 +984,15 @@ slapi_ldap_bind(
ldap_set_option(ld, LDAP_OPT_CLIENT_CONTROLS, NULL);
if ((secure > 0) && mech && !strcmp(mech, LDAP_SASL_EXTERNAL)) {
+#if defined(USE_OPENLDAP)
+ /* we already set up a tls context in slapi_ldap_init_ext() - this will
+ free those old settings and context and create a new one */
+ rc = setup_ol_tls_conn(ld, 1);
+#else
/* SSL connections will use the server's security context
and cert for client auth */
rc = slapd_SSL_client_auth(ld);
-
+#endif
if (rc != 0) {
slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind",
"Error: could not configure the server for cert "
@@ -973,7 +1002,7 @@ slapi_ldap_bind(
} else {
slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_bind",
"Set up conn to use client auth\n");
- }
+ }
bvcreds.bv_val = NULL; /* ignore username and passed in creds */
bvcreds.bv_len = 0; /* for external auth */
bindid = NULL;
12 years, 2 months
ldap/servers
by Richard Allen Megginson
ldap/servers/slapd/back-ldbm/import.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 6939b2d3b0db4bd5abea981217e539179be228a8
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Wed Feb 22 16:26:05 2012 -0700
Trac Ticket #298 - crash when replicating orphaned tombstone entry
https://fedorahosted.org/389/ticket/298
Fix description: The previous fix for
4. Reducing repeated "WARNING: bad entry: ID ##" messages.
introduced a regression that caused the import to crash. This fixes
the crash by restoring the bad entry ID logic.
Reviewed by: nhosoi (Thanks!)
diff --git a/ldap/servers/slapd/back-ldbm/import.c b/ldap/servers/slapd/back-ldbm/import.c
index 4958dc0..e3966ff 100644
--- a/ldap/servers/slapd/back-ldbm/import.c
+++ b/ldap/servers/slapd/back-ldbm/import.c
@@ -106,13 +106,17 @@ FifoItem *import_fifo_fetch(ImportJob *job, ID id, int worker)
} else {
return NULL;
}
- if (fi->entry && fi->bad && (FIFOITEM_BAD == fi->bad)) {
- fi->bad = FIFOITEM_BAD_PRINTED;
+ if (fi->entry) {
if (worker) {
- import_log_notice(job, "WARNING: bad entry: ID %d", id);
- return NULL;
+ if (fi->bad) {
+ if (fi->bad == FIFOITEM_BAD) {
+ fi->bad = FIFOITEM_BAD_PRINTED;
+ import_log_notice(job, "WARNING: bad entry: ID %d", id);
+ }
+ return NULL;
+ }
+ PR_ASSERT(fi->entry->ep_refcnt > 0);
}
- PR_ASSERT(fi->entry->ep_refcnt > 0);
}
return fi;
}
12 years, 2 months
ldap/servers
by Richard Allen Megginson
ldap/servers/slapd/ldaputil.c | 101 +++++++++++++++++++++++++++---------------
1 file changed, 65 insertions(+), 36 deletions(-)
New commits:
commit e7d9bdd341b360048e62c0d01894da0281503488
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Tue Feb 21 20:21:36 2012 -0700
Ticket #281 - TLS not working with latest openldap
https://fedorahosted.org/389/ticket/281
Resolves: Ticket #281
Bug Description: TLS not working with latest openldap
Reviewed by: nkinder (Thanks!)
Branch: master
Fix Description: The previous fix did not take into account ssl client
auth. The way openldap ssl init works now is that you must set all of the
ssl parameters before creating the new ctx. Since slapi_ldap_init_ext()
does not know if client auth will be used, we have to do all of the ssl
init in slapi_ldap_bind. Doing setup_ol_tls_conn() again will free the
old TLS context and parameters. It is a little more time consuming in
the clientauth case, but is safer and saves time in the other cases.
Platforms tested: RHEL6 x86_64, Fedora 16
Flag Day: no
Doc impact: no
diff --git a/ldap/servers/slapd/ldaputil.c b/ldap/servers/slapd/ldaputil.c
index 10d7907..545c703 100644
--- a/ldap/servers/slapd/ldaputil.c
+++ b/ldap/servers/slapd/ldaputil.c
@@ -557,6 +557,59 @@ slapi_ldif_parse_line(
return rc;
}
+#if defined(USE_OPENLDAP)
+static int
+setup_ol_tls_conn(LDAP *ld, int clientauth)
+{
+ char *certdir = config_get_certdir();
+ int optval = 0;
+ int ssl_strength = 0;
+ int rc = 0;
+
+ if (config_get_ssl_check_hostname()) {
+ ssl_strength = LDAP_OPT_X_TLS_HARD;
+ } else {
+ /* verify certificate only */
+ ssl_strength = LDAP_OPT_X_TLS_NEVER;
+ }
+
+ if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_REQUIRE_CERT, &ssl_strength))) {
+ slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ "failed: unable to set REQUIRE_CERT option to %d\n", ssl_strength);
+ }
+ /* tell it where our cert db is */
+ if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_CACERTDIR, certdir))) {
+ slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ "failed: unable to set CACERTDIR option to %s\n", certdir);
+ }
+ slapi_ch_free_string(&certdir);
+#if defined(LDAP_OPT_X_TLS_PROTOCOL_MIN)
+ optval = LDAP_OPT_X_TLS_PROTOCOL_SSL3;
+ if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_PROTOCOL_MIN, &optval))) {
+ slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ "failed: unable to set minimum TLS protocol level to SSL3\n");
+ }
+#endif /* LDAP_OPT_X_TLS_PROTOCOL_MIN */
+ if (clientauth) {
+ rc = slapd_SSL_client_auth(ld);
+ if (rc) {
+ slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ "failed: unable to setup connection for TLS/SSL EXTERNAL client cert authentication - %d\n", rc);
+ }
+ }
+
+ /* have to do this last - this creates the new TLS handle and sets/copies
+ all of the parameters set above into that TLS handle context - note
+ that optval is ignored - what matters is that it is not NULL */
+ if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_NEWCTX, &optval))) {
+ slapi_log_error(SLAPI_LOG_FATAL, "setup_ol_tls_conn",
+ "failed: unable to create new TLS context\n");
+ }
+
+ return rc;
+}
+#endif /* defined(USE_OPENLDAP) */
+
/*
Perform LDAP init and return an LDAP* handle. If ldapurl is given,
that is used as the basis for the protocol, host, port, and whether
@@ -784,9 +837,11 @@ slapi_ldap_init_ext(
*/
if (secure > 0) {
#if defined(USE_OPENLDAP)
- char *certdir = config_get_certdir();
- int optval = 0;
-#endif /* !USE_OPENLDAP */
+ if (setup_ol_tls_conn(ld, 0)) {
+ slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
+ "failed: unable to set SSL/TLS options\n");
+ }
+#else
int ssl_strength = 0;
LDAP *myld = NULL;
@@ -799,43 +854,12 @@ slapi_ldap_init_ext(
if (config_get_ssl_check_hostname()) {
/* check hostname against name in certificate */
-#if defined(USE_OPENLDAP)
- ssl_strength = LDAP_OPT_X_TLS_HARD;
-#else /* !USE_OPENLDAP */
ssl_strength = LDAPSSL_AUTH_CNCHECK;
-#endif /* !USE_OPENLDAP */
} else {
/* verify certificate only */
-#if defined(USE_OPENLDAP)
- ssl_strength = LDAP_OPT_X_TLS_NEVER;
-#else /* !USE_OPENLDAP */
ssl_strength = LDAPSSL_AUTH_CERT;
-#endif /* !USE_OPENLDAP */
}
-#if defined(USE_OPENLDAP)
- if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_REQUIRE_CERT, &ssl_strength))) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
- "failed: unable to set REQUIRE_CERT option to %d\n", ssl_strength);
- }
- /* tell it where our cert db is */
- if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_CACERTDIR, certdir))) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
- "failed: unable to set CACERTDIR option to %s\n", certdir);
- }
- slapi_ch_free_string(&certdir);
-#if defined(LDAP_OPT_X_TLS_PROTOCOL_MIN)
- optval = LDAP_OPT_X_TLS_PROTOCOL_SSL3;
- if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_PROTOCOL_MIN, &optval))) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
- "failed: unable to set minimum TLS protocol level to SSL3\n");
- }
-#endif /* LDAP_OPT_X_TLS_PROTOCOL_MIN */
- if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_NEWCTX, &optval))) {
- slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext",
- "failed: unable to create new TLS context\n");
- }
-#else /* !USE_OPENLDAP */
if ((rc = ldapssl_set_strength(myld, ssl_strength)) ||
(rc = ldapssl_set_option(myld, SSL_ENABLE_SSL2, PR_FALSE)) ||
(rc = ldapssl_set_option(myld, SSL_ENABLE_SSL3, PR_TRUE)) ||
@@ -960,10 +984,15 @@ slapi_ldap_bind(
ldap_set_option(ld, LDAP_OPT_CLIENT_CONTROLS, NULL);
if ((secure > 0) && mech && !strcmp(mech, LDAP_SASL_EXTERNAL)) {
+#if defined(USE_OPENLDAP)
+ /* we already set up a tls context in slapi_ldap_init_ext() - this will
+ free those old settings and context and create a new one */
+ rc = setup_ol_tls_conn(ld, 1);
+#else
/* SSL connections will use the server's security context
and cert for client auth */
rc = slapd_SSL_client_auth(ld);
-
+#endif
if (rc != 0) {
slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind",
"Error: could not configure the server for cert "
@@ -973,7 +1002,7 @@ slapi_ldap_bind(
} else {
slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_bind",
"Set up conn to use client auth\n");
- }
+ }
bvcreds.bv_val = NULL; /* ignore username and passed in creds */
bvcreds.bv_len = 0; /* for external auth */
bindid = NULL;
12 years, 2 months
ldap/servers
by Richard Allen Megginson
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit f4dc9c43cd94b667570342bafb4b7d50874b9f08
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Wed Feb 22 09:20:27 2012 -0700
coverity 12559 Uninitialized pointer read In ldbm_back_modify(): Reads an uninitialized pointer or its target
coverity 12559 Uninitialized pointer read In ldbm_back_modify(): Reads an uninitialized pointer or its target
Have to call dblayer_txn_init() before testing or freeing the transaction
Reviewed by: mareynol (Thanks!)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index 736c66b..7d16d0c 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -228,6 +228,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
slapi_pblock_get (pb, SLAPI_IS_REPLICATED_OPERATION, &repl_op);
slapi_pblock_get( pb, SLAPI_OPERATION, &operation );
+ dblayer_txn_init(li,&txn); /* must do this before first goto error_return */
if (NULL == operation)
{
ldap_result_code = LDAP_OPERATIONS_ERROR;
@@ -238,15 +239,14 @@ ldbm_back_modify( Slapi_PBlock *pb )
is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV);
inst = (ldbm_instance *) be->be_instance_info;
- dblayer_txn_init(li,&txn);
- /* the calls to search for entries require the parent txn if any
- so set txn to the parent_txn until we begin the child transaction */
- txn.back_txn_txn = parent_txn;
if (NULL == addr)
{
goto error_return;
}
+ /* the calls to search for entries require the parent txn if any
+ so set txn to the parent_txn until we begin the child transaction */
+ txn.back_txn_txn = parent_txn;
/* no need to check the dn syntax as this is a replicated op */
if(!repl_op){
ldap_result_code = slapi_dn_syntax_check(pb, slapi_sdn_get_dn(addr->sdn), 1);
12 years, 2 months
Branch '389-ds-base-1.2.10' - ldap/servers
by Richard Allen Megginson
ldap/servers/slapd/value.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit b1972458e2a5d1756f4aed678ff3828535ea626f
Author: Noriko Hosoi <nhosoi(a)ponyo.sjc.redhat.com>
Date: Tue Feb 21 13:22:07 2012 -0800
Trac Ticket #290 - server hangs during shutdown if betxn pre/post op fails
https://fedorahosted.org/389/ticket/290
Fix description: If a dn type modify value is invalid, the modify
operation could crash the server. This patch fixes it.
(cherry picked from commit 69087b4eb886d25f3c20fce7170874103ff52001)
diff --git a/ldap/servers/slapd/value.c b/ldap/servers/slapd/value.c
index 30301e2..0d2a29b 100644
--- a/ldap/servers/slapd/value.c
+++ b/ldap/servers/slapd/value.c
@@ -594,10 +594,11 @@ value_normalize_value(Slapi_Value *value)
if (slapi_sdn_get_dn(sdn)) {
value->bv.bv_val = slapi_ch_strdup(slapi_sdn_get_dn(sdn));
value->bv.bv_len = slapi_sdn_get_ndn_len(sdn);
+ slapi_sdn_free(&sdn);
} else {
rc = 1;
+ slapi_ch_free((void **)&sdn); /* free just Slapi_DN */
}
- slapi_sdn_free(&sdn);
return rc;
}
12 years, 2 months
2 commits - ldap/servers
by Noriko Hosoi
ldap/servers/slapd/back-ldbm/ldbm_add.c | 4 ++--
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 4 ++--
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 6 +++---
ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | 5 +++--
ldap/servers/slapd/value.c | 3 ++-
5 files changed, 12 insertions(+), 10 deletions(-)
New commits:
commit 69087b4eb886d25f3c20fce7170874103ff52001
Author: Noriko Hosoi <nhosoi(a)ponyo.sjc.redhat.com>
Date: Tue Feb 21 13:22:07 2012 -0800
Trac Ticket #290 - server hangs during shutdown if betxn pre/post op fails
https://fedorahosted.org/389/ticket/290
Fix description: If a dn type modify value is invalid, the modify
operation could crash the server. This patch fixes it.
diff --git a/ldap/servers/slapd/value.c b/ldap/servers/slapd/value.c
index 30301e2..0d2a29b 100644
--- a/ldap/servers/slapd/value.c
+++ b/ldap/servers/slapd/value.c
@@ -594,10 +594,11 @@ value_normalize_value(Slapi_Value *value)
if (slapi_sdn_get_dn(sdn)) {
value->bv.bv_val = slapi_ch_strdup(slapi_sdn_get_dn(sdn));
value->bv.bv_len = slapi_sdn_get_ndn_len(sdn);
+ slapi_sdn_free(&sdn);
} else {
rc = 1;
+ slapi_ch_free((void **)&sdn); /* free just Slapi_DN */
}
- slapi_sdn_free(&sdn);
return rc;
}
commit 4495cf3333306ebe0bedad9a4dba7c458f071626
Author: Noriko Hosoi <nhosoi(a)ponyo.sjc.redhat.com>
Date: Tue Feb 21 13:20:12 2012 -0800
Trac Ticket #290 - server hangs during shutdown if betxn pre/post op fails
https://fedorahosted.org/389/ticket/290
Fix description: The logic to call dblayer_txn_abort in the
ldbm_back update functions was wrong. If the operations fail,
the abort function has to be called if dblayer_txn_begin is
already called and dblayer_txn_commit is not. This patch
checks the txn value set by dblayer_txn_commit to determine
to call dblayer_txn_abort or not.
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_add.c b/ldap/servers/slapd/back-ldbm/ldbm_add.c
index d29ff5f..8cecada 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_add.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c
@@ -667,7 +667,7 @@ ldbm_back_add( Slapi_PBlock *pb )
*/
txn.back_txn_txn = NULL; /* ready to create the child transaction */
for (retry_count = 0; retry_count < RETRY_TIMES; retry_count++) {
- if (retry_count > 0) {
+ if (txn.back_txn_txn && (txn.back_txn_txn != parent_txn)) {
dblayer_txn_abort(li,&txn);
/* txn is no longer valid - reset slapi_txn to the parent */
txn.back_txn_txn = NULL;
@@ -976,7 +976,7 @@ diskfull_return:
rc= return_on_disk_full(li);
} else {
/* It is safer not to abort when the transaction is not started. */
- if (retry_count > 0) {
+ if (txn.back_txn_txn && (txn.back_txn_txn != parent_txn)) {
dblayer_txn_abort(li,&txn); /* abort crashes in case disk full */
/* txn is no longer valid - reset the txn pointer to the parent */
txn.back_txn_txn = NULL;
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
index b07f634..2625506 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
@@ -460,7 +460,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
txn.back_txn_txn = NULL; /* ready to create the child transaction */
for (retry_count = 0; retry_count < RETRY_TIMES; retry_count++) {
- if (retry_count > 0) {
+ if (txn.back_txn_txn && (txn.back_txn_txn != parent_txn)) {
dblayer_txn_abort(li,&txn);
/* We're re-trying */
LDAPDebug( LDAP_DEBUG_TRACE, "Delete Retrying Transaction\n", 0, 0, 0 );
@@ -987,7 +987,7 @@ error_return:
rc= SLAPI_FAIL_GENERAL;
/* It is safer not to abort when the transaction is not started. */
- if (retry_count > 0) {
+ if (txn.back_txn_txn && (txn.back_txn_txn != parent_txn)) {
dblayer_txn_abort(li,&txn); /* abort crashes in case disk full */
/* txn is no longer valid - reset the txn pointer to the parent */
txn.back_txn_txn = NULL;
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index f4f1263..736c66b 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -414,7 +414,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
txn.back_txn_txn = NULL; /* ready to create the child transaction */
for (retry_count = 0; retry_count < RETRY_TIMES; retry_count++) {
- if (retry_count > 0) {
+ if (txn.back_txn_txn && (txn.back_txn_txn != parent_txn)) {
dblayer_txn_abort(li,&txn);
/* txn is no longer valid - reset slapi_txn to the parent */
txn.back_txn_txn = NULL;
@@ -614,8 +614,8 @@ error_return:
if (disk_full) {
rc= return_on_disk_full(li);
- } else if (ldap_result_code != LDAP_SUCCESS) {
- if (retry_count > 0) {
+ } else {
+ if (txn.back_txn_txn && (txn.back_txn_txn != parent_txn)) {
/* It is safer not to abort when the transaction is not started. */
dblayer_txn_abort(li,&txn); /* abort crashes in case disk full */
/* txn is no longer valid - reset the txn pointer to the parent */
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
index 6b0fa34..2a974ea 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
@@ -701,7 +701,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb )
txn.back_txn_txn = NULL; /* ready to create the child transaction */
for (retry_count = 0; retry_count < RETRY_TIMES; retry_count++)
{
- if (retry_count > 0)
+ if (txn.back_txn_txn && (txn.back_txn_txn != parent_txn))
{
dblayer_txn_abort(li,&txn);
/* txn is no longer valid - reset slapi_txn to the parent */
@@ -1072,7 +1072,8 @@ error_return:
else
{
/* It is safer not to abort when the transaction is not started. */
- if (retry_count > 0) {
+ if (txn.back_txn_txn && (txn.back_txn_txn != parent_txn))
+ {
dblayer_txn_abort(li,&txn); /* abort crashes in case disk full */
/* txn is no longer valid - reset the txn pointer to the parent */
txn.back_txn_txn = NULL;
12 years, 2 months
Branch '389-ds-base-1.2.10' - ldap/servers
by Noriko Hosoi
ldap/servers/plugins/replication/urp.c | 13 +++++-
ldap/servers/plugins/replication/urp.h | 1
ldap/servers/plugins/replication/urp_tombstone.c | 3 -
ldap/servers/slapd/add.c | 13 +++---
ldap/servers/slapd/back-ldbm/import-threads.c | 4 +-
ldap/servers/slapd/back-ldbm/import.c | 11 ++---
ldap/servers/slapd/back-ldbm/import.h | 11 +++--
ldap/servers/slapd/back-ldbm/ldbm_add.c | 3 -
ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c | 43 ++++++++---------------
ldap/servers/slapd/back-ldbm/ldif2ldbm.c | 4 +-
10 files changed, 53 insertions(+), 53 deletions(-)
New commits:
commit d7e1c25b9543965c50a5c09d2271cd4068149d56
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Feb 21 10:17:00 2012 -0800
Trac Ticket #298 - crash when replicating orphaned tombstone entry
https://fedorahosted.org/389/ticket/298
Fix description:
1. The cause of the crash was freeing a to-be-added entry in
tombstone_to_glue although the entry is consumed in
slapi_add_entry_internal_set_pb/slapi_add_internal_pb.
This patch removes the redundant slapi_entry_free from
tombstone_to_glue.
2. Introducing is_suffix_dn_ext to pass is_tombstone flag
for getting the proper parent sdn of a tombstoned entry.
3. Logic handling ancestor tombstone was broken.
In _entryrdn_insert_key, if _entryrdn_get_tombstone_elem finds
a child node, it was checking if the node is a tombstone or
not immediately. It should have been done in the next loop.
4. Reducing repeated "WARNING: bad entry: ID ##" messages.
(cherry picked from commit 2e5ee4d10c24f7d102fc7461f23f77ac631dc507)
diff --git a/ldap/servers/plugins/replication/urp.c b/ldap/servers/plugins/replication/urp.c
index 33be252..25dfd5c 100644
--- a/ldap/servers/plugins/replication/urp.c
+++ b/ldap/servers/plugins/replication/urp.c
@@ -732,7 +732,7 @@ urp_fixup_add_entry (Slapi_Entry *e, const char *target_uniqueid, const char *pa
*/
slapi_add_entry_internal_set_pb (
newpb,
- e,
+ e, /* entry will be consumed */
NULL, /*Controls*/
repl_get_plugin_identity ( PLUGIN_MULTIMASTER_REPLICATION ),
OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | opflags);
@@ -1276,14 +1276,15 @@ is_suffix_entry ( Slapi_PBlock *pb, Slapi_Entry *entry, Slapi_DN **parentdn )
}
int
-is_suffix_dn ( Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parentdn )
+is_suffix_dn_ext ( Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parentdn,
+ int is_tombstone )
{
Slapi_Backend *backend;
int rc;
*parentdn = slapi_sdn_new();
slapi_pblock_get( pb, SLAPI_BACKEND, &backend );
- slapi_sdn_get_backend_parent (dn, *parentdn, backend);
+ slapi_sdn_get_backend_parent_ext (dn, *parentdn, backend, is_tombstone);
/* A suffix entry doesn't have parent dn */
rc = slapi_sdn_isempty (*parentdn) ? 1 : 0;
@@ -1291,6 +1292,12 @@ is_suffix_dn ( Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parentdn )
return rc;
}
+int
+is_suffix_dn ( Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parentdn )
+{
+ return is_suffix_dn_ext ( pb, dn, parentdn, 0 );
+}
+
static int
mod_namingconflict_attr (const char *uniqueid, const Slapi_DN *entrysdn,
const Slapi_DN *conflictsdn, CSN *opcsn, void *txn)
diff --git a/ldap/servers/plugins/replication/urp.h b/ldap/servers/plugins/replication/urp.h
index 77ac8a4..627f914 100644
--- a/ldap/servers/plugins/replication/urp.h
+++ b/ldap/servers/plugins/replication/urp.h
@@ -63,6 +63,7 @@ int urp_fixup_rename_entry (Slapi_Entry *entry, const char *newrdn, int opflags,
int urp_fixup_modify_entry (const char *uniqueid, const Slapi_DN *sdn, CSN *opcsn, Slapi_Mods *smods, int opflags, void *txn);
int is_suffix_dn (Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parenddn);
+int is_suffix_dn_ext (Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parenddn, int is_tombstone);
/*
* urp_glue.c
diff --git a/ldap/servers/plugins/replication/urp_tombstone.c b/ldap/servers/plugins/replication/urp_tombstone.c
index 7c36421..b84e42c 100644
--- a/ldap/servers/plugins/replication/urp_tombstone.c
+++ b/ldap/servers/plugins/replication/urp_tombstone.c
@@ -174,7 +174,7 @@ tombstone_to_glue (
/* JCM - This DN calculation is odd. It could resolve to NULL
* which won't help us identify the correct backend to search.
*/
- is_suffix_dn (pb, tombstonedn, &parentdn);
+ is_suffix_dn_ext (pb, tombstonedn, &parentdn, 1 /* is_tombstone */);
parentuniqueid= slapi_entry_attr_get_charptr (tombstoneentry,
SLAPI_ATTR_VALUE_PARENT_UNIQUEID); /* Allocated */
tombstone_to_glue_resolve_parent (pb, sessionid, parentdn, parentuniqueid, opcsn);
@@ -207,7 +207,6 @@ tombstone_to_glue (
"%s: Can't resurrect tombstone %s to glue reason '%s', error=%d\n",
sessionid, addingdn, reason, op_result);
}
- slapi_entry_free (addingentry);
return op_result;
}
diff --git a/ldap/servers/slapd/add.c b/ldap/servers/slapd/add.c
index cc712de..c10322b 100644
--- a/ldap/servers/slapd/add.c
+++ b/ldap/servers/slapd/add.c
@@ -377,7 +377,7 @@ int slapi_add_internal_set_pb (Slapi_PBlock *pb, const char *dn, LDAPMod **attrs
return rc;
}
-
+/* Note: Passed entry e is going to be consumed. */
/* Initialize a pblock for a call to slapi_add_internal_pb() */
void slapi_add_entry_internal_set_pb (Slapi_PBlock *pb, Slapi_Entry *e, LDAPControl **controls,
Slapi_ComponentId *plugin_identity, int operation_flags)
@@ -415,12 +415,12 @@ static int add_internal_pb (Slapi_PBlock *pb)
{
opresult = LDAP_PARAM_ERROR;
slapi_pblock_set(pb, SLAPI_PLUGIN_INTOP_RESULT, &opresult);
- return 0;
+ return 0;
}
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
- op->o_handler_data = &opresult;
- op->o_result_handler = internal_getresult_callback;
+ op->o_handler_data = &opresult;
+ op->o_result_handler = internal_getresult_callback;
slapi_pblock_set(pb, SLAPI_REQCONTROLS, controls);
@@ -431,9 +431,9 @@ static int add_internal_pb (Slapi_PBlock *pb)
set_config_params (pb);
/* perform the add operation */
- op_shared_add (pb);
+ op_shared_add (pb);
- slapi_pblock_set(pb, SLAPI_PLUGIN_INTOP_RESULT, &opresult);
+ slapi_pblock_set(pb, SLAPI_PLUGIN_INTOP_RESULT, &opresult);
return 0;
}
@@ -730,6 +730,7 @@ done:
slapi_entry_free(pse);
slapi_ch_free((void **)&operation->o_params.p.p_add.parentuniqueid);
slapi_entry_free(e);
+ slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL);
valuearray_free(&unhashed_password_vals);
slapi_ch_free((void**)&pwdtype);
slapi_ch_free_string(&proxydn);
diff --git a/ldap/servers/slapd/back-ldbm/import-threads.c b/ldap/servers/slapd/back-ldbm/import-threads.c
index 458ead0..4c1129d 100644
--- a/ldap/servers/slapd/back-ldbm/import-threads.c
+++ b/ldap/servers/slapd/back-ldbm/import-threads.c
@@ -2039,7 +2039,7 @@ foreman_do_entrydn(ImportJob *job, FifoItem *fi)
fi->line, fi->filename);
idl_free(IDL);
/* skip this one */
- fi->bad = 1;
+ fi->bad = FIFOITEM_BAD;
job->skipped++;
return -1; /* skip to next entry */
}
@@ -2214,7 +2214,7 @@ import_foreman(void *param)
slapi_entry_get_dn(fi->entry->ep_entry),
fi->line, fi->filename);
/* skip this one */
- fi->bad = 1;
+ fi->bad = FIFOITEM_BAD;
job->skipped++;
goto cont; /* below */
}
diff --git a/ldap/servers/slapd/back-ldbm/import.c b/ldap/servers/slapd/back-ldbm/import.c
index 7f03eb3..4958dc0 100644
--- a/ldap/servers/slapd/back-ldbm/import.c
+++ b/ldap/servers/slapd/back-ldbm/import.c
@@ -106,14 +106,13 @@ FifoItem *import_fifo_fetch(ImportJob *job, ID id, int worker)
} else {
return NULL;
}
- if (fi->entry) {
+ if (fi->entry && fi->bad && (FIFOITEM_BAD == fi->bad)) {
+ fi->bad = FIFOITEM_BAD_PRINTED;
if (worker) {
- if (fi->bad) {
- import_log_notice(job, "WARNING: bad entry: ID %d", id);
- return NULL;
- }
- PR_ASSERT(fi->entry->ep_refcnt > 0);
+ import_log_notice(job, "WARNING: bad entry: ID %d", id);
+ return NULL;
}
+ PR_ASSERT(fi->entry->ep_refcnt > 0);
}
return fi;
}
diff --git a/ldap/servers/slapd/back-ldbm/import.h b/ldap/servers/slapd/back-ldbm/import.h
index bef5fa0..c9a3f8a 100644
--- a/ldap/servers/slapd/back-ldbm/import.h
+++ b/ldap/servers/slapd/back-ldbm/import.h
@@ -83,12 +83,15 @@ struct _import_index_info
/* item on the entry FIFO */
typedef struct {
struct backentry *entry;
- char *filename; /* or NULL */
- int line; /* filename/line are used to report errors */
- int bad; /* foreman did not like the entry */
- size_t esize; /* entry size */
+ char *filename; /* or NULL */
+ int line; /* filename/line are used to report errors */
+ int bad; /* foreman did not like the entry */
+ size_t esize; /* entry size */
} FifoItem;
+#define FIFOITEM_BAD 1
+#define FIFOITEM_BAD_PRINTED 2
+
typedef struct {
FifoItem *item;
size_t size; /* Queue size in entries (computed in import_fifo_init). */
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_add.c b/ldap/servers/slapd/back-ldbm/ldbm_add.c
index acab07d..df09c64 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_add.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c
@@ -176,8 +176,7 @@ ldbm_back_add( Slapi_PBlock *pb )
}
- if (!is_tombstone_operation && !is_resurect_operation)
- {
+ if (!is_tombstone_operation) {
rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_DN_ENTRY);
}
rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_UNIQUEID_ENTRY);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
index a0aaa80..2a7b1e4 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
@@ -1584,8 +1584,7 @@ retry_get:
slapi_ch_free(&ptr);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
- "<-- _entryrdn_get_elem\n");
+ slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG, "<-- _entryrdn_get_elem\n");
return rc;
}
@@ -2231,6 +2230,12 @@ _entryrdn_insert_key(backend *be,
/* Check the direct child in the RDN array, first */
rdnidx = slapi_rdn_get_prev_ext(srdn, rdnidx,
&childnrdn, FLAG_ALL_NRDNS);
+ if ((rdnidx < 0) || (NULL == childnrdn)) {
+ slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ "_entryrdn_insert_key: RDN list \"%s\" is broken: "
+ "idx(%d)\n", slapi_rdn_get_rdn(srdn), rdnidx);
+ goto bail;
+ }
/* Generate a key for child tree */
/* E.g., C1 */
keybuf = slapi_ch_smprintf("%c%u", RDN_INDEX_CHILD, workid);
@@ -2298,7 +2303,7 @@ _entryrdn_insert_key(backend *be,
*/
rc = _entryrdn_get_tombstone_elem(cursor, tmpsrdn, &key,
childnrdn, &tmpelem);
- if (rc || (NULL == tmpelem)) {
+ if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
if (DB_NOTFOUND == rc) {
@@ -2312,24 +2317,16 @@ _entryrdn_insert_key(backend *be,
}
slapi_ch_free_string(&dn);
goto bail;
- } else {
- int tmpidx = slapi_rdn_get_prev_ext(srdn, rdnidx,
- &childnrdn, FLAG_ALL_NRDNS);
- if (childnrdn &&
- (0 == strncasecmp(childnrdn, SLAPI_ATTR_UNIQUEID,
- sizeof(SLAPI_ATTR_UNIQUEID) - 1))) {
- rdnidx = tmpidx;
- }
}
/* Node is a tombstone. */
- slapi_ch_free((void **)&elem);
- elem = tmpelem;
- currid = id_stored_to_internal(elem->rdn_elem_id);
- nrdn = childnrdn;
- workid = currid;
- slapi_ch_free((void **)&parentelem);
- parentelem = elem;
- elem = NULL;
+ if (tmpelem) {
+ currid = id_stored_to_internal(tmpelem->rdn_elem_id);
+ nrdn = childnrdn;
+ workid = currid;
+ slapi_ch_free((void **)&parentelem);
+ parentelem = tmpelem;
+ slapi_ch_free((void **)&elem);
+ }
}
} else {
char *dn = NULL;
@@ -2823,14 +2820,6 @@ _entryrdn_index_read(backend *be,
slapi_rdn_free(&tmpsrdn);
}
goto bail;
- } else {
- int tmpidx = slapi_rdn_get_prev_ext(srdn, rdnidx,
- &childnrdn, FLAG_ALL_NRDNS);
- if (childnrdn &&
- (0 == strncasecmp(childnrdn, SLAPI_ATTR_UNIQUEID,
- sizeof(SLAPI_ATTR_UNIQUEID) - 1))) {
- rdnidx = tmpidx;
- }
}
} else {
slapi_ch_free((void **)&tmpelem);
diff --git a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
index 1e28070..77f7cc9 100644
--- a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
+++ b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
@@ -256,7 +256,9 @@ int add_op_attrs(Slapi_PBlock *pb, struct ldbminfo *li, struct backentry *ep,
* If so, need to get the grandparent of the leaf.
*/
if (slapi_entry_flag_is_set(ep->ep_entry,
- SLAPI_ENTRY_FLAG_TOMBSTONE)) {
+ SLAPI_ENTRY_FLAG_TOMBSTONE) &&
+ (0 == strncasecmp(pdn, SLAPI_ATTR_UNIQUEID,
+ sizeof(SLAPI_ATTR_UNIQUEID) - 1))) {
char *ppdn = slapi_dn_parent(pdn);
slapi_ch_free_string(&pdn);
if (NULL == ppdn) {
12 years, 2 months
ldap/servers
by Noriko Hosoi
ldap/servers/plugins/replication/urp.c | 13 +++++-
ldap/servers/plugins/replication/urp.h | 1
ldap/servers/plugins/replication/urp_tombstone.c | 3 -
ldap/servers/slapd/add.c | 13 +++---
ldap/servers/slapd/back-ldbm/import-threads.c | 4 +-
ldap/servers/slapd/back-ldbm/import.c | 11 ++---
ldap/servers/slapd/back-ldbm/import.h | 11 +++--
ldap/servers/slapd/back-ldbm/ldbm_add.c | 3 -
ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c | 43 ++++++++---------------
ldap/servers/slapd/back-ldbm/ldif2ldbm.c | 4 +-
10 files changed, 53 insertions(+), 53 deletions(-)
New commits:
commit 2e5ee4d10c24f7d102fc7461f23f77ac631dc507
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Fri Feb 17 16:28:48 2012 -0800
Trac Ticket #298 - crash when replicating orphaned tombstone entry
https://fedorahosted.org/389/ticket/298
Fix description:
1. The cause of the crash was freeing a to-be-added entry in
tombstone_to_glue although the entry is consumed in
slapi_add_entry_internal_set_pb/slapi_add_internal_pb.
This patch removes the redundant slapi_entry_free from
tombstone_to_glue.
2. Introducing is_suffix_dn_ext to pass is_tombstone flag
for getting the proper parent sdn of a tombstoned entry.
3. Logic handling ancestor tombstone was broken.
In _entryrdn_insert_key, if _entryrdn_get_tombstone_elem finds
a child node, it was checking if the node is a tombstone or
not immediately. It should have been done in the next loop.
4. Reducing repeated "WARNING: bad entry: ID ##" messages.
diff --git a/ldap/servers/plugins/replication/urp.c b/ldap/servers/plugins/replication/urp.c
index 1328996..7000b0e 100644
--- a/ldap/servers/plugins/replication/urp.c
+++ b/ldap/servers/plugins/replication/urp.c
@@ -726,7 +726,7 @@ urp_fixup_add_entry (Slapi_Entry *e, const char *target_uniqueid, const char *pa
*/
slapi_add_entry_internal_set_pb (
newpb,
- e,
+ e, /* entry will be consumed */
NULL, /*Controls*/
repl_get_plugin_identity ( PLUGIN_MULTIMASTER_REPLICATION ),
OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | opflags);
@@ -1260,14 +1260,15 @@ is_suffix_entry ( Slapi_PBlock *pb, Slapi_Entry *entry, Slapi_DN **parentdn )
}
int
-is_suffix_dn ( Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parentdn )
+is_suffix_dn_ext ( Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parentdn,
+ int is_tombstone )
{
Slapi_Backend *backend;
int rc;
*parentdn = slapi_sdn_new();
slapi_pblock_get( pb, SLAPI_BACKEND, &backend );
- slapi_sdn_get_backend_parent (dn, *parentdn, backend);
+ slapi_sdn_get_backend_parent_ext (dn, *parentdn, backend, is_tombstone);
/* A suffix entry doesn't have parent dn */
rc = slapi_sdn_isempty (*parentdn) ? 1 : 0;
@@ -1275,6 +1276,12 @@ is_suffix_dn ( Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parentdn )
return rc;
}
+int
+is_suffix_dn ( Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parentdn )
+{
+ return is_suffix_dn_ext ( pb, dn, parentdn, 0 );
+}
+
static int
mod_namingconflict_attr (const char *uniqueid, const Slapi_DN *entrysdn,
const Slapi_DN *conflictsdn, CSN *opcsn)
diff --git a/ldap/servers/plugins/replication/urp.h b/ldap/servers/plugins/replication/urp.h
index 2ca7ad2..ec7c94d 100644
--- a/ldap/servers/plugins/replication/urp.h
+++ b/ldap/servers/plugins/replication/urp.h
@@ -63,6 +63,7 @@ int urp_fixup_rename_entry (Slapi_Entry *entry, const char *newrdn, int opflags)
int urp_fixup_modify_entry (const char *uniqueid, const Slapi_DN *sdn, CSN *opcsn, Slapi_Mods *smods, int opflags);
int is_suffix_dn (Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parenddn);
+int is_suffix_dn_ext (Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parenddn, int is_tombstone);
/*
* urp_glue.c
diff --git a/ldap/servers/plugins/replication/urp_tombstone.c b/ldap/servers/plugins/replication/urp_tombstone.c
index 6dd9a2a..a61f1e5 100644
--- a/ldap/servers/plugins/replication/urp_tombstone.c
+++ b/ldap/servers/plugins/replication/urp_tombstone.c
@@ -169,7 +169,7 @@ tombstone_to_glue (
/* JCM - This DN calculation is odd. It could resolve to NULL
* which won't help us identify the correct backend to search.
*/
- is_suffix_dn (pb, tombstonedn, &parentdn);
+ is_suffix_dn_ext (pb, tombstonedn, &parentdn, 1 /* is_tombstone */);
parentuniqueid= slapi_entry_attr_get_charptr (tombstoneentry,
SLAPI_ATTR_VALUE_PARENT_UNIQUEID); /* Allocated */
tombstone_to_glue_resolve_parent (pb, sessionid, parentdn, parentuniqueid, opcsn);
@@ -201,7 +201,6 @@ tombstone_to_glue (
"%s: Can't resurrect tombstone %s to glue reason '%s', error=%d\n",
sessionid, addingdn, reason, op_result);
}
- slapi_entry_free (addingentry);
return op_result;
}
diff --git a/ldap/servers/slapd/add.c b/ldap/servers/slapd/add.c
index 206dfc4..53fd3fc 100644
--- a/ldap/servers/slapd/add.c
+++ b/ldap/servers/slapd/add.c
@@ -377,7 +377,7 @@ int slapi_add_internal_set_pb (Slapi_PBlock *pb, const char *dn, LDAPMod **attrs
return rc;
}
-
+/* Note: Passed entry e is going to be consumed. */
/* Initialize a pblock for a call to slapi_add_internal_pb() */
void slapi_add_entry_internal_set_pb (Slapi_PBlock *pb, Slapi_Entry *e, LDAPControl **controls,
Slapi_ComponentId *plugin_identity, int operation_flags)
@@ -415,12 +415,12 @@ static int add_internal_pb (Slapi_PBlock *pb)
{
opresult = LDAP_PARAM_ERROR;
slapi_pblock_set(pb, SLAPI_PLUGIN_INTOP_RESULT, &opresult);
- return 0;
+ return 0;
}
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
- op->o_handler_data = &opresult;
- op->o_result_handler = internal_getresult_callback;
+ op->o_handler_data = &opresult;
+ op->o_result_handler = internal_getresult_callback;
slapi_pblock_set(pb, SLAPI_REQCONTROLS, controls);
@@ -431,9 +431,9 @@ static int add_internal_pb (Slapi_PBlock *pb)
set_config_params (pb);
/* perform the add operation */
- op_shared_add (pb);
+ op_shared_add (pb);
- slapi_pblock_set(pb, SLAPI_PLUGIN_INTOP_RESULT, &opresult);
+ slapi_pblock_set(pb, SLAPI_PLUGIN_INTOP_RESULT, &opresult);
return 0;
}
@@ -731,6 +731,7 @@ done:
slapi_entry_free(pse);
slapi_ch_free((void **)&operation->o_params.p.p_add.parentuniqueid);
slapi_entry_free(e);
+ slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL);
valuearray_free(&unhashed_password_vals);
slapi_ch_free((void**)&pwdtype);
slapi_ch_free_string(&proxydn);
diff --git a/ldap/servers/slapd/back-ldbm/import-threads.c b/ldap/servers/slapd/back-ldbm/import-threads.c
index 458ead0..4c1129d 100644
--- a/ldap/servers/slapd/back-ldbm/import-threads.c
+++ b/ldap/servers/slapd/back-ldbm/import-threads.c
@@ -2039,7 +2039,7 @@ foreman_do_entrydn(ImportJob *job, FifoItem *fi)
fi->line, fi->filename);
idl_free(IDL);
/* skip this one */
- fi->bad = 1;
+ fi->bad = FIFOITEM_BAD;
job->skipped++;
return -1; /* skip to next entry */
}
@@ -2214,7 +2214,7 @@ import_foreman(void *param)
slapi_entry_get_dn(fi->entry->ep_entry),
fi->line, fi->filename);
/* skip this one */
- fi->bad = 1;
+ fi->bad = FIFOITEM_BAD;
job->skipped++;
goto cont; /* below */
}
diff --git a/ldap/servers/slapd/back-ldbm/import.c b/ldap/servers/slapd/back-ldbm/import.c
index 7f03eb3..4958dc0 100644
--- a/ldap/servers/slapd/back-ldbm/import.c
+++ b/ldap/servers/slapd/back-ldbm/import.c
@@ -106,14 +106,13 @@ FifoItem *import_fifo_fetch(ImportJob *job, ID id, int worker)
} else {
return NULL;
}
- if (fi->entry) {
+ if (fi->entry && fi->bad && (FIFOITEM_BAD == fi->bad)) {
+ fi->bad = FIFOITEM_BAD_PRINTED;
if (worker) {
- if (fi->bad) {
- import_log_notice(job, "WARNING: bad entry: ID %d", id);
- return NULL;
- }
- PR_ASSERT(fi->entry->ep_refcnt > 0);
+ import_log_notice(job, "WARNING: bad entry: ID %d", id);
+ return NULL;
}
+ PR_ASSERT(fi->entry->ep_refcnt > 0);
}
return fi;
}
diff --git a/ldap/servers/slapd/back-ldbm/import.h b/ldap/servers/slapd/back-ldbm/import.h
index bef5fa0..c9a3f8a 100644
--- a/ldap/servers/slapd/back-ldbm/import.h
+++ b/ldap/servers/slapd/back-ldbm/import.h
@@ -83,12 +83,15 @@ struct _import_index_info
/* item on the entry FIFO */
typedef struct {
struct backentry *entry;
- char *filename; /* or NULL */
- int line; /* filename/line are used to report errors */
- int bad; /* foreman did not like the entry */
- size_t esize; /* entry size */
+ char *filename; /* or NULL */
+ int line; /* filename/line are used to report errors */
+ int bad; /* foreman did not like the entry */
+ size_t esize; /* entry size */
} FifoItem;
+#define FIFOITEM_BAD 1
+#define FIFOITEM_BAD_PRINTED 2
+
typedef struct {
FifoItem *item;
size_t size; /* Queue size in entries (computed in import_fifo_init). */
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_add.c b/ldap/servers/slapd/back-ldbm/ldbm_add.c
index 748ef26..d29ff5f 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_add.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c
@@ -176,8 +176,7 @@ ldbm_back_add( Slapi_PBlock *pb )
}
- if (!is_tombstone_operation && !is_resurect_operation)
- {
+ if (!is_tombstone_operation) {
rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_DN_ENTRY);
}
rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_UNIQUEID_ENTRY);
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
index a0aaa80..2a7b1e4 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c
@@ -1584,8 +1584,7 @@ retry_get:
slapi_ch_free(&ptr);
}
bail:
- slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG,
- "<-- _entryrdn_get_elem\n");
+ slapi_log_error(SLAPI_LOG_TRACE, ENTRYRDN_TAG, "<-- _entryrdn_get_elem\n");
return rc;
}
@@ -2231,6 +2230,12 @@ _entryrdn_insert_key(backend *be,
/* Check the direct child in the RDN array, first */
rdnidx = slapi_rdn_get_prev_ext(srdn, rdnidx,
&childnrdn, FLAG_ALL_NRDNS);
+ if ((rdnidx < 0) || (NULL == childnrdn)) {
+ slapi_log_error(SLAPI_LOG_FATAL, ENTRYRDN_TAG,
+ "_entryrdn_insert_key: RDN list \"%s\" is broken: "
+ "idx(%d)\n", slapi_rdn_get_rdn(srdn), rdnidx);
+ goto bail;
+ }
/* Generate a key for child tree */
/* E.g., C1 */
keybuf = slapi_ch_smprintf("%c%u", RDN_INDEX_CHILD, workid);
@@ -2298,7 +2303,7 @@ _entryrdn_insert_key(backend *be,
*/
rc = _entryrdn_get_tombstone_elem(cursor, tmpsrdn, &key,
childnrdn, &tmpelem);
- if (rc || (NULL == tmpelem)) {
+ if (rc) {
char *dn = NULL;
slapi_rdn_get_dn(tmpsrdn, &dn);
if (DB_NOTFOUND == rc) {
@@ -2312,24 +2317,16 @@ _entryrdn_insert_key(backend *be,
}
slapi_ch_free_string(&dn);
goto bail;
- } else {
- int tmpidx = slapi_rdn_get_prev_ext(srdn, rdnidx,
- &childnrdn, FLAG_ALL_NRDNS);
- if (childnrdn &&
- (0 == strncasecmp(childnrdn, SLAPI_ATTR_UNIQUEID,
- sizeof(SLAPI_ATTR_UNIQUEID) - 1))) {
- rdnidx = tmpidx;
- }
}
/* Node is a tombstone. */
- slapi_ch_free((void **)&elem);
- elem = tmpelem;
- currid = id_stored_to_internal(elem->rdn_elem_id);
- nrdn = childnrdn;
- workid = currid;
- slapi_ch_free((void **)&parentelem);
- parentelem = elem;
- elem = NULL;
+ if (tmpelem) {
+ currid = id_stored_to_internal(tmpelem->rdn_elem_id);
+ nrdn = childnrdn;
+ workid = currid;
+ slapi_ch_free((void **)&parentelem);
+ parentelem = tmpelem;
+ slapi_ch_free((void **)&elem);
+ }
}
} else {
char *dn = NULL;
@@ -2823,14 +2820,6 @@ _entryrdn_index_read(backend *be,
slapi_rdn_free(&tmpsrdn);
}
goto bail;
- } else {
- int tmpidx = slapi_rdn_get_prev_ext(srdn, rdnidx,
- &childnrdn, FLAG_ALL_NRDNS);
- if (childnrdn &&
- (0 == strncasecmp(childnrdn, SLAPI_ATTR_UNIQUEID,
- sizeof(SLAPI_ATTR_UNIQUEID) - 1))) {
- rdnidx = tmpidx;
- }
}
} else {
slapi_ch_free((void **)&tmpelem);
diff --git a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
index 1e28070..77f7cc9 100644
--- a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
+++ b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
@@ -256,7 +256,9 @@ int add_op_attrs(Slapi_PBlock *pb, struct ldbminfo *li, struct backentry *ep,
* If so, need to get the grandparent of the leaf.
*/
if (slapi_entry_flag_is_set(ep->ep_entry,
- SLAPI_ENTRY_FLAG_TOMBSTONE)) {
+ SLAPI_ENTRY_FLAG_TOMBSTONE) &&
+ (0 == strncasecmp(pdn, SLAPI_ATTR_UNIQUEID,
+ sizeof(SLAPI_ATTR_UNIQUEID) - 1))) {
char *ppdn = slapi_dn_parent(pdn);
slapi_ch_free_string(&pdn);
if (NULL == ppdn) {
12 years, 2 months
5 commits - ldap/servers
by Richard Allen Megginson
ldap/servers/plugins/acctpolicy/acct_plugin.c | 19 -
ldap/servers/plugins/acctpolicy/acct_util.c | 6
ldap/servers/plugins/acctpolicy/acctpolicy.h | 2
ldap/servers/plugins/automember/automember.c | 59 ++---
ldap/servers/plugins/deref/deref.c | 4
ldap/servers/plugins/dna/dna.c | 147 ++++++-------
ldap/servers/plugins/linkedattrs/fixup_task.c | 56 +----
ldap/servers/plugins/linkedattrs/linked_attrs.c | 81 +++----
ldap/servers/plugins/linkedattrs/linked_attrs.h | 1
ldap/servers/plugins/memberof/memberof.c | 251 +++++++++--------------
ldap/servers/plugins/mep/mep.c | 99 +++------
ldap/servers/plugins/referint/referint.c | 99 +++------
ldap/servers/plugins/replication/urp.c | 60 ++---
ldap/servers/plugins/replication/urp.h | 10
ldap/servers/plugins/replication/urp_glue.c | 12 -
ldap/servers/plugins/replication/urp_tombstone.c | 14 -
ldap/servers/plugins/retrocl/retrocl_po.c | 4
ldap/servers/plugins/uiduniq/plugin-utils.h | 6
ldap/servers/plugins/uiduniq/uid.c | 43 +--
ldap/servers/plugins/uiduniq/utils.c | 29 +-
ldap/servers/slapd/add.c | 38 ---
ldap/servers/slapd/modify.c | 24 --
ldap/servers/slapd/modrdn.c | 10
ldap/servers/slapd/passwd_extop.c | 4
ldap/servers/slapd/pblock.c | 49 ----
ldap/servers/slapd/plugin_internal_op.c | 14 -
ldap/servers/slapd/proto-slap.h | 2
ldap/servers/slapd/pw.c | 11 -
ldap/servers/slapd/pw_mgmt.c | 16 -
ldap/servers/slapd/pw_retry.c | 26 --
ldap/servers/slapd/slapi-plugin.h | 16 -
31 files changed, 436 insertions(+), 776 deletions(-)
New commits:
commit 85d44fc98a0b24b59d7e9524aef3c536f9a78879
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Thu Feb 16 17:22:56 2012 -0700
Revert "pass the plugin config entry to the plugin init function"
This reverts commit b6d3ba77683722ed8b88994a637ba64fa18e57a1.
Reverts only the txn code
diff --git a/ldap/servers/slapd/plugin_internal_op.c b/ldap/servers/slapd/plugin_internal_op.c
index 1ac2447..cf65c2c 100644
--- a/ldap/servers/slapd/plugin_internal_op.c
+++ b/ldap/servers/slapd/plugin_internal_op.c
@@ -912,7 +912,7 @@ void set_common_params (Slapi_PBlock *pb)
* copy of the entry, NULL can be passed for ret_entry.
*/
int
-slapi_search_internal_get_entry_ext( Slapi_DN *dn, char ** attrs, Slapi_Entry **ret_entry , void * component_identity, void *txn )
+slapi_search_internal_get_entry( Slapi_DN *dn, char ** attrs, Slapi_Entry **ret_entry , void * component_identity)
{
Slapi_Entry **entries = NULL;
Slapi_PBlock *int_search_pb = NULL;
@@ -928,7 +928,6 @@ slapi_search_internal_get_entry_ext( Slapi_DN *dn, char ** attrs, Slapi_Entry **
0 /* attrsonly */, NULL /* controls */,
NULL /* uniqueid */,
component_identity, 0 /* actions */ );
- slapi_pblock_set( int_search_pb, SLAPI_TXN, txn );
slapi_search_internal_pb ( int_search_pb );
slapi_pblock_get( int_search_pb, SLAPI_PLUGIN_INTOP_RESULT, &rc );
if ( LDAP_SUCCESS == rc ) {
@@ -950,14 +949,3 @@ slapi_search_internal_get_entry_ext( Slapi_DN *dn, char ** attrs, Slapi_Entry **
int_search_pb = NULL;
return rc;
}
-
-/*
- * Given a DN, find an entry by doing an internal search. An LDAP error
- * code is returned. To check if an entry exists without returning a
- * copy of the entry, NULL can be passed for ret_entry.
- */
-int
-slapi_search_internal_get_entry( Slapi_DN *dn, char ** attrs, Slapi_Entry **ret_entry , void * component_identity)
-{
- return slapi_search_internal_get_entry_ext(dn, attrs, ret_entry, component_identity, NULL);
-}
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index 20c7a5c..3444b7e 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -5470,9 +5470,6 @@ void slapi_seq_internal_set_pb(Slapi_PBlock *pb, char *ibase, int type,
*/
int slapi_search_internal_get_entry( Slapi_DN *dn, char ** attrlist,
Slapi_Entry **ret_entry , void *caller_identity);
-/* same as above but can pass in the txn to use */
-int slapi_search_internal_get_entry_ext( Slapi_DN *dn, char ** attrlist,
- Slapi_Entry **ret_entry , void *caller_identity, void *txn );
/*
* interface for registering object extensions.
commit a1201df9ac1a5481efa4f07e55c1da2b3a650e6d
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Thu Feb 16 17:16:11 2012 -0700
Revert "make memberof transaction aware and able to be a betxnpostoperation plugin"
This reverts commit 1d2f5a0c138f560f192be387b37880d7675809ef.
Reverts the SLAPI_TXN stuff but leaves the code that allows memberof to
be either a regular or a betxn plugin.
diff --git a/ldap/servers/plugins/memberof/memberof.c b/ldap/servers/plugins/memberof/memberof.c
index 5100b1a..56e34d4 100644
--- a/ldap/servers/plugins/memberof/memberof.c
+++ b/ldap/servers/plugins/memberof/memberof.c
@@ -92,7 +92,6 @@ typedef struct _memberof_get_groups_data
MemberOfConfig *config;
Slapi_Value *memberdn_val;
Slapi_ValueSet **groupvals;
- void *txn;
} memberof_get_groups_data;
/*** function prototypes ***/
@@ -113,55 +112,55 @@ static int memberof_postop_close(Slapi_PBlock *pb);
static int memberof_oktodo(Slapi_PBlock *pb);
static char *memberof_getdn(Slapi_PBlock *pb);
static int memberof_modop_one(Slapi_PBlock *pb, MemberOfConfig *config, int mod_op,
- char *op_this, char *op_to, void *txn);
+ char *op_this, char *op_to);
static int memberof_modop_one_r(Slapi_PBlock *pb, MemberOfConfig *config, int mod_op,
- char *group_dn, char *op_this, char *op_to, memberofstringll *stack, void *txn);
+ char *group_dn, char *op_this, char *op_to, memberofstringll *stack);
static int memberof_add_one(Slapi_PBlock *pb, MemberOfConfig *config, char *addthis,
- char *addto, void *txn);
+ char *addto);
static int memberof_del_one(Slapi_PBlock *pb, MemberOfConfig *config, char *delthis,
- char *delfrom, void *txn);
+ char *delfrom);
static int memberof_mod_smod_list(Slapi_PBlock *pb, MemberOfConfig *config, int mod,
- char *groupdn, Slapi_Mod *smod, void *txn);
+ char *groupdn, Slapi_Mod *smod);
static int memberof_add_smod_list(Slapi_PBlock *pb, MemberOfConfig *config,
- char *groupdn, Slapi_Mod *smod, void *txn);
+ char *groupdn, Slapi_Mod *smod);
static int memberof_del_smod_list(Slapi_PBlock *pb, MemberOfConfig *config,
- char *groupdn, Slapi_Mod *smod, void *txn);
+ char *groupdn, Slapi_Mod *smod);
static int memberof_mod_attr_list(Slapi_PBlock *pb, MemberOfConfig *config, int mod,
- char *groupdn, Slapi_Attr *attr, void *txn);
+ char *groupdn, Slapi_Attr *attr);
static int memberof_mod_attr_list_r(Slapi_PBlock *pb, MemberOfConfig *config,
- int mod, char *group_dn, char *op_this, Slapi_Attr *attr, memberofstringll *stack, void *txn);
+ int mod, char *group_dn, char *op_this, Slapi_Attr *attr, memberofstringll *stack);
static int memberof_add_attr_list(Slapi_PBlock *pb, MemberOfConfig *config,
- char *groupdn, Slapi_Attr *attr, void *txn);
+ char *groupdn, Slapi_Attr *attr);
static int memberof_del_attr_list(Slapi_PBlock *pb, MemberOfConfig *config,
- char *groupdn, Slapi_Attr *attr, void *txn);
+ char *groupdn, Slapi_Attr *attr);
static int memberof_moddn_attr_list(Slapi_PBlock *pb, MemberOfConfig *config,
- char *pre_dn, char *post_dn, Slapi_Attr *attr, void *txn);
-static int memberof_replace_list(Slapi_PBlock *pb, MemberOfConfig *config, char *group_dn, void *txn);
+ char *pre_dn, char *post_dn, Slapi_Attr *attr);
+static int memberof_replace_list(Slapi_PBlock *pb, MemberOfConfig *config, char *group_dn);
static void memberof_set_plugin_id(void * plugin_id);
static void *memberof_get_plugin_id();
static int memberof_compare(MemberOfConfig *config, const void *a, const void *b);
static int memberof_qsort_compare(const void *a, const void *b);
static void memberof_load_array(Slapi_Value **array, Slapi_Attr *attr);
-static void memberof_del_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config, char *dn, void *txn);
+static void memberof_del_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config, char *dn);
static int memberof_call_foreach_dn(Slapi_PBlock *pb, char *dn,
- char **types, plugin_search_entry_callback callback, void *callback_data, void *txn);
+ char **types, plugin_search_entry_callback callback, void *callback_data);
static int memberof_is_direct_member(MemberOfConfig *config, Slapi_Value *groupdn,
- Slapi_Value *memberdn, void *txn);
+ Slapi_Value *memberdn);
static int memberof_is_grouping_attr(char *type, MemberOfConfig *config);
-static Slapi_ValueSet *memberof_get_groups(MemberOfConfig *config, char *memberdn, void *txn);
+static Slapi_ValueSet *memberof_get_groups(MemberOfConfig *config, char *memberdn);
static int memberof_get_groups_r(MemberOfConfig *config, char *memberdn,
- memberof_get_groups_data *data, void *txn);
+ memberof_get_groups_data *data);
static int memberof_get_groups_callback(Slapi_Entry *e, void *callback_data);
static int memberof_test_membership(Slapi_PBlock *pb, MemberOfConfig *config,
- char *group_dn, void *txn);
+ char *group_dn);
static int memberof_test_membership_callback(Slapi_Entry *e, void *callback_data);
static int memberof_del_dn_type_callback(Slapi_Entry *e, void *callback_data);
static int memberof_replace_dn_type_callback(Slapi_Entry *e, void *callback_data);
static void memberof_replace_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config,
- char *pre_dn, char *post_dn, void *txn);
+ char *pre_dn, char *post_dn);
static int memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
int mod_op, char *group_dn, char *op_this, char *replace_with, char *op_to,
- memberofstringll *stack, void *txn);
+ memberofstringll *stack);
static int memberof_task_add(Slapi_PBlock *pb, Slapi_Entry *e,
Slapi_Entry *eAfter, int *returncode, char *returntext,
void *arg);
@@ -169,7 +168,7 @@ static void memberof_task_destructor(Slapi_Task *task);
static const char *fetch_attr(Slapi_Entry *e, const char *attrname,
const char *default_val);
static void memberof_fixup_task_thread(void *arg);
-static int memberof_fix_memberof(MemberOfConfig *config, char *dn, char *filter_str, void *txn);
+static int memberof_fix_memberof(MemberOfConfig *config, char *dn, char *filter_str);
static int memberof_fix_memberof_callback(Slapi_Entry *e, void *callback_data);
@@ -399,10 +398,8 @@ int memberof_postop_del(Slapi_PBlock *pb)
if(memberof_oktodo(pb) && (normdn = memberof_getdn(pb)))
{
struct slapi_entry *e = NULL;
- void *txn = NULL;
slapi_pblock_get( pb, SLAPI_ENTRY_PRE_OP, &e );
- slapi_pblock_get( pb, SLAPI_TXN, &txn );
/* We need to get the config lock first. Trying to get the
* config lock after we already hold the op lock can cause
@@ -418,7 +415,7 @@ int memberof_postop_del(Slapi_PBlock *pb)
/* remove this DN from the
* membership lists of groups
*/
- memberof_del_dn_from_groups(pb, &configCopy, normdn, txn);
+ memberof_del_dn_from_groups(pb, &configCopy, normdn);
/* is the entry of interest as a group? */
if(e && configCopy.group_filter && !slapi_filter_test_simple(e, configCopy.group_filter))
@@ -431,7 +428,7 @@ int memberof_postop_del(Slapi_PBlock *pb)
{
if (0 == slapi_entry_attr_find(e, configCopy.groupattrs[i], &attr))
{
- memberof_del_attr_list(pb, &configCopy, normdn, attr, txn);
+ memberof_del_attr_list(pb, &configCopy, normdn, attr);
}
}
}
@@ -450,12 +447,11 @@ typedef struct _memberof_del_dn_data
{
char *dn;
char *type;
- void *txn;
} memberof_del_dn_data;
/* Deletes a member dn from all groups that refer to it. */
static void
-memberof_del_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config, char *dn, void *txn)
+memberof_del_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config, char *dn)
{
int i = 0;
char *groupattrs[2] = {0, 0};
@@ -465,12 +461,12 @@ memberof_del_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config, char *dn,
* same grouping attribute. */
for (i = 0; config->groupattrs[i]; i++)
{
- memberof_del_dn_data data = {dn, config->groupattrs[i], txn};
+ memberof_del_dn_data data = {dn, config->groupattrs[i]};
groupattrs[0] = config->groupattrs[i];
memberof_call_foreach_dn(pb, dn, groupattrs,
- memberof_del_dn_type_callback, &data, txn);
+ memberof_del_dn_type_callback, &data);
}
}
@@ -499,7 +495,6 @@ int memberof_del_dn_type_callback(Slapi_Entry *e, void *callback_data)
mods, 0, 0,
memberof_get_plugin_id(), 0);
- slapi_pblock_set(mod_pb, SLAPI_TXN, ((memberof_del_dn_data *)callback_data)->txn);
slapi_modify_internal_pb(mod_pb);
slapi_pblock_get(mod_pb,
@@ -518,7 +513,7 @@ int memberof_del_dn_type_callback(Slapi_Entry *e, void *callback_data)
* case.
*/
int memberof_call_foreach_dn(Slapi_PBlock *pb, char *dn,
- char **types, plugin_search_entry_callback callback, void *callback_data, void *txn)
+ char **types, plugin_search_entry_callback callback, void *callback_data)
{
int rc = 0;
Slapi_PBlock *search_pb = slapi_pblock_new();
@@ -531,7 +526,6 @@ int memberof_call_foreach_dn(Slapi_PBlock *pb, char *dn,
int dn_len = 0;
int i = 0;
- slapi_pblock_set(search_pb, SLAPI_TXN, txn);
/* get the base dn for the backend we are in
(we don't support having members and groups in
different backends - issues with offline / read only backends)
@@ -634,11 +628,9 @@ int memberof_postop_modrdn(Slapi_PBlock *pb)
struct slapi_entry *post_e = NULL;
char *pre_dn = 0;
char *post_dn = 0;
- void *txn = NULL;
slapi_pblock_get( pb, SLAPI_ENTRY_PRE_OP, &pre_e );
slapi_pblock_get( pb, SLAPI_ENTRY_POST_OP, &post_e );
- slapi_pblock_get( pb, SLAPI_TXN, &txn );
if(pre_e && post_e)
{
@@ -667,7 +659,7 @@ int memberof_postop_modrdn(Slapi_PBlock *pb)
{
if(0 == slapi_entry_attr_find(post_e, configCopy.groupattrs[i], &attr))
{
- if(memberof_moddn_attr_list(pb, &configCopy, pre_dn, post_dn, attr, txn) != 0){
+ if(memberof_moddn_attr_list(pb, &configCopy, pre_dn, post_dn, attr) != 0){
break;
}
}
@@ -678,7 +670,7 @@ int memberof_postop_modrdn(Slapi_PBlock *pb)
* of other group entries. We need to update any member
* attributes to refer to the new name. */
if (pre_dn && post_dn) {
- memberof_replace_dn_from_groups(pb, &configCopy, pre_dn, post_dn, txn);
+ memberof_replace_dn_from_groups(pb, &configCopy, pre_dn, post_dn);
}
memberof_unlock();
@@ -696,7 +688,6 @@ typedef struct _replace_dn_data
char *pre_dn;
char *post_dn;
char *type;
- void *txn;
} replace_dn_data;
@@ -704,7 +695,7 @@ typedef struct _replace_dn_data
* to use post_dn instead. */
static void
memberof_replace_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config,
- char *pre_dn, char *post_dn, void *txn)
+ char *pre_dn, char *post_dn)
{
int i = 0;
char *groupattrs[2] = {0, 0};
@@ -714,12 +705,12 @@ memberof_replace_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config,
* using the same grouping attribute. */
for (i = 0; config->groupattrs[i]; i++)
{
- replace_dn_data data = {pre_dn, post_dn, config->groupattrs[i], txn};
+ replace_dn_data data = {pre_dn, post_dn, config->groupattrs[i]};
groupattrs[0] = config->groupattrs[i];
memberof_call_foreach_dn(pb, pre_dn, groupattrs,
- memberof_replace_dn_type_callback, &data, txn);
+ memberof_replace_dn_type_callback, &data);
}
}
@@ -759,7 +750,6 @@ int memberof_replace_dn_type_callback(Slapi_Entry *e, void *callback_data)
mods, 0, 0,
memberof_get_plugin_id(), 0);
- slapi_pblock_set(mod_pb, SLAPI_TXN, ((replace_dn_data *)callback_data)->txn);
slapi_modify_internal_pb(mod_pb);
slapi_pblock_get(mod_pb,
@@ -812,9 +802,7 @@ int memberof_postop_modify(Slapi_PBlock *pb)
int config_copied = 0;
MemberOfConfig *mainConfig = 0;
MemberOfConfig configCopy = {0, 0, 0, 0};
- void *txn = NULL;
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
/* get the mod set */
slapi_pblock_get(pb, SLAPI_MODIFY_MODS, &mods);
smods = slapi_mods_new();
@@ -865,7 +853,7 @@ int memberof_postop_modify(Slapi_PBlock *pb)
case LDAP_MOD_ADD:
{
/* add group DN to targets */
- memberof_add_smod_list(pb, &configCopy, normdn, smod, txn);
+ memberof_add_smod_list(pb, &configCopy, normdn, smod);
break;
}
@@ -877,12 +865,12 @@ int memberof_postop_modify(Slapi_PBlock *pb)
* entry, which the replace code deals with. */
if (slapi_mod_get_num_values(smod) == 0)
{
- memberof_replace_list(pb, &configCopy, normdn, txn);
+ memberof_replace_list(pb, &configCopy, normdn);
}
else
{
/* remove group DN from target values in smod*/
- memberof_del_smod_list(pb, &configCopy, normdn, smod, txn);
+ memberof_del_smod_list(pb, &configCopy, normdn, smod);
}
break;
}
@@ -890,7 +878,7 @@ int memberof_postop_modify(Slapi_PBlock *pb)
case LDAP_MOD_REPLACE:
{
/* replace current values */
- memberof_replace_list(pb, &configCopy, normdn, txn);
+ memberof_replace_list(pb, &configCopy, normdn);
break;
}
@@ -955,10 +943,9 @@ int memberof_postop_add(Slapi_PBlock *pb)
MemberOfConfig *mainConfig = 0;
MemberOfConfig configCopy = {0, 0, 0, 0};
struct slapi_entry *e = NULL;
- void *txn = NULL;
slapi_pblock_get( pb, SLAPI_ENTRY_POST_OP, &e );
- slapi_pblock_get( pb, SLAPI_TXN, &txn );
+
/* is the entry of interest? */
memberof_rlock_config();
@@ -983,7 +970,7 @@ int memberof_postop_add(Slapi_PBlock *pb)
{
if(0 == slapi_entry_attr_find(e, configCopy.groupattrs[i], &attr))
{
- memberof_add_attr_list(pb, &configCopy, normdn, attr, txn);
+ memberof_add_attr_list(pb, &configCopy, normdn, attr);
}
}
@@ -1073,9 +1060,9 @@ char *memberof_getdn(Slapi_PBlock *pb)
* Also, we must not delete entries that are a member of the group
*/
int memberof_modop_one(Slapi_PBlock *pb, MemberOfConfig *config, int mod_op,
- char *op_this, char *op_to, void *txn)
+ char *op_this, char *op_to)
{
- return memberof_modop_one_r(pb, config, mod_op, op_this, op_this, op_to, 0, txn);
+ return memberof_modop_one_r(pb, config, mod_op, op_this, op_this, op_to, 0);
}
/* memberof_modop_one_r()
@@ -1084,24 +1071,19 @@ int memberof_modop_one(Slapi_PBlock *pb, MemberOfConfig *config, int mod_op,
*/
int memberof_modop_one_r(Slapi_PBlock *pb, MemberOfConfig *config, int mod_op,
- char *group_dn, char *op_this, char *op_to, memberofstringll *stack, void *txn)
+ char *group_dn, char *op_this, char *op_to, memberofstringll *stack)
{
return memberof_modop_one_replace_r(
- pb, config, mod_op, group_dn, op_this, 0, op_to, stack, txn);
+ pb, config, mod_op, group_dn, op_this, 0, op_to, stack);
}
-struct fix_memberof_callback_data {
- MemberOfConfig *config;
- void *txn;
-};
-
/* memberof_modop_one_replace_r()
*
* recursive function to perform above (with added replace arg)
*/
int memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
int mod_op, char *group_dn, char *op_this, char *replace_with,
- char *op_to, memberofstringll *stack, void *txn)
+ char *op_to, memberofstringll *stack)
{
int rc = 0;
LDAPMod mod;
@@ -1125,8 +1107,8 @@ int memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
/* determine if this is a group op or single entry */
op_to_sdn = slapi_sdn_new_normdn_byref(op_to);
- slapi_search_internal_get_entry_ext( op_to_sdn, config->groupattrs,
- &e, memberof_get_plugin_id(), txn);
+ slapi_search_internal_get_entry( op_to_sdn, config->groupattrs,
+ &e, memberof_get_plugin_id());
if(!e)
{
/* In the case of a delete, we need to worry about the
@@ -1165,7 +1147,6 @@ int memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
slapi_search_internal_set_pb(search_pb, slapi_sdn_get_dn(base_sdn),
LDAP_SCOPE_SUBTREE, filter_str, 0, 0, 0, 0,
memberof_get_plugin_id(), 0);
- slapi_pblock_set(search_pb, SLAPI_TXN, txn);
if (slapi_search_internal_pb(search_pb))
{
@@ -1185,7 +1166,7 @@ int memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
* entry. This will fix the references to
* the missing group as well as the group
* represented by op_this. */
- memberof_test_membership(pb, config, op_to, txn);
+ memberof_test_membership(pb, config, op_to);
}
}
@@ -1268,7 +1249,7 @@ int memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
slapi_entry_attr_find( e, config->groupattrs[i], &members );
if(members)
{
- if(memberof_mod_attr_list_r(pb, config, mod_op, group_dn, op_this, members, ll, txn) != 0){
+ if(memberof_mod_attr_list_r(pb, config, mod_op, group_dn, op_this, members, ll) != 0){
rc = -1;
goto bail;
}
@@ -1309,8 +1290,7 @@ int memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
if(LDAP_MOD_DELETE == mod_op || LDAP_MOD_ADD == mod_op)
{
/* find parent groups and replace our member attr */
- struct fix_memberof_callback_data cb_data = {config, txn};
- memberof_fix_memberof_callback(e, &cb_data);
+ memberof_fix_memberof_callback(e, config);
} else {
/* single entry - do mod */
mod_pb = slapi_pblock_new();
@@ -1347,7 +1327,6 @@ int memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
mods, 0, 0,
memberof_get_plugin_id(), 0);
- slapi_pblock_set(mod_pb, SLAPI_TXN, txn);
slapi_modify_internal_pb(mod_pb);
slapi_pblock_get(mod_pb,
@@ -1373,9 +1352,9 @@ bail:
* Add addthis DN to the memberof attribute of addto
*
*/
-int memberof_add_one(Slapi_PBlock *pb, MemberOfConfig *config, char *addthis, char *addto, void *txn)
+int memberof_add_one(Slapi_PBlock *pb, MemberOfConfig *config, char *addthis, char *addto)
{
- return memberof_modop_one(pb, config, LDAP_MOD_ADD, addthis, addto, txn);
+ return memberof_modop_one(pb, config, LDAP_MOD_ADD, addthis, addto);
}
/*
@@ -1384,9 +1363,9 @@ int memberof_add_one(Slapi_PBlock *pb, MemberOfConfig *config, char *addthis, ch
* Delete delthis DN from the memberof attribute of delfrom
*
*/
-int memberof_del_one(Slapi_PBlock *pb, MemberOfConfig *config, char *delthis, char *delfrom, void *txn)
+int memberof_del_one(Slapi_PBlock *pb, MemberOfConfig *config, char *delthis, char *delfrom)
{
- return memberof_modop_one(pb, config, LDAP_MOD_DELETE, delthis, delfrom, txn);
+ return memberof_modop_one(pb, config, LDAP_MOD_DELETE, delthis, delfrom);
}
/*
@@ -1396,7 +1375,7 @@ int memberof_del_one(Slapi_PBlock *pb, MemberOfConfig *config, char *delthis, ch
*
*/
int memberof_mod_smod_list(Slapi_PBlock *pb, MemberOfConfig *config, int mod,
- char *group_dn, Slapi_Mod *smod, void *txn)
+ char *group_dn, Slapi_Mod *smod)
{
int rc = 0;
struct berval *bv = slapi_mod_get_first_value(smod);
@@ -1428,7 +1407,7 @@ int memberof_mod_smod_list(Slapi_PBlock *pb, MemberOfConfig *config, int mod,
strncpy(dn_str, bv->bv_val, (size_t)bv->bv_len);
- memberof_modop_one(pb, config, mod, group_dn, dn_str, txn);
+ memberof_modop_one(pb, config, mod, group_dn, dn_str);
bv = slapi_mod_get_next_value(smod);
}
@@ -1446,9 +1425,9 @@ int memberof_mod_smod_list(Slapi_PBlock *pb, MemberOfConfig *config, int mod,
*
*/
int memberof_add_smod_list(Slapi_PBlock *pb, MemberOfConfig *config,
- char *groupdn, Slapi_Mod *smod, void *txn)
+ char *groupdn, Slapi_Mod *smod)
{
- return memberof_mod_smod_list(pb, config, LDAP_MOD_ADD, groupdn, smod, txn);
+ return memberof_mod_smod_list(pb, config, LDAP_MOD_ADD, groupdn, smod);
}
@@ -1459,9 +1438,9 @@ int memberof_add_smod_list(Slapi_PBlock *pb, MemberOfConfig *config,
*
*/
int memberof_del_smod_list(Slapi_PBlock *pb, MemberOfConfig *config,
- char *groupdn, Slapi_Mod *smod, void *txn)
+ char *groupdn, Slapi_Mod *smod)
{
- return memberof_mod_smod_list(pb, config, LDAP_MOD_DELETE, groupdn, smod, txn);
+ return memberof_mod_smod_list(pb, config, LDAP_MOD_DELETE, groupdn, smod);
}
/**
@@ -1485,13 +1464,13 @@ void * memberof_get_plugin_id()
*
*/
int memberof_mod_attr_list(Slapi_PBlock *pb, MemberOfConfig *config, int mod,
- char *group_dn, Slapi_Attr *attr, void *txn)
+ char *group_dn, Slapi_Attr *attr)
{
- return memberof_mod_attr_list_r(pb, config, mod, group_dn, group_dn, attr, 0, txn);
+ return memberof_mod_attr_list_r(pb, config, mod, group_dn, group_dn, attr, 0);
}
int memberof_mod_attr_list_r(Slapi_PBlock *pb, MemberOfConfig *config, int mod,
- char *group_dn, char *op_this, Slapi_Attr *attr, memberofstringll *stack, void *txn)
+ char *group_dn, char *op_this, Slapi_Attr *attr, memberofstringll *stack)
{
int rc = 0;
Slapi_Value *val = 0;
@@ -1538,11 +1517,11 @@ int memberof_mod_attr_list_r(Slapi_PBlock *pb, MemberOfConfig *config, int mod,
if(mod == LDAP_MOD_REPLACE)
{
memberof_modop_one_replace_r(pb, config, mod, group_dn, op_this,
- group_dn, dn_str, stack, txn);
+ group_dn, dn_str, stack);
}
else
{
- memberof_modop_one_r(pb, config, mod, group_dn, op_this, dn_str, stack, txn);
+ memberof_modop_one_r(pb, config, mod, group_dn, op_this, dn_str, stack);
}
}
@@ -1564,9 +1543,9 @@ int memberof_mod_attr_list_r(Slapi_PBlock *pb, MemberOfConfig *config, int mod,
*
*/
int memberof_add_attr_list(Slapi_PBlock *pb, MemberOfConfig *config, char *groupdn,
- Slapi_Attr *attr, void *txn)
+ Slapi_Attr *attr)
{
- return memberof_mod_attr_list(pb, config, LDAP_MOD_ADD, groupdn, attr, txn);
+ return memberof_mod_attr_list(pb, config, LDAP_MOD_ADD, groupdn, attr);
}
/*
@@ -1576,9 +1555,9 @@ int memberof_add_attr_list(Slapi_PBlock *pb, MemberOfConfig *config, char *group
*
*/
int memberof_del_attr_list(Slapi_PBlock *pb, MemberOfConfig *config, char *groupdn,
- Slapi_Attr *attr, void *txn)
+ Slapi_Attr *attr)
{
- return memberof_mod_attr_list(pb, config, LDAP_MOD_DELETE, groupdn, attr, txn);
+ return memberof_mod_attr_list(pb, config, LDAP_MOD_DELETE, groupdn, attr);
}
/*
@@ -1588,7 +1567,7 @@ int memberof_del_attr_list(Slapi_PBlock *pb, MemberOfConfig *config, char *group
*
*/
int memberof_moddn_attr_list(Slapi_PBlock *pb, MemberOfConfig *config,
- char *pre_dn, char *post_dn, Slapi_Attr *attr, void *txn)
+ char *pre_dn, char *post_dn, Slapi_Attr *attr)
{
int rc = 0;
Slapi_Value *val = 0;
@@ -1623,7 +1602,7 @@ int memberof_moddn_attr_list(Slapi_PBlock *pb, MemberOfConfig *config,
strncpy(dn_str, bv->bv_val, (size_t)bv->bv_len);
memberof_modop_one_replace_r(pb, config, LDAP_MOD_REPLACE,
- post_dn, pre_dn, post_dn, dn_str, 0, txn);
+ post_dn, pre_dn, post_dn, dn_str, 0);
hint = slapi_attr_next_value(attr, hint, &val);
}
@@ -1641,25 +1620,25 @@ int memberof_moddn_attr_list(Slapi_PBlock *pb, MemberOfConfig *config,
* A Slapi_ValueSet* is returned. It is up to the caller to
* free it.
*/
-Slapi_ValueSet *memberof_get_groups(MemberOfConfig *config, char *memberdn, void *txn)
+Slapi_ValueSet *memberof_get_groups(MemberOfConfig *config, char *memberdn)
{
Slapi_Value *memberdn_val = slapi_value_new_string(memberdn);
Slapi_ValueSet *groupvals = slapi_valueset_new();
- memberof_get_groups_data data = {config, memberdn_val, &groupvals, txn};
+ memberof_get_groups_data data = {config, memberdn_val, &groupvals};
- memberof_get_groups_r(config, memberdn, &data, txn);
+ memberof_get_groups_r(config, memberdn, &data);
slapi_value_free(&memberdn_val);
return groupvals;
}
-int memberof_get_groups_r(MemberOfConfig *config, char *memberdn, memberof_get_groups_data *data, void *txn)
+int memberof_get_groups_r(MemberOfConfig *config, char *memberdn, memberof_get_groups_data *data)
{
/* Search for any grouping attributes that point to memberdn.
* For each match, add it to the list, recurse and do same search */
return memberof_call_foreach_dn(NULL, memberdn, config->groupattrs,
- memberof_get_groups_callback, data, txn);
+ memberof_get_groups_callback, data);
}
/* memberof_get_groups_callback()
@@ -1728,7 +1707,7 @@ int memberof_get_groups_callback(Slapi_Entry *e, void *callback_data)
/* now recurse to find parent groups of e */
memberof_get_groups_r(((memberof_get_groups_data*)callback_data)->config,
- group_dn, callback_data, ((memberof_get_groups_data*)callback_data)->txn);
+ group_dn, callback_data);
bail:
return rc;
@@ -1740,7 +1719,7 @@ bail:
* returns non-zero when true, zero otherwise
*/
int memberof_is_direct_member(MemberOfConfig *config, Slapi_Value *groupdn,
- Slapi_Value *memberdn, void *txn)
+ Slapi_Value *memberdn)
{
int rc = 0;
Slapi_DN *sdn = 0;
@@ -1750,8 +1729,8 @@ int memberof_is_direct_member(MemberOfConfig *config, Slapi_Value *groupdn,
sdn = slapi_sdn_new_normdn_byref(slapi_value_get_string(groupdn));
- slapi_search_internal_get_entry_ext(sdn, config->groupattrs,
- &group_e, memberof_get_plugin_id(), txn);
+ slapi_search_internal_get_entry(sdn, config->groupattrs,
+ &group_e, memberof_get_plugin_id());
if(group_e)
{
@@ -1798,11 +1777,6 @@ static int memberof_is_grouping_attr(char *type, MemberOfConfig *config)
return match;
}
-struct test_membership_cb_data {
- MemberOfConfig *config;
- void *txn;
-};
-
/* memberof_test_membership()
*
* Finds all entries who are a "memberOf" the group
@@ -1818,13 +1792,12 @@ struct test_membership_cb_data {
* iterate until a pass fails to move a group over to member groups
* remaining groups should be deleted
*/
-int memberof_test_membership(Slapi_PBlock *pb, MemberOfConfig *config, char *group_dn, void *txn)
+int memberof_test_membership(Slapi_PBlock *pb, MemberOfConfig *config, char *group_dn)
{
char *attrs[2] = {config->memberof_attr, 0};
- struct test_membership_cb_data cb_data = {config, txn};
return memberof_call_foreach_dn(pb, group_dn, attrs,
- memberof_test_membership_callback , &cb_data, txn);
+ memberof_test_membership_callback , config);
}
/*
@@ -1842,8 +1815,7 @@ int memberof_test_membership_callback(Slapi_Entry *e, void *callback_data)
Slapi_Value **member_array = 0;
Slapi_Value **candidate_array = 0;
Slapi_Value *entry_dn = 0;
- struct test_membership_cb_data *cb_data = (struct test_membership_cb_data *)callback_data;
- MemberOfConfig *config = cb_data->config;
+ MemberOfConfig *config = (MemberOfConfig *)callback_data;
entry_dn = slapi_value_new_string(slapi_entry_get_dn(e));
@@ -1880,7 +1852,7 @@ int memberof_test_membership_callback(Slapi_Entry *e, void *callback_data)
while(val)
{
/* test for direct membership */
- if(memberof_is_direct_member(config, val, entry_dn, cb_data->txn))
+ if(memberof_is_direct_member(config, val, entry_dn))
{
/* it is a member */
member_array[m_index] = val;
@@ -1929,7 +1901,7 @@ int memberof_test_membership_callback(Slapi_Entry *e, void *callback_data)
if(memberof_is_direct_member(
config,
candidate_array[inner_index],
- member_array[outer_index], cb_data->txn))
+ member_array[outer_index]))
{
member_array[m_index] =
candidate_array
@@ -1969,7 +1941,7 @@ int memberof_test_membership_callback(Slapi_Entry *e, void *callback_data)
0, config,
(char*)slapi_value_get_string(
candidate_array[outer_index]),
- (char*)slapi_value_get_string(entry_dn), cb_data->txn);
+ (char*)slapi_value_get_string(entry_dn));
outer_index++;
}
@@ -2001,7 +1973,7 @@ bail:
* Perform replace the group DN list in the memberof attribute of the list of targets
*
*/
-int memberof_replace_list(Slapi_PBlock *pb, MemberOfConfig *config, char *group_dn, void *txn)
+int memberof_replace_list(Slapi_PBlock *pb, MemberOfConfig *config, char *group_dn)
{
struct slapi_entry *pre_e = NULL;
struct slapi_entry *post_e = NULL;
@@ -2091,7 +2063,7 @@ int memberof_replace_list(Slapi_PBlock *pb, MemberOfConfig *config, char *group_
pb, config,
group_dn,
(char*)slapi_value_get_string(
- post_array[post_index]), txn);
+ post_array[post_index]));
post_index++;
}
@@ -2102,7 +2074,7 @@ int memberof_replace_list(Slapi_PBlock *pb, MemberOfConfig *config, char *group_
pb, config,
group_dn,
(char*)slapi_value_get_string(
- pre_array[pre_index]), txn);
+ pre_array[pre_index]));
pre_index++;
}
@@ -2121,7 +2093,7 @@ int memberof_replace_list(Slapi_PBlock *pb, MemberOfConfig *config, char *group_
pb, config,
group_dn,
(char*)slapi_value_get_string(
- pre_array[pre_index]), txn);
+ pre_array[pre_index]));
pre_index++;
}
@@ -2132,7 +2104,7 @@ int memberof_replace_list(Slapi_PBlock *pb, MemberOfConfig *config, char *group_
pb, config,
group_dn,
(char*)slapi_value_get_string(
- post_array[post_index]), txn);
+ post_array[post_index]));
post_index++;
}
@@ -2252,7 +2224,7 @@ void memberof_fixup_task_thread(void *arg)
memberof_lock();
/* do real work */
- rc = memberof_fix_memberof(&configCopy, td->dn, td->filter_str, NULL /* no txn? */);
+ rc = memberof_fix_memberof(&configCopy, td->dn, td->filter_str);
/* release the memberOf operation lock */
memberof_unlock();
@@ -2372,10 +2344,9 @@ memberof_task_destructor(Slapi_Task *task)
}
}
-int memberof_fix_memberof(MemberOfConfig *config, char *dn, char *filter_str, void *txn)
+int memberof_fix_memberof(MemberOfConfig *config, char *dn, char *filter_str)
{
int rc = 0;
- struct fix_memberof_callback_data cb_data = {config, txn};
Slapi_PBlock *search_pb = slapi_pblock_new();
slapi_search_internal_set_pb(search_pb, dn,
@@ -2384,9 +2355,8 @@ int memberof_fix_memberof(MemberOfConfig *config, char *dn, char *filter_str, vo
memberof_get_plugin_id(),
0);
- slapi_pblock_set(search_pb, SLAPI_TXN, txn);
rc = slapi_search_internal_callback_pb(search_pb,
- &cb_data,
+ config,
0, memberof_fix_memberof_callback,
0);
@@ -2407,13 +2377,12 @@ int memberof_fix_memberof_callback(Slapi_Entry *e, void *callback_data)
int rc = 0;
char *dn = slapi_entry_get_dn(e);
Slapi_DN *sdn = slapi_entry_get_sdn(e);
- struct fix_memberof_callback_data *cb_data = (struct fix_memberof_callback_data *)callback_data;
- MemberOfConfig *config = cb_data->config;
- memberof_del_dn_data del_data = {0, config->memberof_attr, cb_data->txn};
+ MemberOfConfig *config = (MemberOfConfig *)callback_data;
+ memberof_del_dn_data del_data = {0, config->memberof_attr};
Slapi_ValueSet *groups = 0;
/* get a list of all of the groups this user belongs to */
- groups = memberof_get_groups(config, dn, cb_data->txn);
+ groups = memberof_get_groups(config, dn);
/* If we found some groups, replace the existing memberOf attribute
* with the found values. */
@@ -2446,7 +2415,6 @@ int memberof_fix_memberof_callback(Slapi_Entry *e, void *callback_data)
mod_pb, sdn, mods, 0, 0,
memberof_get_plugin_id(), 0);
- slapi_pblock_set(mod_pb, SLAPI_TXN, cb_data->txn);
slapi_modify_internal_pb(mod_pb);
slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
commit 402289642004f6c51b591d9b22bdee33f592240e
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Thu Feb 16 17:08:23 2012 -0700
Revert "Change referential integrity to be a betxnpostoperation plugin"
This reverts commit d316a6717b18cba9826639d82116baa967734f35.
keep the code that allows switching between a regular and a betxn
plugin
diff --git a/ldap/servers/plugins/referint/referint.c b/ldap/servers/plugins/referint/referint.c
index 4606de6..8ece438 100644
--- a/ldap/servers/plugins/referint/referint.c
+++ b/ldap/servers/plugins/referint/referint.c
@@ -77,7 +77,7 @@ int referint_postop_del( Slapi_PBlock *pb );
int referint_postop_modrdn( Slapi_PBlock *pb );
int referint_postop_start( Slapi_PBlock *pb);
int referint_postop_close( Slapi_PBlock *pb);
-int update_integrity(char **argv, Slapi_DN *sDN, char *newrDN, Slapi_DN *newsuperior, int logChanges, void *txn);
+int update_integrity(char **argv, Slapi_DN *sDN, char *newrDN, Slapi_DN *newsuperior, int logChanges);
void referint_thread_func(void *arg);
int GetNextLine(char *dest, int size_dest, PRFileDesc *stream);
void writeintegritylog(char *logfilename, Slapi_DN *sdn, char *newrdn, Slapi_DN *newsuperior, Slapi_DN *requestorsdn);
@@ -165,12 +165,10 @@ referint_postop_del( Slapi_PBlock *pb )
int delay;
int logChanges=0;
int isrepop = 0;
- void *txn = NULL;
if ( slapi_pblock_get( pb, SLAPI_IS_REPLICATED_OPERATION, &isrepop ) != 0 ||
- slapi_pblock_get( pb, SLAPI_DELETE_TARGET_SDN, &sdn ) != 0 ||
- slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0 ||
- slapi_pblock_get(pb, SLAPI_TXN, &txn) != 0)
+ slapi_pblock_get( pb, SLAPI_DELETE_TARGET_SDN, &sdn ) != 0 ||
+ slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0)
{
slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_del: could not get parameters\n" );
@@ -215,7 +213,7 @@ referint_postop_del( Slapi_PBlock *pb )
}else if(delay == 0){
/* no delay */
/* call function to update references to entry */
- rc = update_integrity(argv, sdn, NULL, NULL, logChanges, txn);
+ rc = update_integrity(argv, sdn, NULL, NULL, logChanges);
}else{
/* write the entry to integrity log */
writeintegritylog(argv[1], sdn, NULL, NULL, NULL /* slapi_get_requestor_sdn(pb) */);
@@ -244,14 +242,12 @@ referint_postop_modrdn( Slapi_PBlock *pb )
int delay;
int logChanges=0;
int isrepop = 0;
- void *txn = NULL;
if ( slapi_pblock_get( pb, SLAPI_IS_REPLICATED_OPERATION, &isrepop ) != 0 ||
slapi_pblock_get( pb, SLAPI_MODRDN_TARGET_SDN, &sdn ) != 0 ||
slapi_pblock_get( pb, SLAPI_MODRDN_NEWRDN, &newrdn ) != 0 ||
slapi_pblock_get( pb, SLAPI_MODRDN_NEWSUPERIOR_SDN, &newsuperior ) != 0 ||
- slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0 ||
- slapi_pblock_get(pb, SLAPI_TXN, &txn) != 0) {
+ slapi_pblock_get(pb, SLAPI_PLUGIN_OPRETURN, &oprc) != 0 ){
slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_modrdn: could not get parameters\n" );
@@ -301,7 +297,7 @@ referint_postop_modrdn( Slapi_PBlock *pb )
/* no delay */
/* call function to update references to entry */
rc = update_integrity(argv, sdn, newrdn,
- newsuperior, logChanges, txn);
+ newsuperior, logChanges);
}else{
/* write the entry to integrity log */
writeintegritylog(argv[1], sdn, newrdn, newsuperior, NULL /* slapi_get_requestor_sdn(pb) */);
@@ -332,13 +328,11 @@ int isFatalSearchError(int search_result)
}
static int
-_do_modify(Slapi_PBlock *mod_pb, Slapi_DN *entrySDN, LDAPMod **mods, void *txn)
+_do_modify(Slapi_PBlock *mod_pb, Slapi_DN *entrySDN, LDAPMod **mods)
{
int rc = 0;
slapi_pblock_init(mod_pb);
- /* set the transaction to use */
- slapi_pblock_set(mod_pb, SLAPI_TXN, txn);
/* Use internal operation API */
slapi_modify_internal_set_pb_ext(mod_pb, entrySDN, mods, NULL, NULL,
@@ -359,7 +353,7 @@ _update_one_per_mod(Slapi_DN *entrySDN, /* DN of the searched entry */
const char *origDN, /* original DN that was modified */
char *newRDN, /* new RDN from modrdn */
const char *newsuperior, /* new superior from modrdn */
- Slapi_PBlock *mod_pb, void *txn)
+ Slapi_PBlock *mod_pb)
{
LDAPMod *list_of_mods[3];
char *values_del[2];
@@ -382,7 +376,7 @@ _update_one_per_mod(Slapi_DN *entrySDN, /* DN of the searched entry */
list_of_mods[0] = &attribute1;
/* terminate list of mods. */
list_of_mods[1] = NULL;
- rc = _do_modify(mod_pb, entrySDN, list_of_mods, txn);
+ rc = _do_modify(mod_pb, entrySDN, list_of_mods);
if (rc) {
slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"_update_one_value: entry %s: deleting \"%s: %s\" failed (%d)"
@@ -471,7 +465,7 @@ _update_one_per_mod(Slapi_DN *entrySDN, /* DN of the searched entry */
attribute2.mod_values = values_add;
list_of_mods[1] = &attribute2;
list_of_mods[2] = NULL;
- rc = _do_modify(mod_pb, entrySDN, list_of_mods, txn);
+ rc = _do_modify(mod_pb, entrySDN, list_of_mods);
if (rc) {
slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"_update_one_value: entry %s: replacing \"%s: %s\" "
@@ -501,7 +495,7 @@ _update_one_per_mod(Slapi_DN *entrySDN, /* DN of the searched entry */
attribute2.mod_values = values_add;
list_of_mods[1] = &attribute2;
list_of_mods[2] = NULL;
- rc = _do_modify(mod_pb, entrySDN, list_of_mods, txn);
+ rc = _do_modify(mod_pb, entrySDN, list_of_mods);
if (rc) {
slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"_update_one_value: entry %s: replacing \"%s: %s\" "
@@ -535,7 +529,7 @@ _update_all_per_mod(Slapi_DN *entrySDN, /* DN of the searched entry */
const char *origDN, /* original DN that was modified */
char *newRDN, /* new RDN from modrdn */
const char *newsuperior, /* new superior from modrdn */
- Slapi_PBlock *mod_pb, void *txn)
+ Slapi_PBlock *mod_pb)
{
Slapi_Mods *smods = NULL;
char *newDN = NULL;
@@ -562,7 +556,7 @@ _update_all_per_mod(Slapi_DN *entrySDN, /* DN of the searched entry */
mods[0] = &attribute1;
/* terminate list of mods. */
mods[1] = NULL;
- rc = _do_modify(mod_pb, entrySDN, mods, txn);
+ rc = _do_modify(mod_pb, entrySDN, mods);
if (rc) {
slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"_update_all_per_mod: entry %s: deleting \"%s: %s\" failed (%d)"
@@ -654,7 +648,7 @@ _update_all_per_mod(Slapi_DN *entrySDN, /* DN of the searched entry */
/* else: value does not include the modified DN. Ignore it. */
slapi_ch_free_string(&sval);
}
- rc = _do_modify(mod_pb, entrySDN, slapi_mods_get_ldapmods_byref(smods), txn);
+ rc = _do_modify(mod_pb, entrySDN, slapi_mods_get_ldapmods_byref(smods));
if (rc) {
slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"_update_all_per_mod: entry %s failed (%d)\n",
@@ -676,7 +670,7 @@ bail:
int
update_integrity(char **argv, Slapi_DN *origSDN,
char *newrDN, Slapi_DN *newsuperior,
- int logChanges, void *txn)
+ int logChanges)
{
Slapi_PBlock *search_result_pb = NULL;
Slapi_PBlock *mod_pb = slapi_pblock_new();
@@ -697,7 +691,7 @@ update_integrity(char **argv, Slapi_DN *origSDN,
rc = -1;
goto free_and_return;
}
-
+
/* for now, just putting attributes to keep integrity on in conf file,
until resolve the other timing mode issue */
search_result_pb = slapi_pblock_new();
@@ -721,8 +715,6 @@ update_integrity(char **argv, Slapi_DN *origSDN,
/* Use new search API */
slapi_pblock_init(search_result_pb);
- /* set the parent txn for the search ops */
- slapi_pblock_set(search_result_pb, SLAPI_TXN, txn);
slapi_search_internal_set_pb(search_result_pb, search_base,
LDAP_SCOPE_SUBTREE, filter, attrs, 0 /* attrs only */,
NULL, NULL, referint_plugin_identity, 0);
@@ -774,13 +766,13 @@ update_integrity(char **argv, Slapi_DN *origSDN,
slapi_entry_get_sdn(search_entries[j]),
attr, attrName, origDN, newrDN,
slapi_sdn_get_dn(newsuperior),
- mod_pb, txn);
+ mod_pb);
} else {
rc = _update_all_per_mod(
slapi_entry_get_sdn(search_entries[j]),
attr, attrName, origDN, newrDN,
slapi_sdn_get_dn(newsuperior),
- mod_pb, txn);
+ mod_pb);
}
/* Should we stop if one modify returns an error? */
}
@@ -988,7 +980,7 @@ referint_thread_func(void *arg)
}
update_integrity(plugin_argv, sdn, tmprdn,
- tmpsuperior, logChanges, NULL);
+ tmpsuperior, logChanges);
slapi_sdn_free(&sdn);
slapi_ch_free_string(&tmprdn);
commit dc9bfe9ffa73c85143a07927c74c933a1a62da45
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Thu Feb 16 12:51:23 2012 -0700
Revert "Ticket #167 - Mixing transaction and non-transaction plugins can cause deadlock"
This reverts commit 77fdecc3a2bf6d9ce8e545ba0746f619fb14ce84
This is a partial revert. We still want to keep the code in the plugins
that allows them to be either a regular plugin or a betxn plugin. All
of the code that dealt with SLAPI_TXN and making sure all internal
operations had SLAPI_TXN set is gone. We will
come up with a new mechanism for keeping track of the original requestor
DN, most likely a scheme using Thread Local Storage (TLS).
diff --git a/ldap/servers/plugins/acctpolicy/acct_plugin.c b/ldap/servers/plugins/acctpolicy/acct_plugin.c
index 5eb3d06..508fb23 100644
--- a/ldap/servers/plugins/acctpolicy/acct_plugin.c
+++ b/ldap/servers/plugins/acctpolicy/acct_plugin.c
@@ -90,7 +90,7 @@ done:
with the current time.
*/
static int
-acct_record_login( const char *dn, void *txn )
+acct_record_login( const char *dn )
{
int ldrc;
int rc = 0; /* Optimistic default */
@@ -126,7 +126,6 @@ acct_record_login( const char *dn, void *txn )
slapi_modify_internal_set_pb( modpb, dn, mods, NULL, NULL,
plugin_id, SLAPI_OP_FLAG_NO_ACCESS_CHECK |
SLAPI_OP_FLAG_BYPASS_REFERRALS );
- slapi_pblock_set( modpb, SLAPI_TXN, txn );
slapi_pblock_set( modpb, SLAPI_SKIP_MODIFIED_ATTRS, &skip_mod_attrs );
slapi_modify_internal_pb( modpb );
@@ -163,7 +162,6 @@ acct_bind_preop( Slapi_PBlock *pb )
int ldrc;
acctPolicy *policy = NULL;
void *plugin_id;
- void *txn = NULL;
slapi_log_error( SLAPI_LOG_PLUGIN, PRE_PLUGIN_NAME,
"=> acct_bind_preop\n" );
@@ -184,9 +182,8 @@ acct_bind_preop( Slapi_PBlock *pb )
goto done;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
- ldrc = slapi_search_internal_get_entry_ext( sdn, NULL, &target_entry,
- plugin_id, txn );
+ ldrc = slapi_search_internal_get_entry( sdn, NULL, &target_entry,
+ plugin_id );
/* There was a problem retrieving the entry */
if( ldrc != LDAP_SUCCESS ) {
@@ -199,7 +196,7 @@ acct_bind_preop( Slapi_PBlock *pb )
goto done;
}
- if( get_acctpolicy( pb, target_entry, plugin_id, &policy, txn ) ) {
+ if( get_acctpolicy( pb, target_entry, plugin_id, &policy ) ) {
slapi_log_error( SLAPI_LOG_FATAL, PRE_PLUGIN_NAME,
"Account Policy object for \"%s\" is missing\n", dn );
rc = -1;
@@ -249,7 +246,6 @@ acct_bind_postop( Slapi_PBlock *pb )
Slapi_Entry *target_entry = NULL;
acctPluginCfg *cfg;
void *plugin_id;
- void *txn = NULL;
slapi_log_error( SLAPI_LOG_PLUGIN, POST_PLUGIN_NAME,
"=> acct_bind_postop\n" );
@@ -269,7 +265,6 @@ acct_bind_postop( Slapi_PBlock *pb )
goto done;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
cfg = get_config();
tracklogin = cfg->always_record_login;
@@ -277,8 +272,8 @@ acct_bind_postop( Slapi_PBlock *pb )
covered by an account policy to decide whether we should track */
if( tracklogin == 0 ) {
sdn = slapi_sdn_new_normdn_byref( dn );
- ldrc = slapi_search_internal_get_entry_ext( sdn, NULL, &target_entry,
- plugin_id, txn );
+ ldrc = slapi_search_internal_get_entry( sdn, NULL, &target_entry,
+ plugin_id );
if( ldrc != LDAP_SUCCESS ) {
slapi_log_error( SLAPI_LOG_FATAL, POST_PLUGIN_NAME,
@@ -295,7 +290,7 @@ acct_bind_postop( Slapi_PBlock *pb )
}
if( tracklogin ) {
- rc = acct_record_login( dn, txn );
+ rc = acct_record_login( dn );
}
/* ...Any additional account policy postops go here... */
diff --git a/ldap/servers/plugins/acctpolicy/acct_util.c b/ldap/servers/plugins/acctpolicy/acct_util.c
index c421746..8e220c3 100644
--- a/ldap/servers/plugins/acctpolicy/acct_util.c
+++ b/ldap/servers/plugins/acctpolicy/acct_util.c
@@ -78,7 +78,7 @@ get_attr_string_val( Slapi_Entry* target_entry, char* attr_name ) {
*/
int
get_acctpolicy( Slapi_PBlock *pb, Slapi_Entry *target_entry, void *plugin_id,
- acctPolicy **policy, void *txn ) {
+ acctPolicy **policy ) {
Slapi_DN *sdn = NULL;
Slapi_Entry *policy_entry = NULL;
Slapi_Attr *attr;
@@ -114,8 +114,8 @@ get_acctpolicy( Slapi_PBlock *pb, Slapi_Entry *target_entry, void *plugin_id,
}
sdn = slapi_sdn_new_dn_byref( policy_dn );
- ldrc = slapi_search_internal_get_entry_ext( sdn, NULL, &policy_entry,
- plugin_id, txn );
+ ldrc = slapi_search_internal_get_entry( sdn, NULL, &policy_entry,
+ plugin_id );
slapi_sdn_free( &sdn );
/* There should be a policy but it can't be retrieved; fatal error */
diff --git a/ldap/servers/plugins/acctpolicy/acctpolicy.h b/ldap/servers/plugins/acctpolicy/acctpolicy.h
index 0064009..e6f1497 100644
--- a/ldap/servers/plugins/acctpolicy/acctpolicy.h
+++ b/ldap/servers/plugins/acctpolicy/acctpolicy.h
@@ -65,7 +65,7 @@ typedef struct accountpolicy {
/* acct_util.c */
int get_acctpolicy( Slapi_PBlock *pb, Slapi_Entry *target_entry,
- void *plugin_id, acctPolicy **policy, void *txn );
+ void *plugin_id, acctPolicy **policy );
void free_acctpolicy( acctPolicy **policy );
int has_attr( Slapi_Entry* target_entry, char* attr_name,
char** val );
diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c
index 92d5ae6..9dcc65a 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -84,9 +84,9 @@ static int automember_add_pre_op(Slapi_PBlock *pb);
/*
* Config cache management functions
*/
-static int automember_load_config(Slapi_PBlock *pb);
+static int automember_load_config();
static void automember_delete_config();
-static int automember_parse_config_entry(Slapi_Entry * e, int apply, Slapi_PBlock *pb);
+static int automember_parse_config_entry(Slapi_Entry * e, int apply);
static void automember_free_config_entry(struct configEntry ** entry);
/*
@@ -103,9 +103,9 @@ static struct automemberRegexRule *automember_parse_regex_rule(char *rule_string
static void automember_free_regex_rule(struct automemberRegexRule *rule);
static int automember_parse_grouping_attr(char *value, char **grouping_attr,
char **grouping_value);
-static void automember_update_membership(struct configEntry *config, Slapi_Entry *e, void *txn);
+static void automember_update_membership(struct configEntry *config, Slapi_Entry *e);
static void automember_add_member_value(Slapi_Entry *member_e, const char *group_dn,
- char *grouping_attr, char *grouping_value, void *txn);
+ char *grouping_attr, char *grouping_value);
/*
* Config cache locking functions
@@ -358,7 +358,7 @@ automember_start(Slapi_PBlock * pb)
g_automember_config = (PRCList *)slapi_ch_calloc(1, sizeof(struct configEntry));
PR_INIT_CLIST(g_automember_config);
- if (automember_load_config(pb) != 0) {
+ if (automember_load_config() != 0) {
slapi_log_error(SLAPI_LOG_FATAL, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_start: unable to load plug-in configuration\n");
return -1;
@@ -430,14 +430,13 @@ automember_get_config()
* Parse and load the config entries.
*/
static int
-automember_load_config(Slapi_PBlock *pb)
+automember_load_config()
{
int status = 0;
int result;
int i;
Slapi_PBlock *search_pb;
Slapi_Entry **entries = NULL;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_load_config\n");
@@ -446,7 +445,6 @@ automember_load_config(Slapi_PBlock *pb)
automember_config_write_lock();
automember_delete_config();
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
search_pb = slapi_pblock_new();
/* If an alternate config area is configured, find
@@ -473,7 +471,6 @@ automember_load_config(Slapi_PBlock *pb)
NULL, 0, NULL, NULL, automember_get_plugin_id(), 0);
}
- slapi_pblock_set(search_pb, SLAPI_TXN, txn);
slapi_search_internal_pb(search_pb);
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -500,7 +497,7 @@ automember_load_config(Slapi_PBlock *pb)
/* We don't care about the status here because we may have
* some invalid config entries, but we just want to continue
* looking for valid ones. */
- automember_parse_config_entry(entries[i], 1, pb);
+ automember_parse_config_entry(entries[i], 1);
}
cleanup:
@@ -524,7 +521,7 @@ automember_load_config(Slapi_PBlock *pb)
* Returns 0 if the entry is valid and -1 if it is invalid.
*/
static int
-automember_parse_config_entry(Slapi_Entry * e, int apply, Slapi_PBlock *pb)
+automember_parse_config_entry(Slapi_Entry * e, int apply)
{
char *value = NULL;
char **values = NULL;
@@ -539,7 +536,6 @@ automember_parse_config_entry(Slapi_Entry * e, int apply, Slapi_PBlock *pb)
int entry_added = 0;
int i = 0;
int ret = 0;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_parse_config_entry\n");
@@ -572,7 +568,6 @@ automember_parse_config_entry(Slapi_Entry * e, int apply, Slapi_PBlock *pb)
goto bail;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
value = slapi_entry_get_ndn(e);
if (value) {
entry->dn = slapi_ch_strdup(value);
@@ -665,7 +660,6 @@ automember_parse_config_entry(Slapi_Entry * e, int apply, Slapi_PBlock *pb)
slapi_search_internal_set_pb(search_pb, entry->dn, LDAP_SCOPE_SUBTREE,
AUTOMEMBER_REGEX_RULE_FILTER, NULL, 0, NULL,
NULL, automember_get_plugin_id(), 0);
- slapi_pblock_set(search_pb, SLAPI_TXN, txn);
slapi_search_internal_pb(search_pb);
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -1347,7 +1341,7 @@ automember_parse_grouping_attr(char *value, char **grouping_attr, char **groupin
* the rules in config, then performs the updates.
*/
static void
-automember_update_membership(struct configEntry *config, Slapi_Entry *e, void *txn)
+automember_update_membership(struct configEntry *config, Slapi_Entry *e)
{
PRCList *rule = NULL;
struct automemberRegexRule *curr_rule = NULL;
@@ -1501,14 +1495,14 @@ automember_update_membership(struct configEntry *config, Slapi_Entry *e, void *t
/* Add to each default group. */
for (i = 0; config->default_groups && config->default_groups[i]; i++) {
automember_add_member_value(e, config->default_groups[i],
- config->grouping_attr, config->grouping_value, txn);
+ config->grouping_attr, config->grouping_value);
}
} else {
/* Update the target groups. */
dnitem = (struct automemberDNListItem *)PR_LIST_HEAD(&targets);
while ((PRCList *)dnitem != &targets) {
automember_add_member_value(e, slapi_sdn_get_dn(dnitem->dn),
- config->grouping_attr, config->grouping_value, txn);
+ config->grouping_attr, config->grouping_value);
dnitem = (struct automemberDNListItem *)PR_NEXT_LINK((PRCList *)dnitem);
}
}
@@ -1536,7 +1530,7 @@ automember_update_membership(struct configEntry *config, Slapi_Entry *e, void *t
*/
static void
automember_add_member_value(Slapi_Entry *member_e, const char *group_dn,
- char *grouping_attr, char *grouping_value, void *txn)
+ char *grouping_attr, char *grouping_value)
{
Slapi_PBlock *mod_pb = slapi_pblock_new();
int result = LDAP_SUCCESS;
@@ -1572,7 +1566,6 @@ automember_add_member_value(Slapi_Entry *member_e, const char *group_dn,
slapi_modify_internal_set_pb(mod_pb, group_dn,
mods, 0, 0, automember_get_plugin_id(), 0);
- slapi_pblock_set(mod_pb, SLAPI_TXN, txn);
slapi_modify_internal_pb(mod_pb);
slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -1619,7 +1612,6 @@ automember_pre_op(Slapi_PBlock * pb, int modop)
int free_entry = 0;
char *errstr = NULL;
int ret = 0;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_pre_op\n");
@@ -1631,7 +1623,6 @@ automember_pre_op(Slapi_PBlock * pb, int modop)
if (0 == (sdn = automember_get_sdn(pb)))
goto bail;
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
if (automember_dn_is_config(sdn)) {
/* Validate config changes, but don't apply them.
* This allows us to reject invalid config changes
@@ -1650,7 +1641,7 @@ automember_pre_op(Slapi_PBlock * pb, int modop)
/* Fetch the entry being modified so we can
* create the resulting entry for validation. */
if (sdn) {
- slapi_search_internal_get_entry_ext(sdn, 0, &e, automember_get_plugin_id(), txn);
+ slapi_search_internal_get_entry(sdn, 0, &e, automember_get_plugin_id());
free_entry = 1;
}
@@ -1678,7 +1669,7 @@ automember_pre_op(Slapi_PBlock * pb, int modop)
goto bail;
}
- if (automember_parse_config_entry(e, 0, pb) != 0) {
+ if (automember_parse_config_entry(e, 0) != 0) {
/* Refuse the operation if config parsing failed. */
ret = LDAP_UNWILLING_TO_PERFORM;
if (LDAP_CHANGETYPE_ADD == modop) {
@@ -1748,7 +1739,7 @@ automember_mod_post_op(Slapi_PBlock *pb)
if (automember_oktodo(pb) && (sdn = automember_get_sdn(pb))) {
/* Check if the config is being modified and reload if so. */
if (automember_dn_is_config(sdn)) {
- automember_load_config(pb);
+ automember_load_config();
}
}
@@ -1766,7 +1757,6 @@ automember_add_post_op(Slapi_PBlock *pb)
Slapi_DN *sdn = NULL;
struct configEntry *config = NULL;
PRCList *list = NULL;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"--> automember_add_post_op\n");
@@ -1778,7 +1768,7 @@ automember_add_post_op(Slapi_PBlock *pb)
/* Reload config if a config entry was added. */
if ((sdn = automember_get_sdn(pb))) {
if (automember_dn_is_config(sdn)) {
- automember_load_config(pb);
+ automember_load_config();
}
} else {
slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
@@ -1792,7 +1782,6 @@ automember_add_post_op(Slapi_PBlock *pb)
return 0;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
/* Get the newly added entry. */
slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &e);
@@ -1826,7 +1815,7 @@ automember_add_post_op(Slapi_PBlock *pb)
if (slapi_dn_issuffix(slapi_sdn_get_dn(sdn), config->scope) &&
(slapi_filter_test_simple(e, config->filter) == 0)) {
/* Find out what membership changes are needed and make them. */
- automember_update_membership(config, e, txn);
+ automember_update_membership(config, e);
}
list = PR_NEXT_LINK(list);
@@ -1867,7 +1856,7 @@ automember_del_post_op(Slapi_PBlock *pb)
/* Reload config if a config entry was deleted. */
if ((sdn = automember_get_sdn(pb))) {
if (automember_dn_is_config(sdn))
- automember_load_config(pb);
+ automember_load_config();
} else {
slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_del_post_op: Error "
@@ -1915,7 +1904,7 @@ automember_modrdn_post_op(Slapi_PBlock *pb)
if ((old_sdn = automember_get_sdn(pb))) {
if (automember_dn_is_config(old_sdn) || automember_dn_is_config(new_sdn))
- automember_load_config(pb);
+ automember_load_config();
} else {
slapi_log_error(SLAPI_LOG_PLUGIN, AUTOMEMBER_PLUGIN_SUBSYSTEM,
"automember_modrdn_post_op: Error "
diff --git a/ldap/servers/plugins/deref/deref.c b/ldap/servers/plugins/deref/deref.c
index 86055b2..fb6a54a 100644
--- a/ldap/servers/plugins/deref/deref.c
+++ b/ldap/servers/plugins/deref/deref.c
@@ -594,7 +594,6 @@ deref_do_deref_attr(Slapi_PBlock *pb, BerElement *ctrlber, const char *derefdn,
Slapi_PBlock *derefpb = NULL;
Slapi_Entry **entries = NULL;
int rc;
- void *txn = NULL;
if (deref_check_access(pb, NULL, derefdn, attrs, &retattrs,
(SLAPI_ACL_SEARCH|SLAPI_ACL_READ))) {
@@ -605,11 +604,10 @@ deref_do_deref_attr(Slapi_PBlock *pb, BerElement *ctrlber, const char *derefdn,
}
derefpb = slapi_pblock_new();
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
slapi_search_internal_set_pb(derefpb, derefdn, LDAP_SCOPE_BASE,
"(objectclass=*)", retattrs, 0,
NULL, NULL, deref_get_plugin_id(), 0);
- slapi_pblock_set(derefpb, SLAPI_TXN, txn);
+
slapi_search_internal_pb(derefpb);
slapi_pblock_get(derefpb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
if (LDAP_SUCCESS == rc) {
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index a422055..1173d50 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -231,15 +231,15 @@ static char *dna_get_dn(Slapi_PBlock * pb);
static Slapi_DN *dna_get_sdn(Slapi_PBlock * pb);
static int dna_dn_is_config(char *dn);
static int dna_get_next_value(struct configEntry * config_entry,
- char **next_value_ret, void *txn);
+ char **next_value_ret);
static int dna_first_free_value(struct configEntry *config_entry,
- PRUint64 *newval, void *txn);
-static int dna_fix_maxval(struct configEntry *config_entry, void *txn);
+ PRUint64 *newval);
+static int dna_fix_maxval(struct configEntry *config_entry);
static void dna_notice_allocation(struct configEntry *config_entry,
- PRUint64 new, PRUint64 last, int fix, void *txn);
-static int dna_update_shared_config(struct configEntry * config_entry, void *txn);
+ PRUint64 new, PRUint64 last, int fix);
+static int dna_update_shared_config(struct configEntry * config_entry);
static void dna_update_config_event(time_t event_time, void *arg);
-static int dna_get_shared_servers(struct configEntry *config_entry, PRCList **servers, void *txn);
+static int dna_get_shared_servers(struct configEntry *config_entry, PRCList **servers);
static void dna_free_shared_server(struct dnaServer **server);
static void dna_delete_shared_servers(PRCList **servers);
static int dna_release_range(char *range_dn, PRUint64 *lower, PRUint64 *upper);
@@ -248,8 +248,8 @@ static int dna_request_range(struct configEntry *config_entry,
PRUint64 *lower, PRUint64 *upper);
static struct berval *dna_create_range_request(char *range_dn);
static int dna_update_next_range(struct configEntry *config_entry,
- PRUint64 lower, PRUint64 upper, void *txn);
-static int dna_activate_next_range(struct configEntry *config_entry, void *txn);
+ PRUint64 lower, PRUint64 upper);
+static int dna_activate_next_range(struct configEntry *config_entry);
static int dna_is_replica_bind_dn(char *range_dn, char *bind_dn);
static int dna_get_replica_bind_creds(char *range_dn, struct dnaServer *server,
char **bind_dn, char **bind_passwd,
@@ -1308,7 +1308,7 @@ dna_update_config_event(time_t event_time, void *arg)
slapi_delete_internal_pb(pb);
/* Now force the entry to be recreated */
- dna_update_shared_config(config_entry, NULL);
+ dna_update_shared_config(config_entry);
slapi_unlock_mutex(config_entry->lock);
slapi_pblock_init(pb);
@@ -1336,7 +1336,7 @@ bail:
* The lock for configEntry should be obtained
* before calling this function.
*/
-static int dna_fix_maxval(struct configEntry *config_entry, void *txn)
+static int dna_fix_maxval(struct configEntry *config_entry)
{
PRCList *servers = NULL;
PRCList *server = NULL;
@@ -1351,7 +1351,7 @@ static int dna_fix_maxval(struct configEntry *config_entry, void *txn)
/* If we already have a next range we only need
* to activate it. */
if (config_entry->next_range_lower != 0) {
- ret = dna_activate_next_range(config_entry, txn);
+ ret = dna_activate_next_range(config_entry);
if (ret != 0) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_fix_maxval: Unable to activate the "
@@ -1360,7 +1360,7 @@ static int dna_fix_maxval(struct configEntry *config_entry, void *txn)
} else if (config_entry->shared_cfg_base) {
/* Find out if there are any other servers to request
* range from. */
- dna_get_shared_servers(config_entry, &servers, txn);
+ dna_get_shared_servers(config_entry, &servers);
if (servers) {
/* We have other servers we can try to extend
@@ -1375,7 +1375,7 @@ static int dna_fix_maxval(struct configEntry *config_entry, void *txn)
} else {
/* Someone provided us with a new range. Attempt
* to update the config. */
- if ((ret = dna_update_next_range(config_entry, lower, upper, txn)) == 0) {
+ if ((ret = dna_update_next_range(config_entry, lower, upper)) == 0) {
break;
}
}
@@ -1407,7 +1407,7 @@ bail:
* this function. */
static void
dna_notice_allocation(struct configEntry *config_entry, PRUint64 new,
- PRUint64 last, int fix, void *txn)
+ PRUint64 last, int fix)
{
/* update our cached config entry */
if ((new != 0) && (new <= (config_entry->maxval + config_entry->interval))) {
@@ -1421,7 +1421,7 @@ dna_notice_allocation(struct configEntry *config_entry, PRUint64 new,
* new active range. */
if (config_entry->next_range_lower != 0) {
/* Make the next range active */
- if (dna_activate_next_range(config_entry, txn) != 0) {
+ if (dna_activate_next_range(config_entry) != 0) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_notice_allocation: Unable to activate "
"the next range for range %s.\n", config_entry->dn);
@@ -1429,7 +1429,7 @@ dna_notice_allocation(struct configEntry *config_entry, PRUint64 new,
} else {
config_entry->remaining = 0;
/* update the shared configuration */
- dna_update_shared_config(config_entry, txn);
+ dna_update_shared_config(config_entry);
}
} else {
if (config_entry->next_range_lower != 0) {
@@ -1442,7 +1442,7 @@ dna_notice_allocation(struct configEntry *config_entry, PRUint64 new,
}
/* update the shared configuration */
- dna_update_shared_config(config_entry, txn);
+ dna_update_shared_config(config_entry);
}
/* Check if we passed the threshold and try to fix maxval if so. We
@@ -1454,7 +1454,7 @@ dna_notice_allocation(struct configEntry *config_entry, PRUint64 new,
config_entry->threshold, config_entry->dn, config_entry->remaining);
/* Only attempt to fix maxval if the fix flag is set. */
if (fix != 0) {
- dna_fix_maxval(config_entry, txn);
+ dna_fix_maxval(config_entry);
}
}
@@ -1462,7 +1462,7 @@ dna_notice_allocation(struct configEntry *config_entry, PRUint64 new,
}
static int
-dna_get_shared_servers(struct configEntry *config_entry, PRCList **servers, void *txn)
+dna_get_shared_servers(struct configEntry *config_entry, PRCList **servers)
{
int ret = LDAP_SUCCESS;
Slapi_PBlock *pb = NULL;
@@ -1487,7 +1487,6 @@ dna_get_shared_servers(struct configEntry *config_entry, PRCList **servers, void
LDAP_SCOPE_ONELEVEL, "objectclass=*",
attrs, 0, NULL,
NULL, getPluginID(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
slapi_search_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
@@ -1872,7 +1871,7 @@ static LDAPControl *dna_build_sort_control(const char *attr)
* maximum configured value for this range. */
static int
dna_first_free_value(struct configEntry *config_entry,
- PRUint64 *newval, void *txn)
+ PRUint64 *newval)
{
Slapi_Entry **entries = NULL;
Slapi_PBlock *pb = NULL;
@@ -1940,7 +1939,6 @@ dna_first_free_value(struct configEntry *config_entry,
LDAP_SCOPE_SUBTREE, filter,
config_entry->types, 0, ctrls,
NULL, getPluginID(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
slapi_search_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -1980,7 +1978,6 @@ dna_first_free_value(struct configEntry *config_entry,
config_entry->types, 0, 0,
NULL, getPluginID(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
slapi_search_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -2054,7 +2051,7 @@ cleanup:
* Return the next value to be assigned
*/
static int dna_get_next_value(struct configEntry *config_entry,
- char **next_value_ret, void *txn)
+ char **next_value_ret)
{
Slapi_PBlock *pb = NULL;
LDAPMod mod_replace;
@@ -2074,12 +2071,12 @@ static int dna_get_next_value(struct configEntry *config_entry,
slapi_lock_mutex(config_entry->lock);
/* get the first value */
- ret = dna_first_free_value(config_entry, &setval, txn);
+ ret = dna_first_free_value(config_entry, &setval);
if (LDAP_SUCCESS != ret) {
/* check if we overflowed the configured range */
if (setval > config_entry->maxval) {
/* try for a new range or fail */
- ret = dna_fix_maxval(config_entry, txn);
+ ret = dna_fix_maxval(config_entry);
if (LDAP_SUCCESS != ret) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_get_next_value: no more values available!!\n");
@@ -2087,7 +2084,7 @@ static int dna_get_next_value(struct configEntry *config_entry,
}
/* get the first value from our newly extended range */
- ret = dna_first_free_value(config_entry, &setval, txn);
+ ret = dna_first_free_value(config_entry, &setval);
if (LDAP_SUCCESS != ret)
goto done;
} else {
@@ -2124,7 +2121,6 @@ static int dna_get_next_value(struct configEntry *config_entry,
slapi_modify_internal_set_pb(pb, config_entry->dn,
mods, 0, 0, getPluginID(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
slapi_modify_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
@@ -2139,7 +2135,7 @@ static int dna_get_next_value(struct configEntry *config_entry,
}
/* update our cached config */
- dna_notice_allocation(config_entry, nextval, setval, 1, txn);
+ dna_notice_allocation(config_entry, nextval, setval, 1);
}
done:
@@ -2165,7 +2161,7 @@ static int dna_get_next_value(struct configEntry *config_entry,
* before calling this function.
* */
static int
-dna_update_shared_config(struct configEntry * config_entry, void *txn)
+dna_update_shared_config(struct configEntry * config_entry)
{
int ret = LDAP_SUCCESS;
@@ -2197,7 +2193,7 @@ dna_update_shared_config(struct configEntry * config_entry, void *txn)
} else {
slapi_modify_internal_set_pb(pb, config_entry->shared_cfg_dn,
mods, NULL, NULL, getPluginID(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
+
slapi_modify_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
@@ -2228,7 +2224,6 @@ dna_update_shared_config(struct configEntry * config_entry, void *txn)
/* e will be consumed by slapi_add_internal() */
slapi_add_entry_internal_set_pb(pb, e, NULL, getPluginID(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
slapi_add_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
}
@@ -2258,7 +2253,7 @@ dna_update_shared_config(struct configEntry * config_entry, void *txn)
*/
static int
dna_update_next_range(struct configEntry *config_entry,
- PRUint64 lower, PRUint64 upper, void *txn)
+ PRUint64 lower, PRUint64 upper)
{
Slapi_PBlock *pb = NULL;
LDAPMod mod_replace;
@@ -2289,7 +2284,7 @@ dna_update_next_range(struct configEntry *config_entry,
slapi_modify_internal_set_pb(pb, config_entry->dn,
mods, 0, 0, getPluginID(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
+
slapi_modify_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
@@ -2305,7 +2300,7 @@ dna_update_next_range(struct configEntry *config_entry,
/* update the cached config and the shared config */
config_entry->next_range_lower = lower;
config_entry->next_range_upper = upper;
- dna_notice_allocation(config_entry, 0, 0, 0, txn);
+ dna_notice_allocation(config_entry, 0, 0, 0);
}
bail:
@@ -2322,7 +2317,7 @@ bail:
* be obtained before calling this function.
*/
static int
-dna_activate_next_range(struct configEntry *config_entry, void *txn)
+dna_activate_next_range(struct configEntry *config_entry)
{
Slapi_PBlock *pb = NULL;
LDAPMod mod_maxval;
@@ -2371,7 +2366,7 @@ dna_activate_next_range(struct configEntry *config_entry, void *txn)
slapi_modify_internal_set_pb(pb, config_entry->dn,
mods, 0, 0, getPluginID(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
+
slapi_modify_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
@@ -2392,7 +2387,7 @@ dna_activate_next_range(struct configEntry *config_entry, void *txn)
config_entry->remaining = ((config_entry->maxval - config_entry->nextval + 1) /
config_entry->interval);
/* update the shared configuration */
- dna_update_shared_config(config_entry, txn);
+ dna_update_shared_config(config_entry);
}
bail:
@@ -2834,7 +2829,6 @@ static int dna_pre_op(Slapi_PBlock * pb, int modtype)
char *errstr = NULL;
int i = 0;
int ret = 0;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_pre_op\n");
@@ -2846,7 +2840,6 @@ static int dna_pre_op(Slapi_PBlock * pb, int modtype)
if (0 == (dn = dna_get_dn(pb)))
goto bail;
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
if (LDAP_CHANGETYPE_ADD == modtype) {
slapi_pblock_get(pb, SLAPI_ADD_ENTRY, &e);
} else {
@@ -2863,7 +2856,7 @@ static int dna_pre_op(Slapi_PBlock * pb, int modtype)
*/
Slapi_DN *tmp_dn = dna_get_sdn(pb);
if (tmp_dn) {
- slapi_search_internal_get_entry_ext(tmp_dn, 0, &e, getPluginID(), txn);
+ slapi_search_internal_get_entry(tmp_dn, 0, &e, getPluginID());
free_entry = 1;
}
@@ -3102,7 +3095,7 @@ static int dna_pre_op(Slapi_PBlock * pb, int modtype)
int len;
/* create the value to add */
- ret = dna_get_next_value(config_entry, &value, txn);
+ ret = dna_get_next_value(config_entry, &value);
if (DNA_SUCCESS != ret) {
errstr = slapi_ch_smprintf("Allocation of a new value for range"
" %s failed! Unable to proceed.",
@@ -3475,7 +3468,7 @@ dna_release_range(char *range_dn, PRUint64 *lower, PRUint64 *upper)
/* Try to set the new next range in the config */
ret = dna_update_next_range(config_entry, config_entry->next_range_lower,
- *lower - 1, NULL);
+ *lower - 1);
} else {
/* We release up to half of our remaining values,
* but we'll only release a range that is a multiple
@@ -3512,6 +3505,7 @@ dna_release_range(char *range_dn, PRUint64 *lower, PRUint64 *upper)
slapi_modify_internal_set_pb(pb, config_entry->dn,
mods, 0, 0, getPluginID(), 0);
+
slapi_modify_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
@@ -3522,7 +3516,7 @@ dna_release_range(char *range_dn, PRUint64 *lower, PRUint64 *upper)
if (ret == LDAP_SUCCESS) {
/* Adjust maxval in our cached config and shared config */
config_entry->maxval = *lower - 1;
- dna_notice_allocation(config_entry, config_entry->nextval, 0, 0, NULL);
+ dna_notice_allocation(config_entry, config_entry->nextval, 0, 0);
}
}
diff --git a/ldap/servers/plugins/linkedattrs/fixup_task.c b/ldap/servers/plugins/linkedattrs/fixup_task.c
index c1af2f2..10c821b 100644
--- a/ldap/servers/plugins/linkedattrs/fixup_task.c
+++ b/ldap/servers/plugins/linkedattrs/fixup_task.c
@@ -48,7 +48,7 @@
*/
static void linked_attrs_fixup_task_destructor(Slapi_Task *task);
static void linked_attrs_fixup_task_thread(void *arg);
-static void linked_attrs_fixup_links(struct configEntry *config, void *txn);
+static void linked_attrs_fixup_links(struct configEntry *config);
static int linked_attrs_remove_backlinks_callback(Slapi_Entry *e, void *callback_data);
static int linked_attrs_add_backlinks_callback(Slapi_Entry *e, void *callback_data);
static const char *fetch_attr(Slapi_Entry *e, const char *attrname,
@@ -170,7 +170,7 @@ linked_attrs_fixup_task_thread(void *arg)
slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
"Fixing up linked attribute pair (%s)\n", config_entry->dn);
- linked_attrs_fixup_links(config_entry, NULL);
+ linked_attrs_fixup_links(config_entry);
break;
}
} else {
@@ -180,7 +180,7 @@ linked_attrs_fixup_task_thread(void *arg)
slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
"Fixing up linked attribute pair (%s)\n", config_entry->dn);
- linked_attrs_fixup_links(config_entry, NULL);
+ linked_attrs_fixup_links(config_entry);
}
list = PR_NEXT_LINK(list);
@@ -207,19 +207,12 @@ linked_attrs_fixup_task_thread(void *arg)
slapi_task_finish(task, rc);
}
-struct fixup_cb_data {
- char *attrtype;
- void *txn;
- struct configEntry *config;
-};
-
static void
-linked_attrs_fixup_links(struct configEntry *config, void *txn)
+linked_attrs_fixup_links(struct configEntry *config)
{
Slapi_PBlock *pb = slapi_pblock_new();
char *del_filter = NULL;
char *add_filter = NULL;
- struct fixup_cb_data cb_data = {NULL, NULL, NULL};
del_filter = slapi_ch_smprintf("%s=*", config->managedtype);
add_filter = slapi_ch_smprintf("%s=*", config->linktype);
@@ -232,11 +225,8 @@ linked_attrs_fixup_links(struct configEntry *config, void *txn)
* within the scope and remove the managed type. */
slapi_search_internal_set_pb(pb, config->scope, LDAP_SCOPE_SUBTREE,
del_filter, 0, 0, 0, 0, linked_attrs_get_plugin_id(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
- cb_data.attrtype = config->managedtype;
- cb_data.txn = txn;
- slapi_search_internal_callback_pb(pb, &cb_data, 0,
+ slapi_search_internal_callback_pb(pb, config->managedtype, 0,
linked_attrs_remove_backlinks_callback, 0);
/* Clean out pblock for reuse. */
@@ -246,12 +236,8 @@ linked_attrs_fixup_links(struct configEntry *config, void *txn)
* scope and add backlinks to the entries they point to. */
slapi_search_internal_set_pb(pb, config->scope, LDAP_SCOPE_SUBTREE,
add_filter, 0, 0, 0, 0, linked_attrs_get_plugin_id(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
- cb_data.attrtype = NULL;
- cb_data.txn = txn;
- cb_data.config = config;
- slapi_search_internal_callback_pb(pb, &cb_data, 0,
+ slapi_search_internal_callback_pb(pb, config, 0,
linked_attrs_add_backlinks_callback, 0);
} else {
/* Loop through all non-private backend suffixes and
@@ -266,10 +252,7 @@ linked_attrs_fixup_links(struct configEntry *config, void *txn)
LDAP_SCOPE_SUBTREE, del_filter,
0, 0, 0, 0,
linked_attrs_get_plugin_id(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
- cb_data.attrtype = config->managedtype;
- cb_data.txn = txn;
slapi_search_internal_callback_pb(pb, config->managedtype, 0,
linked_attrs_remove_backlinks_callback, 0);
@@ -280,11 +263,8 @@ linked_attrs_fixup_links(struct configEntry *config, void *txn)
LDAP_SCOPE_SUBTREE, add_filter,
0, 0, 0, 0,
linked_attrs_get_plugin_id(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, txn);
- cb_data.attrtype = NULL;
- cb_data.txn = txn;
- cb_data.config = config;
- slapi_search_internal_callback_pb(pb, &cb_data, 0,
+
+ slapi_search_internal_callback_pb(pb, config, 0,
linked_attrs_add_backlinks_callback, 0);
/* Clean out pblock for reuse. */
@@ -307,8 +287,7 @@ linked_attrs_remove_backlinks_callback(Slapi_Entry *e, void *callback_data)
{
int rc = 0;
Slapi_DN *sdn = slapi_entry_get_sdn(e);
- struct fixup_cb_data *cb_data = (struct fixup_cb_data *)callback_data;
- char *type = cb_data->attrtype;
+ char *type = (char *)callback_data;
Slapi_PBlock *pb = slapi_pblock_new();
char *val[1];
LDAPMod mod;
@@ -331,7 +310,6 @@ linked_attrs_remove_backlinks_callback(Slapi_Entry *e, void *callback_data)
/* Perform the operation. */
slapi_modify_internal_set_pb_ext(pb, sdn, mods, 0, 0,
linked_attrs_get_plugin_id(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, cb_data->txn);
slapi_modify_internal_pb(pb);
slapi_pblock_destroy(pb);
@@ -344,8 +322,7 @@ linked_attrs_add_backlinks_callback(Slapi_Entry *e, void *callback_data)
{
int rc = 0;
char *linkdn = slapi_entry_get_dn(e);
- struct fixup_cb_data *cb_data = (struct fixup_cb_data *)callback_data;
- struct configEntry *config = cb_data->config;
+ struct configEntry *config = (struct configEntry *)callback_data;
Slapi_PBlock *pb = slapi_pblock_new();
int i = 0;
char **targets = NULL;
@@ -401,7 +378,6 @@ linked_attrs_add_backlinks_callback(Slapi_Entry *e, void *callback_data)
/* Perform the modify operation. */
slapi_modify_internal_set_pb_ext(pb, targetsdn, mods, 0, 0,
linked_attrs_get_plugin_id(), 0);
- slapi_pblock_set(pb, SLAPI_TXN, cb_data->txn);
slapi_modify_internal_pb(pb);
/* Initialize the pblock so we can reuse it. */
diff --git a/ldap/servers/plugins/linkedattrs/linked_attrs.c b/ldap/servers/plugins/linkedattrs/linked_attrs.c
index ccc067c..ff3dc3a 100644
--- a/ldap/servers/plugins/linkedattrs/linked_attrs.c
+++ b/ldap/servers/plugins/linkedattrs/linked_attrs.c
@@ -107,13 +107,13 @@ static int linked_attrs_oktodo(Slapi_PBlock *pb);
void linked_attrs_load_array(Slapi_Value **array, Slapi_Attr *attr);
int linked_attrs_compare(const void *a, const void *b);
static void linked_attrs_add_backpointers(char *linkdn, struct configEntry *config,
- Slapi_Mod *smod, void *txn);
+ Slapi_Mod *smod);
static void linked_attrs_del_backpointers(Slapi_PBlock *pb, char *linkdn,
struct configEntry *config, Slapi_Mod *smod);
static void linked_attrs_replace_backpointers(Slapi_PBlock *pb, char *linkdn,
struct configEntry *config, Slapi_Mod *smod);
static void linked_attrs_mod_backpointers(char *linkdn, char *type, char *scope,
- int modop, Slapi_ValueSet *targetvals, void *txn);
+ int modop, Slapi_ValueSet *targetvals);
/*
* Config cache locking functions
@@ -1255,13 +1255,13 @@ linked_attrs_compare(const void *a, const void *b)
*/
static void
linked_attrs_add_backpointers(char *linkdn, struct configEntry *config,
- Slapi_Mod *smod, void *txn)
+ Slapi_Mod *smod)
{
Slapi_ValueSet *vals = slapi_valueset_new();
slapi_valueset_set_from_smod(vals, smod);
linked_attrs_mod_backpointers(linkdn, config->managedtype, config->scope,
- LDAP_MOD_ADD, vals, txn);
+ LDAP_MOD_ADD, vals);
slapi_valueset_free(vals);
}
@@ -1277,7 +1277,6 @@ linked_attrs_del_backpointers(Slapi_PBlock *pb, char *linkdn,
struct configEntry *config, Slapi_Mod *smod)
{
Slapi_ValueSet *vals = NULL;
- void *txn = NULL;
/* If no values are listed in the smod, we need to get
* a list of all of the values that were deleted by
@@ -1294,9 +1293,8 @@ linked_attrs_del_backpointers(Slapi_PBlock *pb, char *linkdn,
slapi_valueset_set_from_smod(vals, smod);
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
linked_attrs_mod_backpointers(linkdn, config->managedtype, config->scope,
- LDAP_MOD_DELETE, vals, txn);
+ LDAP_MOD_DELETE, vals);
slapi_valueset_free(vals);
}
@@ -1317,7 +1315,6 @@ linked_attrs_replace_backpointers(Slapi_PBlock *pb, char *linkdn,
Slapi_Entry *post_e = NULL;
Slapi_Attr *pre_attr = 0;
Slapi_Attr *post_attr = 0;
- void *txn = NULL;
/* Get the pre and post copy of the entry to see
* what values have been added and removed. */
@@ -1328,7 +1325,6 @@ linked_attrs_replace_backpointers(Slapi_PBlock *pb, char *linkdn,
slapi_entry_attr_find(pre_e, config->linktype, &pre_attr);
slapi_entry_attr_find(post_e, config->linktype, &post_attr);
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
if(pre_attr || post_attr) {
int pre_total = 0;
@@ -1415,13 +1411,13 @@ linked_attrs_replace_backpointers(Slapi_PBlock *pb, char *linkdn,
/* Perform the actual updates to the target entries. */
if (delvals) {
linked_attrs_mod_backpointers(linkdn, config->managedtype,
- config->scope, LDAP_MOD_DELETE, delvals, txn);
+ config->scope, LDAP_MOD_DELETE, delvals);
slapi_valueset_free(delvals);
}
if (addvals) {
linked_attrs_mod_backpointers(linkdn, config->managedtype,
- config->scope, LDAP_MOD_ADD, addvals, txn);
+ config->scope, LDAP_MOD_ADD, addvals);
slapi_valueset_free(addvals);
}
@@ -1437,7 +1433,7 @@ linked_attrs_replace_backpointers(Slapi_PBlock *pb, char *linkdn,
*/
static void
linked_attrs_mod_backpointers(char *linkdn, char *type,
- char *scope, int modop, Slapi_ValueSet *targetvals, void *txn)
+ char *scope, int modop, Slapi_ValueSet *targetvals)
{
char *val[2];
int i = 0;
@@ -1490,7 +1486,6 @@ linked_attrs_mod_backpointers(char *linkdn, char *type,
/* Perform the modify operation. */
slapi_modify_internal_set_pb_ext(mod_pb, targetsdn, mods, 0, 0,
linked_attrs_get_plugin_id(), 0);
- slapi_pblock_set(mod_pb, SLAPI_TXN, txn);
slapi_modify_internal_pb(mod_pb);
/* Initialize the pblock so we can reuse it. */
@@ -1524,7 +1519,6 @@ linked_attrs_pre_op(Slapi_PBlock * pb, int modop)
int free_entry = 0;
char *errstr = NULL;
int ret = 0;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_pre_op\n");
@@ -1536,7 +1530,6 @@ linked_attrs_pre_op(Slapi_PBlock * pb, int modop)
if (0 == (dn = linked_attrs_get_dn(pb)))
goto bail;
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
if (linked_attrs_dn_is_config(dn)) {
/* Validate config changes, but don't apply them.
* This allows us to reject invalid config changes
@@ -1551,7 +1544,7 @@ linked_attrs_pre_op(Slapi_PBlock * pb, int modop)
/* int free_sdn = 0; */
Slapi_DN *tmp_dn = linked_attrs_get_sdn(pb);
if (tmp_dn) {
- slapi_search_internal_get_entry_ext(tmp_dn, 0, &e, linked_attrs_get_plugin_id(), txn);
+ slapi_search_internal_get_entry(tmp_dn, 0, &e, linked_attrs_get_plugin_id());
free_entry = 1;
}
@@ -1623,7 +1616,6 @@ linked_attrs_mod_post_op(Slapi_PBlock *pb)
char *dn = NULL;
struct configEntry *config = NULL;
void *caller_id = NULL;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_mod_post_op\n");
@@ -1641,7 +1633,6 @@ linked_attrs_mod_post_op(Slapi_PBlock *pb)
/* Just return without processing */
return 0;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
if (linked_attrs_oktodo(pb) &&
(dn = linked_attrs_get_dn(pb))) {
@@ -1684,7 +1675,7 @@ linked_attrs_mod_post_op(Slapi_PBlock *pb)
case LDAP_MOD_ADD:
/* Find the entries pointed to by the new
* values and add the backpointers. */
- linked_attrs_add_backpointers(dn, config, smod, txn);
+ linked_attrs_add_backpointers(dn, config, smod);
break;
case LDAP_MOD_DELETE:
/* Find the entries pointed to by the deleted
@@ -1728,7 +1719,6 @@ linked_attrs_add_post_op(Slapi_PBlock *pb)
{
Slapi_Entry *e = NULL;
char *dn = NULL;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_add_post_op\n");
@@ -1747,7 +1737,6 @@ linked_attrs_add_post_op(Slapi_PBlock *pb)
"retrieving dn\n");
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
/* Get the newly added entry. */
slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &e);
@@ -1780,7 +1769,7 @@ linked_attrs_add_post_op(Slapi_PBlock *pb)
slapi_lock_mutex(config->lock);
linked_attrs_mod_backpointers(dn, config->managedtype,
- config->scope, LDAP_MOD_ADD, vals, txn);
+ config->scope, LDAP_MOD_ADD, vals);
slapi_unlock_mutex(config->lock);
@@ -1809,7 +1798,6 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
{
char *dn = NULL;
Slapi_Entry *e = NULL;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_del_post_op\n");
@@ -1818,7 +1806,6 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
if (!g_plugin_started || !linked_attrs_oktodo(pb))
return 0;
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
/* Reload config if a config entry was deleted. */
if ((dn = linked_attrs_get_dn(pb))) {
if (linked_attrs_dn_is_config(dn))
@@ -1861,7 +1848,7 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
slapi_lock_mutex(config->lock);
linked_attrs_mod_backpointers(dn, config->managedtype,
- config->scope, LDAP_MOD_DELETE, vals, txn);
+ config->scope, LDAP_MOD_DELETE, vals);
slapi_unlock_mutex(config->lock);
@@ -1890,7 +1877,7 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
/* Delete forward link value. */
linked_attrs_mod_backpointers(dn, config->linktype,
- config->scope, LDAP_MOD_DELETE, vals, txn);
+ config->scope, LDAP_MOD_DELETE, vals);
slapi_unlock_mutex(config->lock);
@@ -1928,7 +1915,6 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
char *type = NULL;
struct configEntry *config = NULL;
int rc = 0;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, LINK_PLUGIN_SUBSYSTEM,
"--> linked_attrs_modrdn_post_op\n");
@@ -1938,7 +1924,6 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
goto done;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
/* Reload config if an existing config entry was renamed,
* or if the new dn brings an entry into the scope of the
* config entries. */
@@ -1991,7 +1976,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
/* Delete old dn value. */
linked_attrs_mod_backpointers(old_dn, config->managedtype,
- config->scope, LDAP_MOD_DELETE, vals, txn);
+ config->scope, LDAP_MOD_DELETE, vals);
slapi_unlock_mutex(config->lock);
@@ -2014,7 +1999,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
/* Add new dn value. */
linked_attrs_mod_backpointers(new_dn, config->managedtype,
- config->scope, LDAP_MOD_ADD, vals, txn);
+ config->scope, LDAP_MOD_ADD, vals);
slapi_unlock_mutex(config->lock);
@@ -2043,11 +2028,11 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
/* Delete old dn value. */
linked_attrs_mod_backpointers(old_dn, config->linktype,
- config->scope, LDAP_MOD_DELETE, vals, txn);
+ config->scope, LDAP_MOD_DELETE, vals);
/* Add new dn value. */
linked_attrs_mod_backpointers(new_dn, config->linktype,
- config->scope, LDAP_MOD_ADD, vals, txn);
+ config->scope, LDAP_MOD_ADD, vals);
slapi_unlock_mutex(config->lock);
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index 303d9b3..b51c241 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -87,9 +87,9 @@ static int mep_modrdn_pre_op(Slapi_PBlock *pb);
/*
* Config cache management functions
*/
-static int mep_load_config(Slapi_PBlock *pb);
+static int mep_load_config();
static void mep_delete_config();
-static int mep_parse_config_entry(Slapi_Entry * e, int apply, Slapi_PBlock *pb);
+static int mep_parse_config_entry(Slapi_Entry * e, int apply);
static void mep_free_config_entry(struct configEntry ** entry);
/*
@@ -108,9 +108,9 @@ static int mep_isrepl(Slapi_PBlock *pb);
static Slapi_Entry *mep_create_managed_entry(struct configEntry *config,
Slapi_Entry *origin);
static void mep_add_managed_entry(struct configEntry *config,
- Slapi_Entry *origin, void *txn);
+ Slapi_Entry *origin);
static void mep_rename_managed_entry(Slapi_Entry *origin,
- Slapi_DN *new_dn, Slapi_DN *old_dn, void *txn);
+ Slapi_DN *new_dn, Slapi_DN *old_dn);
static Slapi_Mods *mep_get_mapped_mods(struct configEntry *config,
Slapi_Entry *origin, char **mapped_dn);
static int mep_parse_mapped_attr(char *mapping, Slapi_Entry *origin,
@@ -374,7 +374,7 @@ mep_start(Slapi_PBlock * pb)
g_mep_config = (PRCList *)slapi_ch_calloc(1, sizeof(struct configEntry));
PR_INIT_CLIST(g_mep_config);
- if (mep_load_config(pb) != 0) {
+ if (mep_load_config() != 0) {
slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
"mep_start: unable to load plug-in configuration\n");
return -1;
@@ -442,14 +442,13 @@ mep_get_config()
* --- cn=etc,...
*/
static int
-mep_load_config(Slapi_PBlock *pb)
+mep_load_config()
{
int status = 0;
int result;
int i;
Slapi_PBlock *search_pb;
Slapi_Entry **entries = NULL;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_load_config\n");
@@ -484,8 +483,6 @@ mep_load_config(Slapi_PBlock *pb)
NULL, 0, NULL, NULL, mep_get_plugin_id(), 0);
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
- slapi_pblock_set(search_pb, SLAPI_TXN, txn);
slapi_search_internal_pb(search_pb);
slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -509,7 +506,7 @@ mep_load_config(Slapi_PBlock *pb)
/* We don't care about the status here because we may have
* some invalid config entries, but we just want to continue
* looking for valid ones. */
- mep_parse_config_entry(entries[i], 1, pb);
+ mep_parse_config_entry(entries[i], 1);
}
cleanup:
@@ -533,7 +530,7 @@ mep_load_config(Slapi_PBlock *pb)
* Returns 0 if the entry is valid and -1 if it is invalid.
*/
static int
-mep_parse_config_entry(Slapi_Entry * e, int apply, Slapi_PBlock *pb)
+mep_parse_config_entry(Slapi_Entry * e, int apply)
{
char *value;
struct configEntry *entry = NULL;
@@ -541,7 +538,6 @@ mep_parse_config_entry(Slapi_Entry * e, int apply, Slapi_PBlock *pb)
PRCList *list;
int entry_added = 0;
int ret = 0;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_parse_config_entry\n");
@@ -573,7 +569,6 @@ mep_parse_config_entry(Slapi_Entry * e, int apply, Slapi_PBlock *pb)
slapi_log_error(SLAPI_LOG_CONFIG, MEP_PLUGIN_SUBSYSTEM,
"----------> dn [%s]\n", slapi_sdn_get_dn(entry->sdn));
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
/* Load the origin scope */
value = slapi_entry_attr_get_charptr(e, MEP_SCOPE_TYPE);
if (value) {
@@ -634,8 +629,8 @@ mep_parse_config_entry(Slapi_Entry * e, int apply, Slapi_PBlock *pb)
entry->template_sdn = slapi_sdn_new_dn_byval(value);
/* Fetch the managed entry template */
- slapi_search_internal_get_entry_ext(entry->template_sdn, 0,
- &entry->template_entry, mep_get_plugin_id(), txn);
+ slapi_search_internal_get_entry(entry->template_sdn, 0,
+ &entry->template_entry, mep_get_plugin_id());
if (entry->template_entry == NULL) {
slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
@@ -1423,7 +1418,7 @@ mep_create_managed_entry(struct configEntry *config, Slapi_Entry *origin)
*/
static void
mep_add_managed_entry(struct configEntry *config,
- Slapi_Entry *origin, void *txn)
+ Slapi_Entry *origin)
{
Slapi_Entry *managed_entry = NULL;
char *managed_dn = NULL;
@@ -1453,7 +1448,6 @@ mep_add_managed_entry(struct configEntry *config,
"entry \"%s\"\n.", managed_dn, slapi_entry_get_dn(origin));
slapi_add_entry_internal_set_pb(mod_pb, managed_entry, NULL,
mep_get_plugin_id(), 0);
- slapi_pblock_set(mod_pb, SLAPI_TXN, txn);
slapi_add_internal_pb(mod_pb);
slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -1499,7 +1493,6 @@ mep_add_managed_entry(struct configEntry *config,
slapi_modify_internal_set_pb_ext(mod_pb,
slapi_entry_get_sdn(origin),
mods, 0, 0, mep_get_plugin_id(), 0);
- slapi_pblock_set(mod_pb, SLAPI_TXN, txn);
slapi_modify_internal_pb(mod_pb);
slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -1524,7 +1517,7 @@ mep_add_managed_entry(struct configEntry *config,
*/
static void
mep_rename_managed_entry(Slapi_Entry *origin,
- Slapi_DN *new_dn, Slapi_DN *old_dn, void *txn)
+ Slapi_DN *new_dn, Slapi_DN *old_dn)
{
Slapi_RDN *srdn = slapi_rdn_new();
Slapi_PBlock *mep_pb = slapi_pblock_new();
@@ -1545,7 +1538,6 @@ mep_rename_managed_entry(Slapi_Entry *origin,
slapi_rename_internal_set_pb_ext(mep_pb, old_dn,
slapi_rdn_get_rdn(srdn),
NULL, 1, NULL, NULL, mep_get_plugin_id(), 0);
- slapi_pblock_set(mep_pb, SLAPI_TXN, txn);
slapi_modrdn_internal_pb(mep_pb);
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -1574,7 +1566,6 @@ mep_rename_managed_entry(Slapi_Entry *origin,
vals[0], slapi_entry_get_dn(origin));
slapi_modify_internal_set_pb_ext(mep_pb, slapi_entry_get_sdn(origin),
mods, 0, 0, mep_get_plugin_id(), 0);
- slapi_pblock_set(mep_pb, SLAPI_TXN, txn);
slapi_modify_internal_pb(mep_pb);
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -1993,7 +1984,6 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
struct configEntry *config = NULL;
void *caller_id = NULL;
int ret = 0;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_pre_op\n");
@@ -2008,7 +1998,6 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
if (0 == (sdn = mep_get_sdn(pb)))
goto bail;
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
if (mep_dn_is_config(sdn)) {
/* Validate config changes, but don't apply them.
* This allows us to reject invalid config changes
@@ -2022,7 +2011,7 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
/* Fetch the entry being modified so we can
* create the resulting entry for validation. */
if (sdn) {
- slapi_search_internal_get_entry_ext(sdn, 0, &e, mep_get_plugin_id(), txn);
+ slapi_search_internal_get_entry(sdn, 0, &e, mep_get_plugin_id());
free_entry = 1;
}
@@ -2053,7 +2042,7 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
goto bail;
}
- if (mep_parse_config_entry(e, 0, pb) != 0) {
+ if (mep_parse_config_entry(e, 0) != 0) {
/* Refuse the operation if config parsing failed. */
ret = LDAP_UNWILLING_TO_PERFORM;
if (LDAP_CHANGETYPE_ADD == modop) {
@@ -2105,7 +2094,7 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
case LDAP_CHANGETYPE_MODIFY:
/* Fetch the existing template entry. */
if (sdn) {
- slapi_search_internal_get_entry_ext(sdn, 0, &e, mep_get_plugin_id(), txn);
+ slapi_search_internal_get_entry(sdn, 0, &e, mep_get_plugin_id());
free_entry = 1;
}
@@ -2173,7 +2162,7 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
slapi_entry_free(e);
}
- slapi_search_internal_get_entry_ext(sdn, 0, &e, mep_get_plugin_id(), txn);
+ slapi_search_internal_get_entry(sdn, 0, &e, mep_get_plugin_id());
free_entry = 1;
}
@@ -2183,8 +2172,8 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
origin_dn = slapi_entry_attr_get_charptr(e, MEP_MANAGED_BY_TYPE);
if (origin_dn) {
origin_sdn = slapi_sdn_new_normdn_byref(origin_dn);
- slapi_search_internal_get_entry_ext(origin_sdn, 0,
- &origin_e, mep_get_plugin_id(), txn);
+ slapi_search_internal_get_entry(origin_sdn, 0,
+ &origin_e, mep_get_plugin_id());
slapi_sdn_free(&origin_sdn);
}
@@ -2315,7 +2304,6 @@ mep_mod_post_op(Slapi_PBlock *pb)
Slapi_DN *mapped_sdn = NULL;
struct configEntry *config = NULL;
int result = 0;
- void *txn = NULL;
LDAPMod **mods = NULL;
int i, abort_mod = 1;
@@ -2326,11 +2314,10 @@ mep_mod_post_op(Slapi_PBlock *pb)
if (!g_plugin_started)
return 0;
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
if (mep_oktodo(pb) && (sdn = mep_get_sdn(pb))) {
/* First check if the config or a template is being modified. */
if (mep_dn_is_config(sdn) || mep_dn_is_template(sdn)) {
- mep_load_config(pb);
+ mep_load_config();
}
/* If replication, just bail. */
@@ -2401,7 +2388,6 @@ mep_mod_post_op(Slapi_PBlock *pb)
slapi_modify_internal_set_pb(mep_pb, managed_dn,
slapi_mods_get_ldapmods_byref(smods), 0, 0,
mep_get_plugin_id(), 0);
- slapi_pblock_set(mep_pb, SLAPI_TXN, txn);
slapi_modify_internal_pb(mep_pb);
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -2423,7 +2409,7 @@ mep_mod_post_op(Slapi_PBlock *pb)
managed_sdn = slapi_sdn_new_normdn_byref(managed_dn);
if (slapi_sdn_compare(managed_sdn, mapped_sdn) != 0) {
- mep_rename_managed_entry(e, mapped_sdn, managed_sdn, txn);
+ mep_rename_managed_entry(e, mapped_sdn, managed_sdn);
}
slapi_sdn_free(&mapped_sdn);
@@ -2452,7 +2438,6 @@ mep_add_post_op(Slapi_PBlock *pb)
Slapi_Entry *e = NULL;
Slapi_DN *sdn = NULL;
struct configEntry *config = NULL;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_add_post_op\n");
@@ -2461,11 +2446,10 @@ mep_add_post_op(Slapi_PBlock *pb)
if (!g_plugin_started || !mep_oktodo(pb))
return 0;
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
/* Reload config if a config entry was added. */
if ((sdn = mep_get_sdn(pb))) {
if (mep_dn_is_config(sdn)) {
- mep_load_config(pb);
+ mep_load_config();
}
} else {
slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
@@ -2499,7 +2483,7 @@ mep_add_post_op(Slapi_PBlock *pb)
mep_find_config(e, &config);
if (config) {
- mep_add_managed_entry(config, e, txn);
+ mep_add_managed_entry(config, e);
}
mep_config_unlock();
@@ -2520,7 +2504,6 @@ mep_del_post_op(Slapi_PBlock *pb)
{
Slapi_Entry *e = NULL;
Slapi_DN *sdn = NULL;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_del_post_op\n");
@@ -2533,7 +2516,7 @@ mep_del_post_op(Slapi_PBlock *pb)
/* Reload config if a config entry was deleted. */
if ((sdn = mep_get_sdn(pb))) {
if (mep_dn_is_config(sdn))
- mep_load_config(pb);
+ mep_load_config();
} else {
slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
"mep_del_post_op: Error "
@@ -2545,7 +2528,6 @@ mep_del_post_op(Slapi_PBlock *pb)
return 0;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
/* Get deleted entry, then go through types to find config. */
slapi_pblock_get( pb, SLAPI_ENTRY_PRE_OP, &e );
@@ -2569,7 +2551,6 @@ mep_del_post_op(Slapi_PBlock *pb)
"\"%s\".\n ", managed_dn, slapi_sdn_get_dn(sdn));
slapi_delete_internal_set_pb(mep_pb, managed_dn, NULL,
NULL, mep_get_plugin_id(), 0);
- slapi_pblock_set(mep_pb, SLAPI_TXN, txn);
slapi_delete_internal_pb(mep_pb);
slapi_ch_free_string(&managed_dn);
@@ -2596,7 +2577,6 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
Slapi_Entry *post_e = NULL;
char *managed_dn = NULL;
struct configEntry *config = NULL;
- void *txn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, MEP_PLUGIN_SUBSYSTEM,
"--> mep_modrdn_post_op\n");
@@ -2619,10 +2599,9 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
return 0;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
if ((old_sdn = mep_get_sdn(pb))) {
if (mep_dn_is_config(old_sdn) || mep_dn_is_config(new_sdn))
- mep_load_config(pb);
+ mep_load_config();
} else {
slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
"mep_modrdn_post_op: Error "
@@ -2673,7 +2652,6 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
managed_dn, slapi_sdn_get_dn(old_sdn));
slapi_delete_internal_set_pb (mep_pb, managed_dn, NULL, NULL,
mep_get_plugin_id(), 0);
- slapi_pblock_set(mep_pb, SLAPI_TXN, txn);
slapi_delete_internal_pb(mep_pb);
/* Clear out the pblock for reuse. */
@@ -2703,7 +2681,6 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
MEP_MANAGED_ENTRY_TYPE, MEP_ORIGIN_OC, new_dn);
slapi_modify_internal_set_pb_ext(mep_pb, new_sdn, mods, 0, 0,
mep_get_plugin_id(), 0);
- slapi_pblock_set(mep_pb, SLAPI_TXN, txn);
slapi_modify_internal_pb(mep_pb);
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -2741,8 +2718,8 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
* perform our updates. */
managed_sdn = slapi_sdn_new_normdn_byref(managed_dn);
- if (slapi_search_internal_get_entry_ext(managed_sdn, 0,
- NULL, mep_get_plugin_id(), txn) == LDAP_NO_SUCH_OBJECT) {
+ if (slapi_search_internal_get_entry(managed_sdn, 0,
+ NULL, mep_get_plugin_id()) == LDAP_NO_SUCH_OBJECT) {
slapi_ch_free_string(&managed_dn);
/* This DN is not a copy, so we don't want to free it later. */
managed_dn = slapi_entry_get_dn(new_managed_entry);
@@ -2756,7 +2733,6 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
"in entry \"%s\".\n", MEP_MANAGED_BY_TYPE, new_dn, managed_dn);
slapi_modify_internal_set_pb(mep_pb, managed_dn, mods, 0, 0,
mep_get_plugin_id(), 0);
- slapi_pblock_set(mep_pb, SLAPI_TXN, txn);
slapi_modify_internal_pb(mep_pb);
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -2777,7 +2753,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
slapi_sdn_get_dn(old_sdn));
mep_rename_managed_entry(post_e,
slapi_entry_get_sdn(new_managed_entry),
- managed_sdn, txn);
+ managed_sdn);
}
/* Update all of the mapped attributes
@@ -2795,7 +2771,6 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
slapi_entry_get_sdn(new_managed_entry),
slapi_mods_get_ldapmods_byref(smods), 0, 0,
mep_get_plugin_id(), 0);
- slapi_pblock_set(mep_pb, SLAPI_TXN, txn);
slapi_modify_internal_pb(mep_pb);
slapi_pblock_get(mep_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
@@ -2838,7 +2813,7 @@ bailmod:
mep_find_config(post_e, &config);
if (config) {
- mep_add_managed_entry(config, post_e, txn);
+ mep_add_managed_entry(config, post_e);
}
mep_config_unlock();
diff --git a/ldap/servers/plugins/replication/urp.c b/ldap/servers/plugins/replication/urp.c
index 33be252..1328996 100644
--- a/ldap/servers/plugins/replication/urp.c
+++ b/ldap/servers/plugins/replication/urp.c
@@ -53,10 +53,10 @@
extern int slapi_log_urp;
static int urp_add_resolve_parententry (Slapi_PBlock *pb, char *sessionid, Slapi_Entry *entry, Slapi_Entry *parententry, CSN *opcsn);
-static int urp_annotate_dn (char *sessionid, Slapi_Entry *entry, CSN *opcsn, const char *optype, void *txn);
+static int urp_annotate_dn (char *sessionid, Slapi_Entry *entry, CSN *opcsn, const char *optype);
static int urp_naming_conflict_removal (Slapi_PBlock *pb, char *sessionid, CSN *opcsn, const char *optype);
-static int mod_namingconflict_attr (const char *uniqueid, const Slapi_DN *entrysdn, const Slapi_DN *conflictsdn, CSN *opcsn, void *txn);
-static int del_replconflict_attr (Slapi_Entry *entry, CSN *opcsn, int opflags, void *txn);
+static int mod_namingconflict_attr (const char *uniqueid, const Slapi_DN *entrysdn, const Slapi_DN *conflictsdn, CSN *opcsn);
+static int del_replconflict_attr (Slapi_Entry *entry, CSN *opcsn, int opflags);
static char *get_dn_plus_uniqueid(char *sessionid,const char *olddn,const char *uniqueid);
static char *get_rdn_plus_uniqueid(char *sessionid,const char *olddn,const char *uniqueid);
static int is_suffix_entry (Slapi_PBlock *pb, Slapi_Entry *entry, Slapi_DN **parenddn);
@@ -123,14 +123,12 @@ urp_add_operation( Slapi_PBlock *pb )
int op_result= 0;
int rc= 0; /* OK */
Slapi_DN *sdn = NULL;
- void *txn = NULL;
if ( slapi_op_abandoned(pb) )
{
return rc;
}
- slapi_pblock_get( pb, SLAPI_TXN, &txn );
slapi_pblock_get( pb, SLAPI_ADD_EXISTING_UNIQUEID_ENTRY, &existing_uniqueid_entry );
if (existing_uniqueid_entry!=NULL)
{
@@ -229,7 +227,7 @@ urp_add_operation( Slapi_PBlock *pb )
else if(r>0)
{
/* Existing entry is a loser */
- if (!urp_annotate_dn(sessionid, existing_dn_entry, opcsn, "ADD", txn))
+ if (!urp_annotate_dn(sessionid, existing_dn_entry, opcsn, "ADD"))
{
op_result= LDAP_OPERATIONS_ERROR;
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &op_result);
@@ -288,14 +286,12 @@ urp_modrdn_operation( Slapi_PBlock *pb )
int op_result= 0;
int rc= 0; /* OK */
int del_old_replconflict_attr = 0;
- void *txn = NULL;
if ( slapi_op_abandoned(pb) )
{
return rc;
}
- slapi_pblock_get (pb, SLAPI_TXN, &txn);
slapi_pblock_get (pb, SLAPI_MODRDN_TARGET_ENTRY, &target_entry);
if(target_entry==NULL)
{
@@ -421,7 +417,7 @@ urp_modrdn_operation( Slapi_PBlock *pb )
Unique ID already in RDN - Change to Lost and Found entry */
goto bailout;
}
- mod_namingconflict_attr (op_uniqueid, target_sdn, existing_sdn, opcsn, txn);
+ mod_namingconflict_attr (op_uniqueid, target_sdn, existing_sdn, opcsn);
slapi_pblock_set(pb, SLAPI_MODRDN_NEWRDN, newrdn_with_uniqueid);
slapi_log_error(slapi_log_urp, sessionid,
"Naming conflict MODRDN. Rename target entry to %s\n",
@@ -436,7 +432,7 @@ urp_modrdn_operation( Slapi_PBlock *pb )
{
/* The existing entry is a loser */
- int resolve = urp_annotate_dn (sessionid, existing_entry, opcsn, "MODRDN", txn);
+ int resolve = urp_annotate_dn (sessionid, existing_entry, opcsn, "MODRDN");
if(!resolve)
{
op_result= LDAP_OPERATIONS_ERROR;
@@ -547,7 +543,7 @@ urp_modrdn_operation( Slapi_PBlock *pb )
bailout:
if ( del_old_replconflict_attr && rc == 0 )
{
- del_replconflict_attr (target_entry, opcsn, 0, txn);
+ del_replconflict_attr (target_entry, opcsn, 0);
}
if ( parentdn )
slapi_sdn_free(&parentdn);
@@ -565,14 +561,12 @@ urp_delete_operation( Slapi_PBlock *pb )
char sessionid[REPL_SESSION_ID_SIZE];
int op_result= 0;
int rc= 0; /* OK */
- void *txn = NULL;
if ( slapi_op_abandoned(pb) )
{
return rc;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
slapi_pblock_get(pb, SLAPI_DELETE_EXISTING_ENTRY, &deleteentry);
if(deleteentry==NULL) /* uniqueid can't be found */
@@ -598,14 +592,14 @@ urp_delete_operation( Slapi_PBlock *pb )
if(!slapi_entry_has_children(deleteentry))
{
/* Remove possible conflict attributes */
- del_replconflict_attr (deleteentry, opcsn, 0, txn);
+ del_replconflict_attr (deleteentry, opcsn, 0);
rc= 0; /* OK, to delete the entry */
PROFILE_POINT; /* Delete Operation; OK. */
}
else
{
/* Turn this entry into a glue_absent_parent entry */
- entry_to_glue(sessionid, deleteentry, REASON_RESURRECT_ENTRY, opcsn, txn);
+ entry_to_glue(sessionid, deleteentry, REASON_RESURRECT_ENTRY, opcsn);
/* Turn the Delete into a No-Op */
op_result= LDAP_SUCCESS;
@@ -718,7 +712,7 @@ urp_post_delete_operation( Slapi_PBlock *pb )
}
int
-urp_fixup_add_entry (Slapi_Entry *e, const char *target_uniqueid, const char *parentuniqueid, CSN *opcsn, int opflags, void *txn)
+urp_fixup_add_entry (Slapi_Entry *e, const char *target_uniqueid, const char *parentuniqueid, CSN *opcsn, int opflags)
{
Slapi_PBlock *newpb;
Slapi_Operation *op;
@@ -749,7 +743,6 @@ urp_fixup_add_entry (Slapi_Entry *e, const char *target_uniqueid, const char *pa
slapi_pblock_get ( newpb, SLAPI_OPERATION, &op );
operation_set_csn ( op, opcsn );
- slapi_pblock_set ( newpb, SLAPI_TXN, txn );
slapi_add_internal_pb ( newpb );
slapi_pblock_get ( newpb, SLAPI_PLUGIN_INTOP_RESULT, &op_result );
slapi_pblock_destroy ( newpb );
@@ -758,7 +751,7 @@ urp_fixup_add_entry (Slapi_Entry *e, const char *target_uniqueid, const char *pa
}
int
-urp_fixup_rename_entry (Slapi_Entry *entry, const char *newrdn, int opflags, void *txn)
+urp_fixup_rename_entry (Slapi_Entry *entry, const char *newrdn, int opflags)
{
Slapi_PBlock *newpb;
Slapi_Operation *op;
@@ -787,7 +780,6 @@ urp_fixup_rename_entry (Slapi_Entry *entry, const char *newrdn, int opflags, voi
slapi_pblock_get (newpb, SLAPI_OPERATION, &op);
operation_set_csn (op, opcsn);
- slapi_pblock_set(newpb, SLAPI_TXN, txn);
slapi_modrdn_internal_pb(newpb);
slapi_pblock_get(newpb, SLAPI_PLUGIN_INTOP_RESULT, &op_result);
@@ -796,7 +788,7 @@ urp_fixup_rename_entry (Slapi_Entry *entry, const char *newrdn, int opflags, voi
}
int
-urp_fixup_delete_entry (const char *uniqueid, const char *dn, CSN *opcsn, int opflags, void *txn)
+urp_fixup_delete_entry (const char *uniqueid, const char *dn, CSN *opcsn, int opflags)
{
Slapi_PBlock *newpb;
Slapi_Operation *op;
@@ -818,7 +810,6 @@ urp_fixup_delete_entry (const char *uniqueid, const char *dn, CSN *opcsn, int op
slapi_pblock_get ( newpb, SLAPI_OPERATION, &op );
operation_set_csn ( op, opcsn );
- slapi_pblock_set ( newpb, SLAPI_TXN, txn );
slapi_delete_internal_pb ( newpb );
slapi_pblock_get ( newpb, SLAPI_PLUGIN_INTOP_RESULT, &op_result );
slapi_pblock_destroy ( newpb );
@@ -827,7 +818,7 @@ urp_fixup_delete_entry (const char *uniqueid, const char *dn, CSN *opcsn, int op
}
int
-urp_fixup_modify_entry (const char *uniqueid, const Slapi_DN *sdn, CSN *opcsn, Slapi_Mods *smods, int opflags, void *txn)
+urp_fixup_modify_entry (const char *uniqueid, const Slapi_DN *sdn, CSN *opcsn, Slapi_Mods *smods, int opflags)
{
Slapi_PBlock *newpb;
Slapi_Operation *op;
@@ -848,7 +839,6 @@ urp_fixup_modify_entry (const char *uniqueid, const Slapi_DN *sdn, CSN *opcsn, S
slapi_pblock_get (newpb, SLAPI_OPERATION, &op);
operation_set_csn (op, opcsn);
- slapi_pblock_set (newpb, SLAPI_TXN, txn);
/* do modify */
slapi_modify_internal_pb (newpb);
slapi_pblock_get (newpb, SLAPI_PLUGIN_INTOP_RESULT, &op_result);
@@ -972,7 +962,7 @@ bailout:
* a new entry (the operation entry) see urp_add_operation.
*/
static int
-urp_annotate_dn (char *sessionid, Slapi_Entry *entry, CSN *opcsn, const char *optype, void *txn)
+urp_annotate_dn (char *sessionid, Slapi_Entry *entry, CSN *opcsn, const char *optype)
{
int rc = 0; /* Fail */
int op_result;
@@ -988,8 +978,8 @@ urp_annotate_dn (char *sessionid, Slapi_Entry *entry, CSN *opcsn, const char *op
newrdn = get_rdn_plus_uniqueid ( sessionid, basedn, uniqueid );
if(newrdn!=NULL)
{
- mod_namingconflict_attr (uniqueid, basesdn, basesdn, opcsn, txn);
- op_result = urp_fixup_rename_entry ( entry, newrdn, 0, txn );
+ mod_namingconflict_attr (uniqueid, basesdn, basesdn, opcsn);
+ op_result = urp_fixup_rename_entry ( entry, newrdn, 0 );
switch(op_result)
{
case LDAP_SUCCESS:
@@ -1051,9 +1041,7 @@ urp_get_min_naming_conflict_entry ( Slapi_PBlock *pb, char *sessionid, CSN *opcs
int i = 0;
int min_i = -1;
int op_result = LDAP_SUCCESS;
- void *txn = NULL;
- slapi_pblock_get (pb, SLAPI_TXN, &txn);
slapi_pblock_get (pb, SLAPI_URP_NAMING_COLLISION_DN, &basedn);
if (NULL == basedn || strncmp (basedn, SLAPI_ATTR_UNIQUEID, strlen(SLAPI_ATTR_UNIQUEID)) == 0)
return NULL;
@@ -1080,7 +1068,6 @@ urp_get_min_naming_conflict_entry ( Slapi_PBlock *pb, char *sessionid, CSN *opcs
NULL, /* UniqueID */
repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION),
0);
- slapi_pblock_set(newpb, SLAPI_TXN, txn);
slapi_search_internal_pb(newpb);
slapi_pblock_get(newpb, SLAPI_PLUGIN_INTOP_RESULT, &op_result);
slapi_pblock_get(newpb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries);
@@ -1146,9 +1133,6 @@ urp_naming_conflict_removal ( Slapi_PBlock *pb, char *sessionid, CSN *opcsn, con
Slapi_RDN *oldrdn, *newrdn;
const char *oldrdnstr, *newrdnstr;
int op_result;
- void *txn = NULL;
-
- slapi_pblock_get (pb, SLAPI_TXN, &txn);
/*
* Backend op has set SLAPI_URP_NAMING_COLLISION_DN to the basedn.
@@ -1174,7 +1158,7 @@ urp_naming_conflict_removal ( Slapi_PBlock *pb, char *sessionid, CSN *opcsn, con
* is done after DB lock was released. The backend modrdn
* will acquire the DB lock if it sees this flag.
*/
- op_result = urp_fixup_rename_entry (min_naming_conflict_entry, newrdnstr, OP_FLAG_ACTION_INVOKE_FOR_REPLOP, txn);
+ op_result = urp_fixup_rename_entry (min_naming_conflict_entry, newrdnstr, OP_FLAG_ACTION_INVOKE_FOR_REPLOP);
if ( op_result != LDAP_SUCCESS )
{
slapi_log_error (slapi_log_urp, sessionid,
@@ -1189,7 +1173,7 @@ urp_naming_conflict_removal ( Slapi_PBlock *pb, char *sessionid, CSN *opcsn, con
* A fixup op will not invoke urp_modrdn_operation(). Even it does,
* urp_modrdn_operation() will do nothing because of the same CSN.
*/
- op_result = del_replconflict_attr (min_naming_conflict_entry, opcsn, OP_FLAG_ACTION_INVOKE_FOR_REPLOP, txn);
+ op_result = del_replconflict_attr (min_naming_conflict_entry, opcsn, OP_FLAG_ACTION_INVOKE_FOR_REPLOP);
if (op_result != LDAP_SUCCESS) {
slapi_log_error(SLAPI_LOG_REPL, sessionid,
"Failed to remove nsds5ReplConflict for %s, err=%d\n",
@@ -1293,7 +1277,7 @@ is_suffix_dn ( Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parentdn )
static int
mod_namingconflict_attr (const char *uniqueid, const Slapi_DN *entrysdn,
- const Slapi_DN *conflictsdn, CSN *opcsn, void *txn)
+ const Slapi_DN *conflictsdn, CSN *opcsn)
{
Slapi_Mods smods;
char buf[BUFSIZ];
@@ -1316,13 +1300,13 @@ mod_namingconflict_attr (const char *uniqueid, const Slapi_DN *entrysdn,
*/
slapi_mods_add (&smods, LDAP_MOD_REPLACE, ATTR_NSDS5_REPLCONFLICT, strlen(buf), buf);
}
- op_result = urp_fixup_modify_entry (uniqueid, entrysdn, opcsn, &smods, 0, txn);
+ op_result = urp_fixup_modify_entry (uniqueid, entrysdn, opcsn, &smods, 0);
slapi_mods_done (&smods);
return op_result;
}
static int
-del_replconflict_attr (Slapi_Entry *entry, CSN *opcsn, int opflags, void *txn)
+del_replconflict_attr (Slapi_Entry *entry, CSN *opcsn, int opflags)
{
Slapi_Attr *attr;
int op_result = 0;
@@ -1337,7 +1321,7 @@ del_replconflict_attr (Slapi_Entry *entry, CSN *opcsn, int opflags, void *txn)
entrysdn = slapi_entry_get_sdn_const (entry);
slapi_mods_init (&smods, 2);
slapi_mods_add (&smods, LDAP_MOD_DELETE, ATTR_NSDS5_REPLCONFLICT, 0, NULL);
- op_result = urp_fixup_modify_entry (uniqueid, entrysdn, opcsn, &smods, opflags, txn);
+ op_result = urp_fixup_modify_entry (uniqueid, entrysdn, opcsn, &smods, opflags);
slapi_mods_done (&smods);
}
return op_result;
diff --git a/ldap/servers/plugins/replication/urp.h b/ldap/servers/plugins/replication/urp.h
index 77ac8a4..2ca7ad2 100644
--- a/ldap/servers/plugins/replication/urp.h
+++ b/ldap/servers/plugins/replication/urp.h
@@ -57,10 +57,10 @@ int urp_modrdn_operation( Slapi_PBlock *pb );
int urp_post_modrdn_operation( Slapi_PBlock *pb );
/* urp internal ops */
-int urp_fixup_add_entry (Slapi_Entry *e, const char *target_uniqueid, const char *parentuniqueid, CSN *opcsn, int opflags, void *txn);
-int urp_fixup_delete_entry (const char *uniqueid, const char *dn, CSN *opcsn, int opflags, void *txn);
-int urp_fixup_rename_entry (Slapi_Entry *entry, const char *newrdn, int opflags, void *txn);
-int urp_fixup_modify_entry (const char *uniqueid, const Slapi_DN *sdn, CSN *opcsn, Slapi_Mods *smods, int opflags, void *txn);
+int urp_fixup_add_entry (Slapi_Entry *e, const char *target_uniqueid, const char *parentuniqueid, CSN *opcsn, int opflags);
+int urp_fixup_delete_entry (const char *uniqueid, const char *dn, CSN *opcsn, int opflags);
+int urp_fixup_rename_entry (Slapi_Entry *entry, const char *newrdn, int opflags);
+int urp_fixup_modify_entry (const char *uniqueid, const Slapi_DN *sdn, CSN *opcsn, Slapi_Mods *smods, int opflags);
int is_suffix_dn (Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parenddn);
@@ -69,7 +69,7 @@ int is_suffix_dn (Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parenddn);
*/
int is_glue_entry(const Slapi_Entry* entry);
int create_glue_entry ( Slapi_PBlock *pb, char *sessionid, Slapi_DN *dn, const char *uniqueid, CSN *opcsn );
-int entry_to_glue(char *sessionid, const Slapi_Entry* entry, const char *reason, CSN *opcsn, void *txn);
+int entry_to_glue(char *sessionid, const Slapi_Entry* entry, const char *reason, CSN *opcsn);
int glue_to_entry (Slapi_PBlock *pb, Slapi_Entry *entry );
PRBool get_glue_csn(const Slapi_Entry *entry, const CSN **gluecsn);
diff --git a/ldap/servers/plugins/replication/urp_glue.c b/ldap/servers/plugins/replication/urp_glue.c
index 499cb97..e51712c 100644
--- a/ldap/servers/plugins/replication/urp_glue.c
+++ b/ldap/servers/plugins/replication/urp_glue.c
@@ -92,7 +92,7 @@ get_glue_csn(const Slapi_Entry *entry, const CSN **gluecsn)
* Submit a Modify operation to turn the Entry into Glue.
*/
int
-entry_to_glue(char *sessionid, const Slapi_Entry* entry, const char *reason, CSN *opcsn, void *txn)
+entry_to_glue(char *sessionid, const Slapi_Entry* entry, const char *reason, CSN *opcsn)
{
int op_result = 0;
const char *dn;
@@ -135,7 +135,7 @@ entry_to_glue(char *sessionid, const Slapi_Entry* entry, const char *reason, CSN
if (slapi_mods_get_num_mods(&smods) > 0)
{
- op_result = urp_fixup_modify_entry (NULL, sdn, opcsn, &smods, 0, txn);
+ op_result = urp_fixup_modify_entry (NULL, sdn, opcsn, &smods, 0);
if (op_result == LDAP_SUCCESS)
{
slapi_log_error (slapi_log_urp, repl_plugin_name,
@@ -158,7 +158,7 @@ static const char *glue_entry =
"%s: %s\n"; /* Add why it's been created */
static int
-do_create_glue_entry(const Slapi_RDN *rdn, const Slapi_DN *superiordn, const char *uniqueid, const char *reason, CSN *opcsn, void *txn)
+do_create_glue_entry(const Slapi_RDN *rdn, const Slapi_DN *superiordn, const char *uniqueid, const char *reason, CSN *opcsn)
{
int op_result= LDAP_OPERATIONS_ERROR;
int rdnval_index = 0;
@@ -202,7 +202,7 @@ do_create_glue_entry(const Slapi_RDN *rdn, const Slapi_DN *superiordn, const cha
if ( e!=NULL )
{
slapi_entry_set_uniqueid (e, slapi_ch_strdup(uniqueid));
- op_result = urp_fixup_add_entry (e, NULL, NULL, opcsn, 0, txn);
+ op_result = urp_fixup_add_entry (e, NULL, NULL, opcsn, 0);
}
slapi_ch_free_string(&estr);
slapi_sdn_free(&sdn);
@@ -214,14 +214,12 @@ create_glue_entry ( Slapi_PBlock *pb, char *sessionid, Slapi_DN *dn, const char
{
int op_result;
const char *dnstr;
- void *txn = NULL;
if ( slapi_sdn_get_dn (dn) )
dnstr = slapi_sdn_get_dn (dn);
else
dnstr = "";
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
if ( NULL == uniqueid )
{
op_result = LDAP_OPERATIONS_ERROR;
@@ -241,7 +239,7 @@ create_glue_entry ( Slapi_PBlock *pb, char *sessionid, Slapi_DN *dn, const char
while(!done)
{
- op_result= do_create_glue_entry(rdn, superiordn, uniqueid, "missingEntry", opcsn, txn);
+ op_result= do_create_glue_entry(rdn, superiordn, uniqueid, "missingEntry", opcsn);
switch(op_result)
{
case LDAP_SUCCESS:
diff --git a/ldap/servers/plugins/replication/urp_tombstone.c b/ldap/servers/plugins/replication/urp_tombstone.c
index 7c36421..6dd9a2a 100644
--- a/ldap/servers/plugins/replication/urp_tombstone.c
+++ b/ldap/servers/plugins/replication/urp_tombstone.c
@@ -94,10 +94,6 @@ tombstone_to_glue_resolve_parent (
{
int op_result;
Slapi_PBlock *newpb= slapi_pblock_new();
- void *txn = NULL;
-
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
- slapi_pblock_set(newpb, SLAPI_TXN, txn);
slapi_search_internal_set_pb(
newpb,
slapi_sdn_get_dn(parentdn), /* JCM - This DN just identifies the backend to be searched. */
@@ -160,7 +156,6 @@ tombstone_to_glue (
Slapi_Entry *addingentry;
const char *addingdn;
int op_result;
- void *txn = NULL;
/* JCMREPL
* Nothing logged to the 5.0 Change Log
@@ -194,8 +189,7 @@ tombstone_to_glue (
slapi_entry_add_string(addingentry, ATTR_NSDS5_REPLCONFLICT, reason);
}
tombstoneuniqueid= slapi_entry_get_uniqueid(tombstoneentry);
- slapi_pblock_get (pb, SLAPI_TXN, &txn);
- op_result = urp_fixup_add_entry (addingentry, tombstoneuniqueid, parentuniqueid, opcsn, OP_FLAG_RESURECT_ENTRY, txn);
+ op_result = urp_fixup_add_entry (addingentry, tombstoneuniqueid, parentuniqueid, opcsn, OP_FLAG_RESURECT_ENTRY);
if (op_result == LDAP_SUCCESS)
{
slapi_log_error (slapi_log_urp, repl_plugin_name,
@@ -219,7 +213,6 @@ entry_to_tombstone ( Slapi_PBlock *pb, Slapi_Entry *entry )
CSN *opcsn;
const char *uniqueid;
int op_result = LDAP_SUCCESS;
- void *txn = NULL;
slapi_pblock_get ( pb, SLAPI_OPERATION, &op );
opcsn = operation_get_csn ( op );
@@ -234,10 +227,9 @@ entry_to_tombstone ( Slapi_PBlock *pb, Slapi_Entry *entry )
*/
slapi_mods_add ( &smods, LDAP_MOD_DELETE, ATTR_NSDS5_REPLCONFLICT, 0, NULL );
- slapi_pblock_get (pb, SLAPI_TXN, &txn);
op_result = urp_fixup_modify_entry (uniqueid,
slapi_entry_get_sdn_const (entry),
- opcsn, &smods, 0, txn);
+ opcsn, &smods, 0);
slapi_mods_done ( &smods );
/*
@@ -250,7 +242,7 @@ entry_to_tombstone ( Slapi_PBlock *pb, Slapi_Entry *entry )
* through the urp operations and trigger the recursive
* fixup if applicable.
*/
- op_result = urp_fixup_delete_entry (uniqueid, slapi_entry_get_dn_const (entry), opcsn, 0, txn);
+ op_result = urp_fixup_delete_entry (uniqueid, slapi_entry_get_dn_const (entry), opcsn, 0);
}
return op_result;
diff --git a/ldap/servers/plugins/retrocl/retrocl_po.c b/ldap/servers/plugins/retrocl/retrocl_po.c
index 729ffbb..29ce79f 100644
--- a/ldap/servers/plugins/retrocl/retrocl_po.c
+++ b/ldap/servers/plugins/retrocl/retrocl_po.c
@@ -178,15 +178,12 @@ write_replog_db(
changeNumber changenum;
int i;
int extensibleObject = 0;
- void *txn = NULL;
if (!dn) {
slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, "write_replog_db: NULL dn\n");
return;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
-
PR_Lock(retrocl_internal_lock);
changenum = retrocl_assign_changenumber();
@@ -364,7 +361,6 @@ write_replog_db(
slapi_add_entry_internal_set_pb( newPb, e, NULL /* controls */,
g_plg_identity[PLUGIN_RETROCL],
0 /* actions */ );
- slapi_pblock_set (newPb, SLAPI_TXN, txn);
slapi_add_internal_pb (newPb);
slapi_pblock_get( newPb, SLAPI_PLUGIN_INTOP_RESULT, &rc );
slapi_pblock_destroy(newPb);
diff --git a/ldap/servers/plugins/uiduniq/plugin-utils.h b/ldap/servers/plugins/uiduniq/plugin-utils.h
index 9c5eeb1..5cdd95b 100644
--- a/ldap/servers/plugins/uiduniq/plugin-utils.h
+++ b/ldap/servers/plugins/uiduniq/plugin-utils.h
@@ -87,10 +87,10 @@
int op_error(int internal_error);
Slapi_PBlock *readPblockAndEntry( const char *baseDN, const char *filter,
- char *attrs[], void *txn, void *pluginid );
+ char *attrs[] );
int entryHasObjectClass(Slapi_PBlock *pb, Slapi_Entry *e,
const char *objectClass);
-Slapi_PBlock *dnHasObjectClass( const char *baseDN, const char *objectClass, void *txn, void *pluginid );
-Slapi_PBlock *dnHasAttribute( const char *baseDN, const char *attrName, void *txn, void *pluginid );
+Slapi_PBlock *dnHasObjectClass( const char *baseDN, const char *objectClass );
+Slapi_PBlock *dnHasAttribute( const char *baseDN, const char *attrName );
#endif /* _PLUGIN_UTILS_H_ */
diff --git a/ldap/servers/plugins/uiduniq/uid.c b/ldap/servers/plugins/uiduniq/uid.c
index e1b855c..8bd5e17 100644
--- a/ldap/servers/plugins/uiduniq/uid.c
+++ b/ldap/servers/plugins/uiduniq/uid.c
@@ -70,7 +70,7 @@ int ldap_quote_filter_value(
static int search_one_berval(const char *baseDN, const char *attrName,
- const struct berval *value, const char *requiredObjectClass, const char *target, void *txn);
+ const struct berval *value, const char *requiredObjectClass, const char *target);
/*
* ISSUES:
@@ -226,7 +226,7 @@ create_filter(const char *attribute, const struct berval *value, const char *req
static int
search(const char *baseDN, const char *attrName, Slapi_Attr *attr,
struct berval **values, const char *requiredObjectClass,
- const char *target, void *txn)
+ const char *target)
{
int result;
@@ -260,7 +260,7 @@ search(const char *baseDN, const char *attrName, Slapi_Attr *attr,
{
result = search_one_berval(baseDN, attrName,
slapi_value_get_berval(v),
- requiredObjectClass, target, txn);
+ requiredObjectClass, target);
}
}
else
@@ -268,7 +268,7 @@ search(const char *baseDN, const char *attrName, Slapi_Attr *attr,
for (;*values != NULL && LDAP_SUCCESS == result; values++)
{
result = search_one_berval(baseDN, attrName, *values, requiredObjectClass,
- target, txn);
+ target);
}
}
@@ -284,7 +284,7 @@ search(const char *baseDN, const char *attrName, Slapi_Attr *attr,
static int
search_one_berval(const char *baseDN, const char *attrName,
const struct berval *value, const char *requiredObjectClass,
- const char *target, void *txn)
+ const char *target)
{
int result;
char *filter;
@@ -319,7 +319,6 @@ search_one_berval(const char *baseDN, const char *attrName,
slapi_search_internal_set_pb(spb, baseDN, LDAP_SCOPE_SUBTREE,
filter, attrs, 0 /* attrs only */, NULL, NULL, plugin_identity, 0 /* actions */);
- slapi_pblock_set(spb, SLAPI_TXN, txn);
slapi_search_internal_pb(spb);
err = slapi_pblock_get(spb, SLAPI_PLUGIN_INTOP_RESULT, &sres);
@@ -395,7 +394,7 @@ search_one_berval(const char *baseDN, const char *attrName,
static int
searchAllSubtrees(int argc, char *argv[], const char *attrName,
Slapi_Attr *attr, struct berval **values, const char *requiredObjectClass,
- const char *dn, void *txn)
+ const char *dn)
{
int result = LDAP_SUCCESS;
@@ -410,7 +409,7 @@ searchAllSubtrees(int argc, char *argv[], const char *attrName,
* worry about that here.
*/
if (slapi_dn_issuffix(dn, *argv)) {
- result = search(*argv, attrName, attr, values, requiredObjectClass, dn, txn);
+ result = search(*argv, attrName, attr, values, requiredObjectClass, dn);
if (result) break;
}
}
@@ -500,14 +499,14 @@ getArguments(Slapi_PBlock *pb, char **attrName, char **markerObjectClass,
static int
findSubtreeAndSearch(char *parentDN, const char *attrName, Slapi_Attr *attr,
struct berval **values, const char *requiredObjectClass, const char *target,
- const char *markerObjectClass, void *txn)
+ const char *markerObjectClass)
{
int result = LDAP_SUCCESS;
Slapi_PBlock *spb = NULL;
while (NULL != (parentDN = slapi_dn_parent(parentDN)))
{
- if ((spb = dnHasObjectClass(parentDN, markerObjectClass, txn, plugin_identity)))
+ if ((spb = dnHasObjectClass(parentDN, markerObjectClass)))
{
freePblock(spb);
/*
@@ -515,7 +514,7 @@ findSubtreeAndSearch(char *parentDN, const char *attrName, Slapi_Attr *attr,
* to have the attribute already.
*/
result = search(parentDN, attrName, attr, values, requiredObjectClass,
- target, txn);
+ target);
break;
}
}
@@ -555,7 +554,6 @@ preop_add(Slapi_PBlock *pb)
Slapi_Attr *attr;
int argc;
char **argv = NULL;
- void *txn = NULL;
/*
* If this is a replication update, just be a noop.
@@ -567,7 +565,6 @@ preop_add(Slapi_PBlock *pb)
break;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
/*
* Get the arguments
*/
@@ -634,12 +631,12 @@ preop_add(Slapi_PBlock *pb)
/* Subtree defined by location of marker object class */
result = findSubtreeAndSearch((char *)dn, attrName, attr, NULL,
requiredObjectClass, dn,
- markerObjectClass, txn);
+ markerObjectClass);
} else
{
/* Subtrees listed on invocation line */
result = searchAllSubtrees(argc, argv, attrName, attr, NULL,
- requiredObjectClass, dn, txn);
+ requiredObjectClass, dn);
}
END
@@ -711,7 +708,6 @@ preop_modify(Slapi_PBlock *pb)
int isupdatedn;
int argc;
char **argv = NULL;
- void *txn = NULL;
/*
* If this is a replication update, just be a noop.
@@ -723,7 +719,6 @@ preop_modify(Slapi_PBlock *pb)
break;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
/*
* Get the arguments
*/
@@ -785,7 +780,7 @@ preop_modify(Slapi_PBlock *pb)
* Check if it has the required object class
*/
if (requiredObjectClass &&
- !(spb = dnHasObjectClass(dn, requiredObjectClass, txn, plugin_identity))) {
+ !(spb = dnHasObjectClass(dn, requiredObjectClass))) {
break;
}
@@ -805,12 +800,12 @@ preop_modify(Slapi_PBlock *pb)
/* Subtree defined by location of marker object class */
result = findSubtreeAndSearch((char *)dn, attrName, NULL,
mod->mod_bvalues, requiredObjectClass,
- dn, markerObjectClass, txn);
+ dn, markerObjectClass);
} else
{
/* Subtrees listed on invocation line */
result = searchAllSubtrees(argc, argv, attrName, NULL,
- mod->mod_bvalues, requiredObjectClass, dn, txn);
+ mod->mod_bvalues, requiredObjectClass, dn);
}
}
END
@@ -871,7 +866,6 @@ preop_modrdn(Slapi_PBlock *pb)
Slapi_Attr *attr;
int argc;
char **argv = NULL;
- void *txn = NULL;
/*
* If this is a replication update, just be a noop.
@@ -883,7 +877,6 @@ preop_modrdn(Slapi_PBlock *pb)
break;
}
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
/*
* Get the arguments
*/
@@ -942,7 +935,7 @@ preop_modrdn(Slapi_PBlock *pb)
/* Get the entry that is being renamed so we can make a dummy copy
* of what it will look like after the rename. */
- err = slapi_search_internal_get_entry_ext(sdn, NULL, &e, plugin_identity, txn);
+ err = slapi_search_internal_get_entry(sdn, NULL, &e, plugin_identity);
if (err != LDAP_SUCCESS) {
result = uid_op_error(35);
/* We want to return a no such object error if the target doesn't exist. */
@@ -978,12 +971,12 @@ preop_modrdn(Slapi_PBlock *pb)
/* Subtree defined by location of marker object class */
result = findSubtreeAndSearch(slapi_entry_get_dn(e), attrName, attr, NULL,
requiredObjectClass, dn,
- markerObjectClass, txn);
+ markerObjectClass);
} else
{
/* Subtrees listed on invocation line */
result = searchAllSubtrees(argc, argv, attrName, attr, NULL,
- requiredObjectClass, dn, txn);
+ requiredObjectClass, dn);
}
END
/* Clean-up */
diff --git a/ldap/servers/plugins/uiduniq/utils.c b/ldap/servers/plugins/uiduniq/utils.c
index 567218a..4966089 100644
--- a/ldap/servers/plugins/uiduniq/utils.c
+++ b/ldap/servers/plugins/uiduniq/utils.c
@@ -82,22 +82,19 @@ op_error(int internal_error) {
*/
Slapi_PBlock *
readPblockAndEntry( const char *baseDN, const char *filter,
- char *attrs[], void *txn, void *pluginid ) {
+ char *attrs[] ) {
Slapi_PBlock *spb = NULL;
BEGIN
int sres;
- spb = slapi_pblock_new();
- if (!spb) {
+ /* Perform the search - the new pblock needs to be freed */
+ spb = slapi_search_internal((char *)baseDN, LDAP_SCOPE_BASE,
+ (char *)filter, NULL, attrs, 0);
+ if ( !spb ) {
op_error(20);
break;
}
- slapi_search_internal_set_pb (spb, baseDN, LDAP_SCOPE_BASE, filter,
- attrs, 0, NULL,
- NULL, pluginid, 0);
- slapi_pblock_set(spb, SLAPI_TXN, txn);
- slapi_search_internal_pb (spb);
if ( slapi_pblock_get( spb, SLAPI_PLUGIN_INTOP_RESULT, &sres ) ) {
op_error(21);
@@ -153,7 +150,7 @@ entryHasObjectClass(Slapi_PBlock *pb, Slapi_Entry *e,
* A pblock containing the entry, or NULL
*/
Slapi_PBlock *
-dnHasObjectClass( const char *baseDN, const char *objectClass, void *txn, void *pluginid ) {
+dnHasObjectClass( const char *baseDN, const char *objectClass ) {
char *filter = NULL;
Slapi_PBlock *spb = NULL;
@@ -165,7 +162,7 @@ dnHasObjectClass( const char *baseDN, const char *objectClass, void *txn, void *
attrs[0] = "objectclass";
attrs[1] = NULL;
filter = PR_smprintf("objectclass=%s", objectClass );
- if ( !(spb = readPblockAndEntry( baseDN, filter, attrs, txn, pluginid ) ) ) {
+ if ( !(spb = readPblockAndEntry( baseDN, filter, attrs) ) ) {
break;
}
@@ -199,7 +196,7 @@ dnHasObjectClass( const char *baseDN, const char *objectClass, void *txn, void *
* The entry, or NULL
*/
Slapi_PBlock *
-dnHasAttribute( const char *baseDN, const char *attrName, void *txn, void *pluginid ) {
+dnHasAttribute( const char *baseDN, const char *attrName ) {
Slapi_PBlock *spb = NULL;
char *filter = NULL;
@@ -212,16 +209,12 @@ dnHasAttribute( const char *baseDN, const char *attrName, void *txn, void *plugi
attrs[0] = (char *)attrName;
attrs[1] = NULL;
filter = PR_smprintf( "%s=*", attrName );
- spb = slapi_pblock_new();
- if (!spb) {
+ spb = slapi_search_internal((char *)baseDN, LDAP_SCOPE_BASE,
+ filter, NULL, attrs, 0);
+ if ( !spb ) {
op_error(20);
break;
}
- slapi_search_internal_set_pb (spb, baseDN, LDAP_SCOPE_BASE, filter,
- attrs, 0, NULL,
- NULL, pluginid, 0);
- slapi_pblock_set(spb, SLAPI_TXN, txn);
- slapi_search_internal_pb (spb);
if ( slapi_pblock_get( spb, SLAPI_PLUGIN_INTOP_RESULT, &sres ) ) {
op_error(21);
diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c
index c346a6a..7ec9ff9 100644
--- a/ldap/servers/slapd/modify.c
+++ b/ldap/servers/slapd/modify.c
@@ -1046,7 +1046,6 @@ static int op_shared_allow_pw_change (Slapi_PBlock *pb, LDAPMod *mod, char **old
char *proxydn = NULL;
char *proxystr = NULL;
char *errtext = NULL;
- void *txn = NULL;
slapi_pblock_get (pb, SLAPI_IS_REPLICATED_OPERATION, &repl_op);
if (repl_op) {
@@ -1061,7 +1060,6 @@ static int op_shared_allow_pw_change (Slapi_PBlock *pb, LDAPMod *mod, char **old
slapi_pblock_get (pb, SLAPI_OPERATION, &operation);
slapi_pblock_get (pb, SLAPI_PWPOLICY, &pwresponse_req);
internal_op= operation_is_flag_set(operation, OP_FLAG_INTERNAL);
- slapi_pblock_get (pb, SLAPI_TXN, &txn);
slapi_sdn_init_dn_byref (&sdn, dn);
pwpolicy = new_passwdPolicy(pb, (char *)slapi_sdn_get_ndn(&sdn));
@@ -1091,7 +1089,7 @@ static int op_shared_allow_pw_change (Slapi_PBlock *pb, LDAPMod *mod, char **old
mods[1] = NULL;
/* We need to actually fetch the target here to use for ACI checking. */
- slapi_search_internal_get_entry_ext(&sdn, NULL, &e, (void *)plugin_get_default_component_id(), txn);
+ slapi_search_internal_get_entry(&sdn, NULL, &e, (void *)plugin_get_default_component_id());
/* Create a bogus entry with just the target dn if we were unable to
* find the actual entry. This will only be used for checking the ACIs. */
diff --git a/ldap/servers/slapd/passwd_extop.c b/ldap/servers/slapd/passwd_extop.c
index c05dd81..c77d3b7 100644
--- a/ldap/servers/slapd/passwd_extop.c
+++ b/ldap/servers/slapd/passwd_extop.c
@@ -153,7 +153,6 @@ passwd_apply_mods(Slapi_PBlock *pb_orig, const Slapi_DN *sdn, Slapi_Mods *mods,
LDAPControl **req_controls_copy = NULL;
LDAPControl **pb_resp_controls = NULL;
int ret=0;
- void *txn = NULL;
LDAPDebug( LDAP_DEBUG_TRACE, "=> passwd_apply_mods\n", 0, 0, 0 );
@@ -180,9 +179,6 @@ passwd_apply_mods(Slapi_PBlock *pb_orig, const Slapi_DN *sdn, Slapi_Mods *mods,
* that it was done by the root DN. */
pb.pb_conn = pb_orig->pb_conn;
- slapi_pblock_get(pb_orig, SLAPI_TXN, &txn);
- slapi_pblock_set(&pb, SLAPI_TXN, txn);
-
ret =slapi_modify_internal_pb (&pb);
/* We now clean up the connection that we copied into the
diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h
index 01ca512..d7057a1 100644
--- a/ldap/servers/slapd/proto-slap.h
+++ b/ldap/servers/slapd/proto-slap.h
@@ -868,7 +868,6 @@ void pw_add_allowchange_aci(Slapi_Entry *e, int pw_prohibit_change);
*/
int update_pw_retry ( Slapi_PBlock *pb );
void pw_apply_mods(const Slapi_DN *sdn, Slapi_Mods *mods);
-void pw_apply_mods_ext(const Slapi_DN *sdn, Slapi_Mods *mods, void *txn);
void pw_set_componentID(struct slapi_componentid * cid);
struct slapi_componentid * pw_get_componentID();
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index 2a7b29b..3bc7334 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -593,9 +593,7 @@ update_pw_info ( Slapi_PBlock *pb , char *old_pw) {
passwdPolicy *pwpolicy = NULL;
int internal_op = 0;
Slapi_Operation *operation = NULL;
- void *txn = NULL;
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
slapi_pblock_get(pb, SLAPI_OPERATION, &operation);
internal_op = slapi_operation_is_flag_set(operation, SLAPI_OP_FLAG_INTERNAL);
@@ -668,7 +666,7 @@ update_pw_info ( Slapi_PBlock *pb , char *old_pw) {
} else if (prev_exp_date == SLAPD_END_TIME) {
/* Special entries' passwords never expire */
slapi_ch_free((void**)&prev_exp_date_str);
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
slapi_mods_done(&smods);
delete_passwdPolicy(&pwpolicy);
return 0;
@@ -685,7 +683,7 @@ update_pw_info ( Slapi_PBlock *pb , char *old_pw) {
*/
pw_exp_date = NOT_FIRST_TIME;
} else {
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
slapi_mods_done(&smods);
delete_passwdPolicy(&pwpolicy);
return 0;
@@ -699,7 +697,7 @@ update_pw_info ( Slapi_PBlock *pb , char *old_pw) {
slapi_mods_add_string(&smods, LDAP_MOD_REPLACE, "passwordExpWarned", "0");
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
slapi_mods_done(&smods);
if (pb->pb_conn) { /* no conn for internal op */
/* reset c_needpw to 0 */
@@ -1082,7 +1080,6 @@ update_pw_history( Slapi_PBlock *pb, const Slapi_DN *sdn, char *old_pw )
char *str;
passwdPolicy *pwpolicy = NULL;
const char *dn = slapi_sdn_get_dn(sdn);
- void *txn = NULL;
pwpolicy = new_passwdPolicy(pb, dn);
@@ -1141,10 +1138,8 @@ update_pw_history( Slapi_PBlock *pb, const Slapi_DN *sdn, char *old_pw )
list_of_mods[1] = NULL;
pblock_init(&mod_pb);
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
slapi_modify_internal_set_pb_ext(&mod_pb, sdn, list_of_mods, NULL, NULL,
pw_get_componentID(), 0);
- slapi_pblock_set(&mod_pb, SLAPI_TXN, txn);
slapi_modify_internal_pb(&mod_pb);
slapi_pblock_get(&mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
if (res != LDAP_SUCCESS){
diff --git a/ldap/servers/slapd/pw_mgmt.c b/ldap/servers/slapd/pw_mgmt.c
index 28b0491..8d99879 100644
--- a/ldap/servers/slapd/pw_mgmt.c
+++ b/ldap/servers/slapd/pw_mgmt.c
@@ -67,9 +67,7 @@ need_new_pw( Slapi_PBlock *pb, long *t, Slapi_Entry *e, int pwresponse_req )
passwdPolicy *pwpolicy = NULL;
int pwdGraceUserTime = 0;
char graceUserTime[8];
- void *txn = NULL;
- slapi_pblock_get(pb, SLAPI_TXN, &txn);
slapi_mods_init (&smods, 0);
sdn = slapi_entry_get_sdn_const( e );
dn = slapi_entry_get_ndn( e );
@@ -104,9 +102,9 @@ need_new_pw( Slapi_PBlock *pb, long *t, Slapi_Entry *e, int pwresponse_req )
slapi_ch_free((void **)×tring);
slapi_mods_add_string(&smods, LDAP_MOD_REPLACE, "passwordExpWarned", "0");
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
} else if (pwpolicy->pw_lockout == 1) {
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
}
slapi_mods_done(&smods);
delete_passwdPolicy(&pwpolicy);
@@ -152,7 +150,7 @@ skip:
}
slapi_add_pwd_control ( pb, LDAP_CONTROL_PWEXPIRED, 0);
}
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
slapi_mods_done(&smods);
delete_passwdPolicy(&pwpolicy);
return ( 0 );
@@ -175,7 +173,7 @@ skip:
sprintf ( graceUserTime, "%d", pwdGraceUserTime );
slapi_mods_add_string(&smods, LDAP_MOD_REPLACE,
"passwordGraceUserTime", graceUserTime);
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
slapi_mods_done(&smods);
if (pwresponse_req) {
/* check for "changeafterreset" condition */
@@ -218,7 +216,7 @@ skip:
pb->pb_op->o_opid, SLAPD_DISCONNECT_UNBIND, 0);
}
/* Apply current modifications */
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
slapi_mods_done(&smods);
delete_passwdPolicy(&pwpolicy);
return (-1);
@@ -265,7 +263,7 @@ skip:
*t = (long)diff_t; /* jcm: had to cast double to long */
}
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
slapi_mods_done(&smods);
if (pwresponse_req) {
/* check for "changeafterreset" condition */
@@ -285,7 +283,7 @@ skip:
return (2);
}
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
slapi_mods_done(&smods);
/* Leftover from "changeafterreset" condition */
if (pb->pb_conn->c_needpw == 1) {
diff --git a/ldap/servers/slapd/pw_retry.c b/ldap/servers/slapd/pw_retry.c
index 48849fb..5244622 100644
--- a/ldap/servers/slapd/pw_retry.c
+++ b/ldap/servers/slapd/pw_retry.c
@@ -130,9 +130,7 @@ void set_retry_cnt_and_time ( Slapi_PBlock *pb, int count, time_t cur_time ) {
time_t reset_time;
char *timestr;
passwdPolicy *pwpolicy = NULL;
- void *txn = NULL;
- slapi_pblock_get( pb, SLAPI_TXN, &txn );
slapi_pblock_get( pb, SLAPI_TARGET_SDN, &sdn );
dn = slapi_sdn_get_dn(sdn);
pwpolicy = new_passwdPolicy(pb, dn);
@@ -148,7 +146,7 @@ void set_retry_cnt_and_time ( Slapi_PBlock *pb, int count, time_t cur_time ) {
set_retry_cnt_mods(pb, &smods, count);
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
slapi_mods_done(&smods);
delete_passwdPolicy(&pwpolicy);
}
@@ -195,13 +193,11 @@ void set_retry_cnt ( Slapi_PBlock *pb, int count)
{
Slapi_DN *sdn = NULL;
Slapi_Mods smods;
- void *txn = NULL;
-
- slapi_pblock_get( pb, SLAPI_TXN, &txn );
+
slapi_pblock_get( pb, SLAPI_TARGET_SDN, &sdn );
slapi_mods_init(&smods, 0);
set_retry_cnt_mods(pb, &smods, count);
- pw_apply_mods_ext(sdn, &smods, txn);
+ pw_apply_mods(sdn, &smods);
slapi_mods_done(&smods);
}
@@ -212,7 +208,6 @@ Slapi_Entry *get_entry ( Slapi_PBlock *pb, const char *dn)
Slapi_Entry *retentry = NULL;
Slapi_DN *target_sdn = NULL;
Slapi_DN sdn;
- void *txn = NULL;
if (NULL == pb) {
LDAPDebug(LDAP_DEBUG_ANY, "get_entry - no pblock specified.\n",
@@ -221,7 +216,6 @@ Slapi_Entry *get_entry ( Slapi_PBlock *pb, const char *dn)
}
slapi_pblock_get( pb, SLAPI_TARGET_SDN, &target_sdn );
- slapi_pblock_get( pb, SLAPI_TXN, &txn );
if (dn == NULL) {
dn = slapi_sdn_get_dn(target_sdn);
@@ -238,9 +232,9 @@ Slapi_Entry *get_entry ( Slapi_PBlock *pb, const char *dn)
target_sdn = &sdn;
}
- search_result = slapi_search_internal_get_entry_ext(target_sdn, NULL,
- &retentry,
- pw_get_componentID(), txn);
+ search_result = slapi_search_internal_get_entry(target_sdn, NULL,
+ &retentry,
+ pw_get_componentID());
if (search_result != LDAP_SUCCESS) {
LDAPDebug (LDAP_DEBUG_TRACE, "WARNING: 'get_entry' can't find entry '%s', err %d\n", dn, search_result, 0);
}
@@ -250,7 +244,7 @@ bail:
}
void
-pw_apply_mods_ext(const Slapi_DN *sdn, Slapi_Mods *mods, void *txn)
+pw_apply_mods(const Slapi_DN *sdn, Slapi_Mods *mods)
{
Slapi_PBlock pb;
int res;
@@ -266,7 +260,6 @@ pw_apply_mods_ext(const Slapi_DN *sdn, Slapi_Mods *mods, void *txn)
NULL, /* UniqueID */
pw_get_componentID(), /* PluginID */
OP_FLAG_SKIP_MODIFIED_ATTRS); /* Flags */
- slapi_pblock_set(&pb, SLAPI_TXN, txn);
slapi_modify_internal_pb (&pb);
slapi_pblock_get(&pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
@@ -282,11 +275,6 @@ pw_apply_mods_ext(const Slapi_DN *sdn, Slapi_Mods *mods, void *txn)
return;
}
-void
-pw_apply_mods(const Slapi_DN *sdn, Slapi_Mods *mods)
-{
- pw_apply_mods_ext(sdn, mods, NULL);
-}
/* Handle the component ID for the password policy */
static struct slapi_componentid * pw_componentid = NULL;
commit 9c0c0aa09d573f67cab4ef2cd0ac10edc9bed694
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Thu Feb 16 12:51:23 2012 -0700
Revert "Ticket #111 - ability to control behavior of modifyTimestamp/modifiersName"
This reverts commit f7b882a8eebf62f15a7802ae4048c8153575d11e.
This is a partial revert. We still want to keep the new config parameter,
we just don't want to have to change the plugins in any way. We will
come up with a new mechanism for keeping track of the original requestor
DN, most likely a scheme using Thread Local Storage (TLS).
diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c
index 06f27bd..92d5ae6 100644
--- a/ldap/servers/plugins/automember/automember.c
+++ b/ldap/servers/plugins/automember/automember.c
@@ -103,8 +103,8 @@ static struct automemberRegexRule *automember_parse_regex_rule(char *rule_string
static void automember_free_regex_rule(struct automemberRegexRule *rule);
static int automember_parse_grouping_attr(char *value, char **grouping_attr,
char **grouping_value);
-static void automember_update_membership(Slapi_PBlock *pb, struct configEntry *config, Slapi_Entry *e, void *txn);
-static void automember_add_member_value(Slapi_PBlock *pb, Slapi_Entry *member_e, const char *group_dn,
+static void automember_update_membership(struct configEntry *config, Slapi_Entry *e, void *txn);
+static void automember_add_member_value(Slapi_Entry *member_e, const char *group_dn,
char *grouping_attr, char *grouping_value, void *txn);
/*
@@ -1347,7 +1347,7 @@ automember_parse_grouping_attr(char *value, char **grouping_attr, char **groupin
* the rules in config, then performs the updates.
*/
static void
-automember_update_membership(Slapi_PBlock *pb, struct configEntry *config, Slapi_Entry *e, void *txn)
+automember_update_membership(struct configEntry *config, Slapi_Entry *e, void *txn)
{
PRCList *rule = NULL;
struct automemberRegexRule *curr_rule = NULL;
@@ -1500,14 +1500,14 @@ automember_update_membership(Slapi_PBlock *pb, struct configEntry *config, Slapi
if (PR_CLIST_IS_EMPTY(&targets)) {
/* Add to each default group. */
for (i = 0; config->default_groups && config->default_groups[i]; i++) {
- automember_add_member_value(pb, e, config->default_groups[i],
+ automember_add_member_value(e, config->default_groups[i],
config->grouping_attr, config->grouping_value, txn);
}
} else {
/* Update the target groups. */
dnitem = (struct automemberDNListItem *)PR_LIST_HEAD(&targets);
while ((PRCList *)dnitem != &targets) {
- automember_add_member_value(pb, e, slapi_sdn_get_dn(dnitem->dn),
+ automember_add_member_value(e, slapi_sdn_get_dn(dnitem->dn),
config->grouping_attr, config->grouping_value, txn);
dnitem = (struct automemberDNListItem *)PR_NEXT_LINK((PRCList *)dnitem);
}
@@ -1535,10 +1535,10 @@ automember_update_membership(Slapi_PBlock *pb, struct configEntry *config, Slapi
* Adds a member entry to a group.
*/
static void
-automember_add_member_value(Slapi_PBlock *pb, Slapi_Entry *member_e, const char *group_dn,
+automember_add_member_value(Slapi_Entry *member_e, const char *group_dn,
char *grouping_attr, char *grouping_value, void *txn)
{
- Slapi_PBlock *mod_pb = slapi_pblock_new_by_pb(pb);
+ Slapi_PBlock *mod_pb = slapi_pblock_new();
int result = LDAP_SUCCESS;
LDAPMod mod;
LDAPMod *mods[2];
@@ -1826,7 +1826,7 @@ automember_add_post_op(Slapi_PBlock *pb)
if (slapi_dn_issuffix(slapi_sdn_get_dn(sdn), config->scope) &&
(slapi_filter_test_simple(e, config->filter) == 0)) {
/* Find out what membership changes are needed and make them. */
- automember_update_membership(pb, config, e, txn);
+ automember_update_membership(config, e, txn);
}
list = PR_NEXT_LINK(list);
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index efb2de4..a422055 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -216,7 +216,7 @@ static int dna_exop_init(Slapi_PBlock * pb);
* Local operation functions
*
*/
-static int dna_load_plugin_config(Slapi_PBlock *pb);
+static int dna_load_plugin_config();
static int dna_parse_config_entry(Slapi_Entry * e, int apply);
static void dna_delete_config();
static void dna_free_config_entry(struct configEntry ** entry);
@@ -230,26 +230,26 @@ static int dna_load_host_port();
static char *dna_get_dn(Slapi_PBlock * pb);
static Slapi_DN *dna_get_sdn(Slapi_PBlock * pb);
static int dna_dn_is_config(char *dn);
-static int dna_get_next_value(Slapi_PBlock *pb, struct configEntry * config_entry,
+static int dna_get_next_value(struct configEntry * config_entry,
char **next_value_ret, void *txn);
static int dna_first_free_value(struct configEntry *config_entry,
PRUint64 *newval, void *txn);
-static int dna_fix_maxval(Slapi_PBlock *pb, struct configEntry *config_entry, void *txn);
-static void dna_notice_allocation(Slapi_PBlock *pb, struct configEntry *config_entry,
+static int dna_fix_maxval(struct configEntry *config_entry, void *txn);
+static void dna_notice_allocation(struct configEntry *config_entry,
PRUint64 new, PRUint64 last, int fix, void *txn);
-static int dna_update_shared_config(Slapi_PBlock *pb, struct configEntry * config_entry, void *txn);
+static int dna_update_shared_config(struct configEntry * config_entry, void *txn);
static void dna_update_config_event(time_t event_time, void *arg);
static int dna_get_shared_servers(struct configEntry *config_entry, PRCList **servers, void *txn);
static void dna_free_shared_server(struct dnaServer **server);
static void dna_delete_shared_servers(PRCList **servers);
-static int dna_release_range(Slapi_PBlock *pb, char *range_dn, PRUint64 *lower, PRUint64 *upper);
+static int dna_release_range(char *range_dn, PRUint64 *lower, PRUint64 *upper);
static int dna_request_range(struct configEntry *config_entry,
struct dnaServer *server,
PRUint64 *lower, PRUint64 *upper);
static struct berval *dna_create_range_request(char *range_dn);
-static int dna_update_next_range(Slapi_PBlock *pb, struct configEntry *config_entry,
+static int dna_update_next_range(struct configEntry *config_entry,
PRUint64 lower, PRUint64 upper, void *txn);
-static int dna_activate_next_range(Slapi_PBlock *pb, struct configEntry *config_entry, void *txn);
+static int dna_activate_next_range(struct configEntry *config_entry, void *txn);
static int dna_is_replica_bind_dn(char *range_dn, char *bind_dn);
static int dna_get_replica_bind_creds(char *range_dn, struct dnaServer *server,
char **bind_dn, char **bind_passwd,
@@ -589,7 +589,7 @@ dna_start(Slapi_PBlock * pb)
slapi_ch_calloc(1, sizeof(struct configEntry));
PR_INIT_CLIST(dna_global_config);
- if (dna_load_plugin_config(pb) != DNA_SUCCESS) {
+ if (dna_load_plugin_config() != DNA_SUCCESS) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_start: unable to load plug-in configuration\n");
return DNA_FAILURE;
@@ -657,7 +657,7 @@ done:
* ------ cn=etc etc
*/
static int
-dna_load_plugin_config(Slapi_PBlock *pb)
+dna_load_plugin_config()
{
int status = DNA_SUCCESS;
int result;
@@ -665,14 +665,13 @@ dna_load_plugin_config(Slapi_PBlock *pb)
time_t now;
Slapi_PBlock *search_pb;
Slapi_Entry **entries = NULL;
- char *dn = NULL;
slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_load_plugin_config\n");
dna_write_lock();
dna_delete_config();
- slapi_pblock_get(pb, SLAPI_REQUESTOR_DN, &dn);
+
search_pb = slapi_pblock_new();
slapi_search_internal_set_pb(search_pb, getPluginDN(),
@@ -705,9 +704,8 @@ dna_load_plugin_config(Slapi_PBlock *pb)
* performing the operation at this point when
* starting up would cause the change to not
* get changelogged. */
-
time(&now);
- slapi_eq_once(dna_update_config_event, (void *)slapi_ch_strdup(dn), now + 30);
+ slapi_eq_once(dna_update_config_event, NULL, now + 30);
cleanup:
slapi_free_search_results_internal(search_pb);
@@ -1274,7 +1272,6 @@ dna_update_config_event(time_t event_time, void *arg)
Slapi_PBlock *pb = NULL;
struct configEntry *config_entry = NULL;
PRCList *list = NULL;
- char *binddn = (char *)arg;
/* Get read lock to prevent config changes */
dna_read_lock();
@@ -1291,11 +1288,9 @@ dna_update_config_event(time_t event_time, void *arg)
/* Create the pblock. We'll reuse this for all
* shared config updates. */
- if ((pb = slapi_pblock_new_by_pb(NULL)) == NULL)
+ if ((pb = slapi_pblock_new()) == NULL)
goto bail;
- slapi_pblock_set(pb, SLAPI_REQUESTOR_DN, binddn);
-
while (list != dna_global_config) {
config_entry = (struct configEntry *) list;
@@ -1313,7 +1308,7 @@ dna_update_config_event(time_t event_time, void *arg)
slapi_delete_internal_pb(pb);
/* Now force the entry to be recreated */
- dna_update_shared_config(pb, config_entry, NULL);
+ dna_update_shared_config(config_entry, NULL);
slapi_unlock_mutex(config_entry->lock);
slapi_pblock_init(pb);
@@ -1325,7 +1320,6 @@ dna_update_config_event(time_t event_time, void *arg)
bail:
dna_unlock();
- slapi_ch_free((void **)&binddn);
slapi_pblock_destroy(pb);
}
@@ -1342,7 +1336,7 @@ bail:
* The lock for configEntry should be obtained
* before calling this function.
*/
-static int dna_fix_maxval(Slapi_PBlock *pb, struct configEntry *config_entry, void *txn)
+static int dna_fix_maxval(struct configEntry *config_entry, void *txn)
{
PRCList *servers = NULL;
PRCList *server = NULL;
@@ -1357,7 +1351,7 @@ static int dna_fix_maxval(Slapi_PBlock *pb, struct configEntry *config_entry, vo
/* If we already have a next range we only need
* to activate it. */
if (config_entry->next_range_lower != 0) {
- ret = dna_activate_next_range(pb, config_entry, txn);
+ ret = dna_activate_next_range(config_entry, txn);
if (ret != 0) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_fix_maxval: Unable to activate the "
@@ -1381,7 +1375,7 @@ static int dna_fix_maxval(Slapi_PBlock *pb, struct configEntry *config_entry, vo
} else {
/* Someone provided us with a new range. Attempt
* to update the config. */
- if ((ret = dna_update_next_range(pb, config_entry, lower, upper, txn)) == 0) {
+ if ((ret = dna_update_next_range(config_entry, lower, upper, txn)) == 0) {
break;
}
}
@@ -1412,7 +1406,7 @@ bail:
* The lock for configEntry should be obtained before calling
* this function. */
static void
-dna_notice_allocation(Slapi_PBlock *pb, struct configEntry *config_entry, PRUint64 new,
+dna_notice_allocation(struct configEntry *config_entry, PRUint64 new,
PRUint64 last, int fix, void *txn)
{
/* update our cached config entry */
@@ -1427,7 +1421,7 @@ dna_notice_allocation(Slapi_PBlock *pb, struct configEntry *config_entry, PRUint
* new active range. */
if (config_entry->next_range_lower != 0) {
/* Make the next range active */
- if (dna_activate_next_range(pb, config_entry, txn) != 0) {
+ if (dna_activate_next_range(config_entry, txn) != 0) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_notice_allocation: Unable to activate "
"the next range for range %s.\n", config_entry->dn);
@@ -1435,7 +1429,7 @@ dna_notice_allocation(Slapi_PBlock *pb, struct configEntry *config_entry, PRUint
} else {
config_entry->remaining = 0;
/* update the shared configuration */
- dna_update_shared_config(pb, config_entry, txn);
+ dna_update_shared_config(config_entry, txn);
}
} else {
if (config_entry->next_range_lower != 0) {
@@ -1448,7 +1442,7 @@ dna_notice_allocation(Slapi_PBlock *pb, struct configEntry *config_entry, PRUint
}
/* update the shared configuration */
- dna_update_shared_config(pb, config_entry, txn);
+ dna_update_shared_config(config_entry, txn);
}
/* Check if we passed the threshold and try to fix maxval if so. We
@@ -1460,7 +1454,7 @@ dna_notice_allocation(Slapi_PBlock *pb, struct configEntry *config_entry, PRUint
config_entry->threshold, config_entry->dn, config_entry->remaining);
/* Only attempt to fix maxval if the fix flag is set. */
if (fix != 0) {
- dna_fix_maxval(pb, config_entry, txn);
+ dna_fix_maxval(config_entry, txn);
}
}
@@ -2059,7 +2053,7 @@ cleanup:
* Perform ldap operationally atomic increment
* Return the next value to be assigned
*/
-static int dna_get_next_value(Slapi_PBlock *origpb, struct configEntry *config_entry,
+static int dna_get_next_value(struct configEntry *config_entry,
char **next_value_ret, void *txn)
{
Slapi_PBlock *pb = NULL;
@@ -2085,7 +2079,7 @@ static int dna_get_next_value(Slapi_PBlock *origpb, struct configEntry *config_e
/* check if we overflowed the configured range */
if (setval > config_entry->maxval) {
/* try for a new range or fail */
- ret = dna_fix_maxval(pb, config_entry, txn);
+ ret = dna_fix_maxval(config_entry, txn);
if (LDAP_SUCCESS != ret) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
"dna_get_next_value: no more values available!!\n");
@@ -2121,7 +2115,7 @@ static int dna_get_next_value(Slapi_PBlock *origpb, struct configEntry *config_e
mods[0] = &mod_replace;
mods[1] = 0;
- pb = slapi_pblock_new_by_pb(origpb);
+ pb = slapi_pblock_new();
if (NULL == pb) {
ret = LDAP_OPERATIONS_ERROR;
goto done;
@@ -2145,7 +2139,7 @@ static int dna_get_next_value(Slapi_PBlock *origpb, struct configEntry *config_e
}
/* update our cached config */
- dna_notice_allocation(pb, config_entry, nextval, setval, 1, txn);
+ dna_notice_allocation(config_entry, nextval, setval, 1, txn);
}
done:
@@ -2171,7 +2165,7 @@ static int dna_get_next_value(Slapi_PBlock *origpb, struct configEntry *config_e
* before calling this function.
* */
static int
-dna_update_shared_config(Slapi_PBlock *origpb, struct configEntry * config_entry, void *txn)
+dna_update_shared_config(struct configEntry * config_entry, void *txn)
{
int ret = LDAP_SUCCESS;
@@ -2197,7 +2191,7 @@ dna_update_shared_config(Slapi_PBlock *origpb, struct configEntry * config_entry
mods[0] = &mod_replace;
mods[1] = 0;
- pb = slapi_pblock_new_by_pb(origpb);
+ pb = slapi_pblock_new();
if (NULL == pb) {
ret = LDAP_OPERATIONS_ERROR;
} else {
@@ -2246,6 +2240,7 @@ dna_update_shared_config(Slapi_PBlock *origpb, struct configEntry * config_entry
}
slapi_pblock_destroy(pb);
+ pb = NULL;
}
}
@@ -2262,7 +2257,7 @@ dna_update_shared_config(Slapi_PBlock *origpb, struct configEntry * config_entry
* before calling this function.
*/
static int
-dna_update_next_range(Slapi_PBlock *origpb, struct configEntry *config_entry,
+dna_update_next_range(struct configEntry *config_entry,
PRUint64 lower, PRUint64 upper, void *txn)
{
Slapi_PBlock *pb = NULL;
@@ -2286,7 +2281,7 @@ dna_update_next_range(Slapi_PBlock *origpb, struct configEntry *config_entry,
mods[0] = &mod_replace;
mods[1] = 0;
- pb = slapi_pblock_new_by_pb(origpb);
+ pb = slapi_pblock_new();
if (NULL == pb) {
ret = LDAP_OPERATIONS_ERROR;
goto bail;
@@ -2300,6 +2295,7 @@ dna_update_next_range(Slapi_PBlock *origpb, struct configEntry *config_entry,
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
slapi_pblock_destroy(pb);
+ pb = NULL;
if (ret != LDAP_SUCCESS) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
@@ -2309,7 +2305,7 @@ dna_update_next_range(Slapi_PBlock *origpb, struct configEntry *config_entry,
/* update the cached config and the shared config */
config_entry->next_range_lower = lower;
config_entry->next_range_upper = upper;
- dna_notice_allocation(pb, config_entry, 0, 0, 0, txn);
+ dna_notice_allocation(config_entry, 0, 0, 0, txn);
}
bail:
@@ -2326,9 +2322,9 @@ bail:
* be obtained before calling this function.
*/
static int
-dna_activate_next_range(Slapi_PBlock *pb, struct configEntry *config_entry, void *txn)
+dna_activate_next_range(struct configEntry *config_entry, void *txn)
{
- Slapi_PBlock *mod_pb = NULL;
+ Slapi_PBlock *pb = NULL;
LDAPMod mod_maxval;
LDAPMod mod_nextval;
LDAPMod mod_nextrange;
@@ -2367,20 +2363,21 @@ dna_activate_next_range(Slapi_PBlock *pb, struct configEntry *config_entry, void
mods[3] = 0;
/* Update the config entry first */
- mod_pb = slapi_pblock_new_by_pb(pb);
- if (NULL == mod_pb) {
+ pb = slapi_pblock_new();
+ if (NULL == pb) {
ret = LDAP_OPERATIONS_ERROR;
goto bail;
}
- slapi_modify_internal_set_pb(mod_pb, config_entry->dn,
+ slapi_modify_internal_set_pb(pb, config_entry->dn,
mods, 0, 0, getPluginID(), 0);
- slapi_pblock_set(mod_pb, SLAPI_TXN, txn);
- slapi_modify_internal_pb(mod_pb);
+ slapi_pblock_set(pb, SLAPI_TXN, txn);
+ slapi_modify_internal_pb(pb);
- slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
+ slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &ret);
- slapi_pblock_destroy(mod_pb);
+ slapi_pblock_destroy(pb);
+ pb = NULL;
if (ret != LDAP_SUCCESS) {
slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM,
@@ -2395,7 +2392,7 @@ dna_activate_next_range(Slapi_PBlock *pb, struct configEntry *config_entry, void
config_entry->remaining = ((config_entry->maxval - config_entry->nextval + 1) /
config_entry->interval);
/* update the shared configuration */
- dna_update_shared_config(pb, config_entry, txn);
+ dna_update_shared_config(config_entry, txn);
}
bail:
@@ -3105,7 +3102,7 @@ static int dna_pre_op(Slapi_PBlock * pb, int modtype)
int len;
/* create the value to add */
- ret = dna_get_next_value(pb, config_entry, &value, txn);
+ ret = dna_get_next_value(config_entry, &value, txn);
if (DNA_SUCCESS != ret) {
errstr = slapi_ch_smprintf("Allocation of a new value for range"
" %s failed! Unable to proceed.",
@@ -3229,7 +3226,7 @@ static int dna_config_check_post_op(Slapi_PBlock * pb)
if ((dn = dna_get_dn(pb))) {
if (dna_dn_is_config(dn))
- dna_load_plugin_config(pb);
+ dna_load_plugin_config();
}
slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
@@ -3302,7 +3299,7 @@ static int dna_extend_exop(Slapi_PBlock *pb)
/* See if we have the req. range configured.
* If so, we need to see if we have range to provide. */
- ret = dna_release_range(pb, shared_dn, &lower, &upper);
+ ret = dna_release_range(shared_dn, &lower, &upper);
if (ret == LDAP_SUCCESS) {
/* We have range to give away, so construct
@@ -3374,7 +3371,7 @@ static int dna_extend_exop(Slapi_PBlock *pb)
* for the range specified by range_dn.
*/
static int
-dna_release_range(Slapi_PBlock *origpb, char *range_dn, PRUint64 *lower, PRUint64 *upper)
+dna_release_range(char *range_dn, PRUint64 *lower, PRUint64 *upper)
{
int ret = 0;
int match = 0;
@@ -3477,7 +3474,7 @@ dna_release_range(Slapi_PBlock *origpb, char *range_dn, PRUint64 *lower, PRUint6
*lower = *upper - release + 1;
/* Try to set the new next range in the config */
- ret = dna_update_next_range(pb, config_entry, config_entry->next_range_lower,
+ ret = dna_update_next_range(config_entry, config_entry->next_range_lower,
*lower - 1, NULL);
} else {
/* We release up to half of our remaining values,
@@ -3507,7 +3504,7 @@ dna_release_range(Slapi_PBlock *origpb, char *range_dn, PRUint64 *lower, PRUint6
mods[0] = &mod_replace;
mods[1] = 0;
- pb = slapi_pblock_new_by_pb(origpb);
+ pb = slapi_pblock_new();
if (NULL == pb) {
ret = LDAP_OPERATIONS_ERROR;
goto bail;
@@ -3525,7 +3522,7 @@ dna_release_range(Slapi_PBlock *origpb, char *range_dn, PRUint64 *lower, PRUint6
if (ret == LDAP_SUCCESS) {
/* Adjust maxval in our cached config and shared config */
config_entry->maxval = *lower - 1;
- dna_notice_allocation(pb, config_entry, config_entry->nextval, 0, 0, NULL);
+ dna_notice_allocation(config_entry, config_entry->nextval, 0, 0, NULL);
}
}
diff --git a/ldap/servers/plugins/linkedattrs/fixup_task.c b/ldap/servers/plugins/linkedattrs/fixup_task.c
index 4b82002..c1af2f2 100644
--- a/ldap/servers/plugins/linkedattrs/fixup_task.c
+++ b/ldap/servers/plugins/linkedattrs/fixup_task.c
@@ -48,7 +48,7 @@
*/
static void linked_attrs_fixup_task_destructor(Slapi_Task *task);
static void linked_attrs_fixup_task_thread(void *arg);
-static void linked_attrs_fixup_links(Slapi_PBlock *pb, struct configEntry *config, void *txn);
+static void linked_attrs_fixup_links(struct configEntry *config, void *txn);
static int linked_attrs_remove_backlinks_callback(Slapi_Entry *e, void *callback_data);
static int linked_attrs_add_backlinks_callback(Slapi_Entry *e, void *callback_data);
static const char *fetch_attr(Slapi_Entry *e, const char *attrname,
@@ -91,7 +91,6 @@ linked_attrs_fixup_task_add(Slapi_PBlock *pb, Slapi_Entry *e,
if (linkdn) {
mytaskdata->linkdn = slapi_dn_normalize(slapi_ch_strdup(linkdn));
}
- mytaskdata->pb = pb;
/* allocate new task now */
task = slapi_new_task(slapi_entry_get_ndn(e));
@@ -140,12 +139,10 @@ linked_attrs_fixup_task_thread(void *arg)
Slapi_Task *task = (Slapi_Task *)arg;
task_data *td = NULL;
PRCList *main_config = NULL;
- Slapi_PBlock *pb;
int found_config = 0;
/* Fetch our task data from the task */
td = (task_data *)slapi_task_get_data(task);
- pb = slapi_pblock_new_by_pb(td->pb);
/* Log started message. */
slapi_task_begin(task, 1);
@@ -173,7 +170,7 @@ linked_attrs_fixup_task_thread(void *arg)
slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
"Fixing up linked attribute pair (%s)\n", config_entry->dn);
- linked_attrs_fixup_links(pb, config_entry, NULL);
+ linked_attrs_fixup_links(config_entry, NULL);
break;
}
} else {
@@ -183,7 +180,7 @@ linked_attrs_fixup_task_thread(void *arg)
slapi_log_error(SLAPI_LOG_FATAL, LINK_PLUGIN_SUBSYSTEM,
"Fixing up linked attribute pair (%s)\n", config_entry->dn);
- linked_attrs_fixup_links(pb, config_entry, NULL);
+ linked_attrs_fixup_links(config_entry, NULL);
}
list = PR_NEXT_LINK(list);
@@ -208,27 +205,24 @@ linked_attrs_fixup_task_thread(void *arg)
/* this will queue the destruction of the task */
slapi_task_finish(task, rc);
- slapi_pblock_destroy(pb);
}
struct fixup_cb_data {
char *attrtype;
void *txn;
struct configEntry *config;
- Slapi_PBlock *pb;
};
static void
-linked_attrs_fixup_links(Slapi_PBlock *origpb, struct configEntry *config, void *txn)
+linked_attrs_fixup_links(struct configEntry *config, void *txn)
{
- Slapi_PBlock *pb = slapi_pblock_new_by_pb(origpb);
+ Slapi_PBlock *pb = slapi_pblock_new();
char *del_filter = NULL;
char *add_filter = NULL;
- struct fixup_cb_data cb_data = {NULL, NULL, NULL, NULL};
+ struct fixup_cb_data cb_data = {NULL, NULL, NULL};
del_filter = slapi_ch_smprintf("%s=*", config->managedtype);
add_filter = slapi_ch_smprintf("%s=*", config->linktype);
- cb_data.pb = pb;
/* Lock the attribute pair. */
slapi_lock_mutex(config->lock);
@@ -315,7 +309,7 @@ linked_attrs_remove_backlinks_callback(Slapi_Entry *e, void *callback_data)
Slapi_DN *sdn = slapi_entry_get_sdn(e);
struct fixup_cb_data *cb_data = (struct fixup_cb_data *)callback_data;
char *type = cb_data->attrtype;
- Slapi_PBlock *pb = slapi_pblock_new_by_pb(cb_data->pb);
+ Slapi_PBlock *pb = slapi_pblock_new();
char *val[1];
LDAPMod mod;
LDAPMod *mods[2];
@@ -352,7 +346,7 @@ linked_attrs_add_backlinks_callback(Slapi_Entry *e, void *callback_data)
char *linkdn = slapi_entry_get_dn(e);
struct fixup_cb_data *cb_data = (struct fixup_cb_data *)callback_data;
struct configEntry *config = cb_data->config;
- Slapi_PBlock *pb = slapi_pblock_new_by_pb(cb_data->pb);
+ Slapi_PBlock *pb = slapi_pblock_new();
int i = 0;
char **targets = NULL;
char *val[2];
diff --git a/ldap/servers/plugins/linkedattrs/linked_attrs.c b/ldap/servers/plugins/linkedattrs/linked_attrs.c
index 63cae9f..ccc067c 100644
--- a/ldap/servers/plugins/linkedattrs/linked_attrs.c
+++ b/ldap/servers/plugins/linkedattrs/linked_attrs.c
@@ -106,13 +106,13 @@ static int linked_attrs_config_exists_reverse(struct configEntry *entry);
static int linked_attrs_oktodo(Slapi_PBlock *pb);
void linked_attrs_load_array(Slapi_Value **array, Slapi_Attr *attr);
int linked_attrs_compare(const void *a, const void *b);
-static void linked_attrs_add_backpointers(Slapi_PBlock *pb, char *linkdn, struct configEntry *config,
+static void linked_attrs_add_backpointers(char *linkdn, struct configEntry *config,
Slapi_Mod *smod, void *txn);
static void linked_attrs_del_backpointers(Slapi_PBlock *pb, char *linkdn,
struct configEntry *config, Slapi_Mod *smod);
static void linked_attrs_replace_backpointers(Slapi_PBlock *pb, char *linkdn,
struct configEntry *config, Slapi_Mod *smod);
-static void linked_attrs_mod_backpointers(Slapi_PBlock *pb, char *linkdn, char *type, char *scope,
+static void linked_attrs_mod_backpointers(char *linkdn, char *type, char *scope,
int modop, Slapi_ValueSet *targetvals, void *txn);
/*
@@ -1254,13 +1254,13 @@ linked_attrs_compare(const void *a, const void *b)
* by the values in smod.
*/
static void
-linked_attrs_add_backpointers(Slapi_PBlock *origpb, char *linkdn, struct configEntry *config,
+linked_attrs_add_backpointers(char *linkdn, struct configEntry *config,
Slapi_Mod *smod, void *txn)
{
Slapi_ValueSet *vals = slapi_valueset_new();
slapi_valueset_set_from_smod(vals, smod);
- linked_attrs_mod_backpointers(origpb, linkdn, config->managedtype, config->scope,
+ linked_attrs_mod_backpointers(linkdn, config->managedtype, config->scope,
LDAP_MOD_ADD, vals, txn);
slapi_valueset_free(vals);
@@ -1295,7 +1295,7 @@ linked_attrs_del_backpointers(Slapi_PBlock *pb, char *linkdn,
}
slapi_pblock_get(pb, SLAPI_TXN, &txn);
- linked_attrs_mod_backpointers(pb,linkdn, config->managedtype, config->scope,
+ linked_attrs_mod_backpointers(linkdn, config->managedtype, config->scope,
LDAP_MOD_DELETE, vals, txn);
slapi_valueset_free(vals);
@@ -1414,13 +1414,13 @@ linked_attrs_replace_backpointers(Slapi_PBlock *pb, char *linkdn,
/* Perform the actual updates to the target entries. */
if (delvals) {
- linked_attrs_mod_backpointers(pb, linkdn, config->managedtype,
+ linked_attrs_mod_backpointers(linkdn, config->managedtype,
config->scope, LDAP_MOD_DELETE, delvals, txn);
slapi_valueset_free(delvals);
}
if (addvals) {
- linked_attrs_mod_backpointers(pb, linkdn, config->managedtype,
+ linked_attrs_mod_backpointers(linkdn, config->managedtype,
config->scope, LDAP_MOD_ADD, addvals, txn);
slapi_valueset_free(addvals);
}
@@ -1436,12 +1436,12 @@ linked_attrs_replace_backpointers(Slapi_PBlock *pb, char *linkdn,
* Performs backpointer management.
*/
static void
-linked_attrs_mod_backpointers(Slapi_PBlock *origpb, char *linkdn, char *type,
+linked_attrs_mod_backpointers(char *linkdn, char *type,
char *scope, int modop, Slapi_ValueSet *targetvals, void *txn)
{
char *val[2];
int i = 0;
- Slapi_PBlock *mod_pb = slapi_pblock_new_by_pb(origpb);
+ Slapi_PBlock *mod_pb = slapi_pblock_new();
LDAPMod mod;
LDAPMod *mods[2];
Slapi_Value *targetval = NULL;
@@ -1684,7 +1684,7 @@ linked_attrs_mod_post_op(Slapi_PBlock *pb)
case LDAP_MOD_ADD:
/* Find the entries pointed to by the new
* values and add the backpointers. */
- linked_attrs_add_backpointers(pb, dn, config, smod, txn);
+ linked_attrs_add_backpointers(dn, config, smod, txn);
break;
case LDAP_MOD_DELETE:
/* Find the entries pointed to by the deleted
@@ -1779,7 +1779,7 @@ linked_attrs_add_post_op(Slapi_PBlock *pb)
slapi_lock_mutex(config->lock);
- linked_attrs_mod_backpointers(pb, dn, config->managedtype,
+ linked_attrs_mod_backpointers(dn, config->managedtype,
config->scope, LDAP_MOD_ADD, vals, txn);
slapi_unlock_mutex(config->lock);
@@ -1860,7 +1860,7 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
slapi_lock_mutex(config->lock);
- linked_attrs_mod_backpointers(pb, dn, config->managedtype,
+ linked_attrs_mod_backpointers(dn, config->managedtype,
config->scope, LDAP_MOD_DELETE, vals, txn);
slapi_unlock_mutex(config->lock);
@@ -1889,7 +1889,7 @@ linked_attrs_del_post_op(Slapi_PBlock *pb)
slapi_lock_mutex(config->lock);
/* Delete forward link value. */
- linked_attrs_mod_backpointers(pb, dn, config->linktype,
+ linked_attrs_mod_backpointers(dn, config->linktype,
config->scope, LDAP_MOD_DELETE, vals, txn);
slapi_unlock_mutex(config->lock);
@@ -1990,7 +1990,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
slapi_lock_mutex(config->lock);
/* Delete old dn value. */
- linked_attrs_mod_backpointers(pb, old_dn, config->managedtype,
+ linked_attrs_mod_backpointers(old_dn, config->managedtype,
config->scope, LDAP_MOD_DELETE, vals, txn);
slapi_unlock_mutex(config->lock);
@@ -2013,7 +2013,7 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
slapi_lock_mutex(config->lock);
/* Add new dn value. */
- linked_attrs_mod_backpointers(pb, new_dn, config->managedtype,
+ linked_attrs_mod_backpointers(new_dn, config->managedtype,
config->scope, LDAP_MOD_ADD, vals, txn);
slapi_unlock_mutex(config->lock);
@@ -2042,11 +2042,11 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
slapi_lock_mutex(config->lock);
/* Delete old dn value. */
- linked_attrs_mod_backpointers(pb, old_dn, config->linktype,
+ linked_attrs_mod_backpointers(old_dn, config->linktype,
config->scope, LDAP_MOD_DELETE, vals, txn);
/* Add new dn value. */
- linked_attrs_mod_backpointers(pb, new_dn, config->linktype,
+ linked_attrs_mod_backpointers(new_dn, config->linktype,
config->scope, LDAP_MOD_ADD, vals, txn);
slapi_unlock_mutex(config->lock);
diff --git a/ldap/servers/plugins/linkedattrs/linked_attrs.h b/ldap/servers/plugins/linkedattrs/linked_attrs.h
index 89318e1..137e317 100644
--- a/ldap/servers/plugins/linkedattrs/linked_attrs.h
+++ b/ldap/servers/plugins/linkedattrs/linked_attrs.h
@@ -100,7 +100,6 @@ struct configIndex {
typedef struct _task_data
{
char *linkdn;
- Slapi_PBlock *pb;
} task_data;
diff --git a/ldap/servers/plugins/memberof/memberof.c b/ldap/servers/plugins/memberof/memberof.c
index 6699e22..5100b1a 100644
--- a/ldap/servers/plugins/memberof/memberof.c
+++ b/ldap/servers/plugins/memberof/memberof.c
@@ -92,7 +92,6 @@ typedef struct _memberof_get_groups_data
MemberOfConfig *config;
Slapi_Value *memberdn_val;
Slapi_ValueSet **groupvals;
- Slapi_PBlock *pb;
void *txn;
} memberof_get_groups_data;
@@ -149,7 +148,7 @@ static int memberof_call_foreach_dn(Slapi_PBlock *pb, char *dn,
static int memberof_is_direct_member(MemberOfConfig *config, Slapi_Value *groupdn,
Slapi_Value *memberdn, void *txn);
static int memberof_is_grouping_attr(char *type, MemberOfConfig *config);
-static Slapi_ValueSet *memberof_get_groups(Slapi_PBlock *pb, MemberOfConfig *config, char *memberdn, void *txn);
+static Slapi_ValueSet *memberof_get_groups(MemberOfConfig *config, char *memberdn, void *txn);
static int memberof_get_groups_r(MemberOfConfig *config, char *memberdn,
memberof_get_groups_data *data, void *txn);
static int memberof_get_groups_callback(Slapi_Entry *e, void *callback_data);
@@ -170,7 +169,7 @@ static void memberof_task_destructor(Slapi_Task *task);
static const char *fetch_attr(Slapi_Entry *e, const char *attrname,
const char *default_val);
static void memberof_fixup_task_thread(void *arg);
-static int memberof_fix_memberof(Slapi_PBlock *pb, MemberOfConfig *config, char *dn, char *filter_str, void *txn);
+static int memberof_fix_memberof(MemberOfConfig *config, char *dn, char *filter_str, void *txn);
static int memberof_fix_memberof_callback(Slapi_Entry *e, void *callback_data);
@@ -449,7 +448,6 @@ int memberof_postop_del(Slapi_PBlock *pb)
typedef struct _memberof_del_dn_data
{
- Slapi_PBlock *pb;
char *dn;
char *type;
void *txn;
@@ -467,7 +465,7 @@ memberof_del_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config, char *dn,
* same grouping attribute. */
for (i = 0; config->groupattrs[i]; i++)
{
- memberof_del_dn_data data = {pb, dn, config->groupattrs[i], txn};
+ memberof_del_dn_data data = {dn, config->groupattrs[i], txn};
groupattrs[0] = config->groupattrs[i];
@@ -484,7 +482,7 @@ int memberof_del_dn_type_callback(Slapi_Entry *e, void *callback_data)
char *val[2];
Slapi_PBlock *mod_pb = 0;
- mod_pb = slapi_pblock_new_by_pb(((memberof_del_dn_data *)callback_data)->pb);
+ mod_pb = slapi_pblock_new();
mods[0] = &mod;
mods[1] = 0;
@@ -523,7 +521,7 @@ int memberof_call_foreach_dn(Slapi_PBlock *pb, char *dn,
char **types, plugin_search_entry_callback callback, void *callback_data, void *txn)
{
int rc = 0;
- Slapi_PBlock *search_pb = slapi_pblock_new_by_pb(pb);
+ Slapi_PBlock *search_pb = slapi_pblock_new();
Slapi_Backend *be = 0;
Slapi_DN *sdn = 0;
Slapi_DN *base_sdn = 0;
@@ -695,7 +693,6 @@ int memberof_postop_modrdn(Slapi_PBlock *pb)
typedef struct _replace_dn_data
{
- Slapi_PBlock *pb;
char *pre_dn;
char *post_dn;
char *type;
@@ -717,7 +714,7 @@ memberof_replace_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config,
* using the same grouping attribute. */
for (i = 0; config->groupattrs[i]; i++)
{
- replace_dn_data data = {pb, pre_dn, post_dn, config->groupattrs[i], txn};
+ replace_dn_data data = {pre_dn, post_dn, config->groupattrs[i], txn};
groupattrs[0] = config->groupattrs[i];
@@ -737,7 +734,7 @@ int memberof_replace_dn_type_callback(Slapi_Entry *e, void *callback_data)
char *addval[2];
Slapi_PBlock *mod_pb = 0;
- mod_pb = slapi_pblock_new_by_pb(((replace_dn_data *)callback_data)->pb);
+ mod_pb = slapi_pblock_new();
mods[0] = &delmod;
mods[1] = &addmod;
@@ -1094,7 +1091,6 @@ int memberof_modop_one_r(Slapi_PBlock *pb, MemberOfConfig *config, int mod_op,
}
struct fix_memberof_callback_data {
- Slapi_PBlock *pb;
MemberOfConfig *config;
void *txn;
};
@@ -1313,11 +1309,11 @@ int memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config,
if(LDAP_MOD_DELETE == mod_op || LDAP_MOD_ADD == mod_op)
{
/* find parent groups and replace our member attr */
- struct fix_memberof_callback_data cb_data = {pb, config, txn};
+ struct fix_memberof_callback_data cb_data = {config, txn};
memberof_fix_memberof_callback(e, &cb_data);
} else {
/* single entry - do mod */
- mod_pb = slapi_pblock_new_by_pb(pb);
+ mod_pb = slapi_pblock_new();
mods[0] = &mod;
if(LDAP_MOD_REPLACE == mod_op)
@@ -1645,11 +1641,11 @@ int memberof_moddn_attr_list(Slapi_PBlock *pb, MemberOfConfig *config,
* A Slapi_ValueSet* is returned. It is up to the caller to
* free it.
*/
-Slapi_ValueSet *memberof_get_groups(Slapi_PBlock *pb, MemberOfConfig *config, char *memberdn, void *txn)
+Slapi_ValueSet *memberof_get_groups(MemberOfConfig *config, char *memberdn, void *txn)
{
Slapi_Value *memberdn_val = slapi_value_new_string(memberdn);
Slapi_ValueSet *groupvals = slapi_valueset_new();
- memberof_get_groups_data data = {config, memberdn_val, &groupvals, pb, txn};
+ memberof_get_groups_data data = {config, memberdn_val, &groupvals, txn};
memberof_get_groups_r(config, memberdn, &data, txn);
@@ -1662,7 +1658,7 @@ int memberof_get_groups_r(MemberOfConfig *config, char *memberdn, memberof_get_g
{
/* Search for any grouping attributes that point to memberdn.
* For each match, add it to the list, recurse and do same search */
- return memberof_call_foreach_dn(data->pb, memberdn, config->groupattrs,
+ return memberof_call_foreach_dn(NULL, memberdn, config->groupattrs,
memberof_get_groups_callback, data, txn);
}
@@ -2228,7 +2224,6 @@ typedef struct _task_data
{
char *dn;
char *filter_str;
- char *binddn;
} task_data;
void memberof_fixup_task_thread(void *arg)
@@ -2236,14 +2231,11 @@ void memberof_fixup_task_thread(void *arg)
MemberOfConfig configCopy = {0, 0, 0, 0};
Slapi_Task *task = (Slapi_Task *)arg;
task_data *td = NULL;
- Slapi_PBlock *pb = slapi_pblock_new_by_pb(NULL);
int rc = 0;
/* Fetch our task data from the task */
td = (task_data *)slapi_task_get_data(task);
- /* construct our pblock for plugin bind tracking */
- slapi_pblock_set(pb, SLAPI_REQUESTOR_DN, td->binddn);
slapi_task_begin(task, 1);
slapi_task_log_notice(task, "Memberof task starts (arg: %s) ...\n",
td->filter_str);
@@ -2260,7 +2252,7 @@ void memberof_fixup_task_thread(void *arg)
memberof_lock();
/* do real work */
- rc = memberof_fix_memberof(pb, &configCopy, td->dn, td->filter_str, NULL /* no txn? */);
+ rc = memberof_fix_memberof(&configCopy, td->dn, td->filter_str, NULL /* no txn? */);
/* release the memberOf operation lock */
memberof_unlock();
@@ -2270,7 +2262,6 @@ void memberof_fixup_task_thread(void *arg)
slapi_task_log_notice(task, "Memberof task finished.");
slapi_task_log_status(task, "Memberof task finished.");
slapi_task_inc_progress(task);
- slapi_pblock_destroy(pb);
/* this will queue the destruction of the task */
slapi_task_finish(task, rc);
@@ -2339,9 +2330,6 @@ int memberof_task_add(Slapi_PBlock *pb, Slapi_Entry *e,
mytaskdata->dn = slapi_ch_strdup(dn);
mytaskdata->filter_str = slapi_ch_strdup(filter);
- slapi_pblock_get(pb,SLAPI_REQUESTOR_DN, &dn);
- mytaskdata->binddn = slapi_ch_strdup(dn);
-
/* allocate new task now */
task = slapi_new_task(slapi_entry_get_ndn(e));
@@ -2378,18 +2366,17 @@ memberof_task_destructor(Slapi_Task *task)
if (mydata) {
slapi_ch_free_string(&mydata->dn);
slapi_ch_free_string(&mydata->filter_str);
- slapi_ch_free_string(&mydata->binddn);
/* Need to cast to avoid a compiler warning */
slapi_ch_free((void **)&mydata);
}
}
}
-int memberof_fix_memberof(Slapi_PBlock *pb, MemberOfConfig *config, char *dn, char *filter_str, void *txn)
+int memberof_fix_memberof(MemberOfConfig *config, char *dn, char *filter_str, void *txn)
{
int rc = 0;
- struct fix_memberof_callback_data cb_data = {pb, config, txn};
- Slapi_PBlock *search_pb = slapi_pblock_new_by_pb(pb);
+ struct fix_memberof_callback_data cb_data = {config, txn};
+ Slapi_PBlock *search_pb = slapi_pblock_new();
slapi_search_internal_set_pb(search_pb, dn,
LDAP_SCOPE_SUBTREE, filter_str, 0, 0,
@@ -2422,17 +2409,17 @@ int memberof_fix_memberof_callback(Slapi_Entry *e, void *callback_data)
Slapi_DN *sdn = slapi_entry_get_sdn(e);
struct fix_memberof_callback_data *cb_data = (struct fix_memberof_callback_data *)callback_data;
MemberOfConfig *config = cb_data->config;
- memberof_del_dn_data del_data = {cb_data->pb, 0, config->memberof_attr, cb_data->txn};
+ memberof_del_dn_data del_data = {0, config->memberof_attr, cb_data->txn};
Slapi_ValueSet *groups = 0;
/* get a list of all of the groups this user belongs to */
- groups = memberof_get_groups(cb_data->pb, config, dn, cb_data->txn);
+ groups = memberof_get_groups(config, dn, cb_data->txn);
/* If we found some groups, replace the existing memberOf attribute
* with the found values. */
if (groups && slapi_valueset_count(groups))
{
- Slapi_PBlock *mod_pb = slapi_pblock_new_by_pb(cb_data->pb);
+ Slapi_PBlock *mod_pb = slapi_pblock_new();
Slapi_Value *val = 0;
Slapi_Mod *smod;
LDAPMod **mods = (LDAPMod **) slapi_ch_malloc(2 * sizeof(LDAPMod *));
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index 6161c16..303d9b3 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -107,9 +107,9 @@ static int mep_oktodo(Slapi_PBlock *pb);
static int mep_isrepl(Slapi_PBlock *pb);
static Slapi_Entry *mep_create_managed_entry(struct configEntry *config,
Slapi_Entry *origin);
-static void mep_add_managed_entry(Slapi_PBlock *pb, struct configEntry *config,
+static void mep_add_managed_entry(struct configEntry *config,
Slapi_Entry *origin, void *txn);
-static void mep_rename_managed_entry(Slapi_PBlock *pb, Slapi_Entry *origin,
+static void mep_rename_managed_entry(Slapi_Entry *origin,
Slapi_DN *new_dn, Slapi_DN *old_dn, void *txn);
static Slapi_Mods *mep_get_mapped_mods(struct configEntry *config,
Slapi_Entry *origin, char **mapped_dn);
@@ -1422,12 +1422,12 @@ mep_create_managed_entry(struct configEntry *config, Slapi_Entry *origin)
* newly created managed entry.
*/
static void
-mep_add_managed_entry(Slapi_PBlock *pb, struct configEntry *config,
+mep_add_managed_entry(struct configEntry *config,
Slapi_Entry *origin, void *txn)
{
Slapi_Entry *managed_entry = NULL;
char *managed_dn = NULL;
- Slapi_PBlock *mod_pb = slapi_pblock_new_by_pb(pb);
+ Slapi_PBlock *mod_pb = slapi_pblock_new();
int result = LDAP_SUCCESS;
/* Create the managed entry */
@@ -1523,11 +1523,11 @@ mep_add_managed_entry(Slapi_PBlock *pb, struct configEntry *config,
* origin entry.
*/
static void
-mep_rename_managed_entry(Slapi_PBlock *pb, Slapi_Entry *origin,
+mep_rename_managed_entry(Slapi_Entry *origin,
Slapi_DN *new_dn, Slapi_DN *old_dn, void *txn)
{
Slapi_RDN *srdn = slapi_rdn_new();
- Slapi_PBlock *mep_pb = slapi_pblock_new_by_pb(pb);
+ Slapi_PBlock *mep_pb = slapi_pblock_new();
LDAPMod mod;
LDAPMod *mods[2];
char *vals[2];
@@ -2392,7 +2392,7 @@ mep_mod_post_op(Slapi_PBlock *pb)
smods = mep_get_mapped_mods(config, e, &mapped_dn);
if (smods) {
/* Clear out the pblock for reuse. */
- mep_pb = slapi_pblock_new_by_pb(pb);
+ mep_pb = slapi_pblock_new();
/* Perform the modify operation. */
slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
@@ -2423,7 +2423,7 @@ mep_mod_post_op(Slapi_PBlock *pb)
managed_sdn = slapi_sdn_new_normdn_byref(managed_dn);
if (slapi_sdn_compare(managed_sdn, mapped_sdn) != 0) {
- mep_rename_managed_entry(pb, e, mapped_sdn, managed_sdn, txn);
+ mep_rename_managed_entry(e, mapped_sdn, managed_sdn, txn);
}
slapi_sdn_free(&mapped_sdn);
@@ -2499,7 +2499,7 @@ mep_add_post_op(Slapi_PBlock *pb)
mep_find_config(e, &config);
if (config) {
- mep_add_managed_entry(pb, config, e, txn);
+ mep_add_managed_entry(config, e, txn);
}
mep_config_unlock();
@@ -2646,7 +2646,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
LDAPMod *mods[3];
char *vals[2];
int result = LDAP_SUCCESS;
- Slapi_PBlock *mep_pb = slapi_pblock_new_by_pb(pb);
+ Slapi_PBlock *mep_pb = slapi_pblock_new();
Slapi_Entry *new_managed_entry = NULL;
Slapi_DN *managed_sdn = NULL;
Slapi_Mods *smods = NULL;
@@ -2775,7 +2775,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
"entry \"%s\".\n ", managed_dn,
slapi_entry_get_dn(new_managed_entry),
slapi_sdn_get_dn(old_sdn));
- mep_rename_managed_entry(pb, post_e,
+ mep_rename_managed_entry(post_e,
slapi_entry_get_sdn(new_managed_entry),
managed_sdn, txn);
}
@@ -2838,7 +2838,7 @@ bailmod:
mep_find_config(post_e, &config);
if (config) {
- mep_add_managed_entry(pb, config, post_e, txn);
+ mep_add_managed_entry(config, post_e, txn);
}
mep_config_unlock();
diff --git a/ldap/servers/plugins/referint/referint.c b/ldap/servers/plugins/referint/referint.c
index ee7c781..4606de6 100644
--- a/ldap/servers/plugins/referint/referint.c
+++ b/ldap/servers/plugins/referint/referint.c
@@ -77,10 +77,10 @@ int referint_postop_del( Slapi_PBlock *pb );
int referint_postop_modrdn( Slapi_PBlock *pb );
int referint_postop_start( Slapi_PBlock *pb);
int referint_postop_close( Slapi_PBlock *pb);
-int update_integrity(Slapi_PBlock *pb, char **argv, Slapi_DN *sDN, char *newrDN, Slapi_DN *newsuperior, int logChanges, void *txn);
+int update_integrity(char **argv, Slapi_DN *sDN, char *newrDN, Slapi_DN *newsuperior, int logChanges, void *txn);
void referint_thread_func(void *arg);
int GetNextLine(char *dest, int size_dest, PRFileDesc *stream);
-void writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN *sdn, char *newrdn, Slapi_DN *newsuperior);
+void writeintegritylog(char *logfilename, Slapi_DN *sdn, char *newrdn, Slapi_DN *newsuperior, Slapi_DN *requestorsdn);
int my_fgetc(PRFileDesc *stream);
/* global thread control stuff */
@@ -215,10 +215,10 @@ referint_postop_del( Slapi_PBlock *pb )
}else if(delay == 0){
/* no delay */
/* call function to update references to entry */
- rc = update_integrity(pb, argv, sdn, NULL, NULL, logChanges, txn);
+ rc = update_integrity(argv, sdn, NULL, NULL, logChanges, txn);
}else{
/* write the entry to integrity log */
- writeintegritylog(pb, argv[1], sdn, NULL, NULL);
+ writeintegritylog(argv[1], sdn, NULL, NULL, NULL /* slapi_get_requestor_sdn(pb) */);
rc = 0;
}
} else {
@@ -300,11 +300,11 @@ referint_postop_modrdn( Slapi_PBlock *pb )
}else if(delay == 0){
/* no delay */
/* call function to update references to entry */
- rc = update_integrity(pb, argv, sdn, newrdn,
+ rc = update_integrity(argv, sdn, newrdn,
newsuperior, logChanges, txn);
}else{
/* write the entry to integrity log */
- writeintegritylog(pb, argv[1], sdn, newrdn, newsuperior);
+ writeintegritylog(argv[1], sdn, newrdn, newsuperior, NULL /* slapi_get_requestor_sdn(pb) */);
rc = 0;
}
@@ -674,12 +674,12 @@ bail:
}
int
-update_integrity(Slapi_PBlock *pb, char **argv, Slapi_DN *origSDN,
+update_integrity(char **argv, Slapi_DN *origSDN,
char *newrDN, Slapi_DN *newsuperior,
int logChanges, void *txn)
{
Slapi_PBlock *search_result_pb = NULL;
- Slapi_PBlock *mod_pb = slapi_pblock_new_by_pb(pb);
+ Slapi_PBlock *mod_pb = slapi_pblock_new();
Slapi_Entry **search_entries = NULL;
int search_result;
Slapi_DN *sdn = NULL;
@@ -912,15 +912,12 @@ referint_thread_func(void *arg)
Slapi_DN *sdn = NULL;
char *tmprdn;
Slapi_DN *tmpsuperior = NULL;
- Slapi_DN *binddn = NULL;
int logChanges=0;
char * iter = NULL;
- Slapi_PBlock *pb = slapi_pblock_new_by_pb(NULL);
if(plugin_argv == NULL){
slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_thread_func not get args \n" );
- slapi_pblock_destroy(pb);
return;
}
@@ -975,7 +972,6 @@ referint_thread_func(void *arg)
while( GetNextLine(thisline, MAX_LINE, prfd) ){
ptoken = ldap_utf8strtok_r(thisline, delimiter, &iter);
sdn = slapi_sdn_new_normdn_byref(ptoken);
- slapi_pblock_init(pb);
ptoken = ldap_utf8strtok_r (NULL, delimiter, &iter);
if(!strcasecmp(ptoken, "NULL")) {
@@ -990,16 +986,8 @@ referint_thread_func(void *arg)
} else {
tmpsuperior = slapi_sdn_new_normdn_byref(ptoken);
}
-
- /* this should be the bind DN that performed the original delete */
- ptoken = ldap_utf8strtok_r (NULL, delimiter, &iter);
- if (!strcasecmp(ptoken, "NULL")) {
- binddn = NULL;
- } else {
- slapi_pblock_set(pb, SLAPI_REQUESTOR_DN, ptoken);
- }
- update_integrity(pb, plugin_argv, sdn, tmprdn,
+ update_integrity(plugin_argv, sdn, tmprdn,
tmpsuperior, logChanges, NULL);
slapi_sdn_free(&sdn);
@@ -1037,7 +1025,7 @@ referint_thread_func(void *arg)
PR_DestroyCondVar(keeprunning_cv);
}
- slapi_pblock_destroy(pb);
+
}
int my_fgetc(PRFileDesc *stream)
@@ -1117,14 +1105,15 @@ GetNextLine(char *dest, int size_dest, PRFileDesc *stream) {
}
void
-writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN *sdn,
- char *newrdn, Slapi_DN *newsuperior)
+writeintegritylog(char *logfilename, Slapi_DN *sdn,
+ char *newrdn, Slapi_DN *newsuperior, Slapi_DN *requestorsdn)
{
PRFileDesc *prfd;
char buffer[MAX_LINE];
- char *dn = NULL;
int len_to_write = 0;
int rc;
+ const char *requestordn = NULL;
+ size_t reqdn_len = 0;
/* write this record to the file */
/* use this lock to protect file data when update integrity is occuring */
@@ -1147,8 +1136,8 @@ writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN *sdn,
before trying to write it
*/
- /* add length of dn + 4(two tabs, a newline, and terminating \0) */
- len_to_write = slapi_sdn_get_ndn_len(sdn) + 4;
+ /* add length of dn + 5(three tabs, a newline, and terminating \0) */
+ len_to_write = slapi_sdn_get_ndn_len(sdn) + 5;
if(newrdn == NULL)
{
@@ -1166,6 +1155,12 @@ writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN *sdn,
/* add the length of the newsuperior */
len_to_write += slapi_sdn_get_ndn_len(newsuperior);
}
+ if (requestorsdn && (requestordn = slapi_sdn_get_udn(requestorsdn)) &&
+ (reqdn_len = strlen(requestordn))) {
+ len_to_write += reqdn_len;
+ } else {
+ len_to_write += 4; /* "NULL" */
+ }
if(len_to_write > MAX_LINE )
{
@@ -1174,12 +1169,12 @@ writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN *sdn,
" line length exceeded. It will not be able"
" to update references to this entry.\n");
}else{
- slapi_pblock_get(pb, SLAPI_REQUESTOR_DN, &dn);
- PR_snprintf(buffer, MAX_LINE, "%s\t%s\t%s\t%s\t\n",
+ PR_snprintf(buffer, MAX_LINE, "%s\t%s\t%s\t%s\t\n",
slapi_sdn_get_dn(sdn),
(newrdn != NULL) ? newrdn : "NULL",
- (newsuperior != NULL) ? slapi_sdn_get_dn(newsuperior) : "NULL",
- dn );
+ (newsuperior != NULL) ? slapi_sdn_get_dn(newsuperior) :
+ "NULL",
+ requestordn ? requestordn : "NULL");
if (PR_Write(prfd,buffer,strlen(buffer)) < 0){
slapi_log_error(SLAPI_LOG_FATAL,REFERINT_PLUGIN_SUBSYSTEM,
" writeintegritylog: PR_Write failed : The disk"
diff --git a/ldap/servers/slapd/add.c b/ldap/servers/slapd/add.c
index 434901e..206dfc4 100644
--- a/ldap/servers/slapd/add.c
+++ b/ldap/servers/slapd/add.c
@@ -73,7 +73,7 @@
/* Forward declarations */
static int add_internal_pb (Slapi_PBlock *pb);
static void op_shared_add (Slapi_PBlock *pb);
-static int add_created_attrs(Slapi_PBlock *pb, Slapi_Entry *e);
+static int add_created_attrs(Operation *op, Slapi_Entry *e);
static int check_rdn_for_created_attrs(Slapi_Entry *e);
static void handle_fast_add(Slapi_PBlock *pb, Slapi_Entry *entry);
static int add_uniqueid (Slapi_Entry *e);
@@ -390,15 +390,8 @@ void slapi_add_entry_internal_set_pb (Slapi_PBlock *pb, Slapi_Entry *e, LDAPCont
return;
}
- /* if the operation is not NULL, then it was already set */
- if(pb->pb_op == NULL){
- op = internal_operation_new(SLAPI_OPERATION_ADD,operation_flags);
- slapi_pblock_set(pb, SLAPI_OPERATION, op);
- } else {
- /* we still want to set the flags & type though */
- operation_set_flag(pb->pb_op, operation_flags);
- operation_set_type(pb->pb_op, SLAPI_OPERATION_ADD);
- }
+ op = internal_operation_new(SLAPI_OPERATION_ADD,operation_flags);
+ slapi_pblock_set(pb, SLAPI_OPERATION, op);
slapi_pblock_set(pb, SLAPI_ADD_ENTRY, e);
slapi_pblock_set(pb, SLAPI_CONTROLS_ARG, controls);
slapi_pblock_set(pb, SLAPI_PLUGIN_IDENTITY, plugin_identity);
@@ -639,7 +632,7 @@ static void op_shared_add (Slapi_PBlock *pb)
/* can get lastmod only after backend is selected */
slapi_pblock_get(pb, SLAPI_BE_LASTMOD, &lastmod);
- if (lastmod && add_created_attrs(pb, e) != 0)
+ if (lastmod && add_created_attrs(operation, e) != 0)
{
send_ldap_result(pb, LDAP_UNWILLING_TO_PERFORM, NULL,
"cannot insert computed attributes", 0, NULL);
@@ -745,39 +738,24 @@ done:
}
static int
-add_created_attrs(Slapi_PBlock *pb, Slapi_Entry *e)
+add_created_attrs(Operation *op, Slapi_Entry *e)
{
char buf[20];
struct berval bv;
struct berval *bvals[2];
time_t curtime;
struct tm ltm;
- Operation *op;
- char *plugin_dn = NULL;
- struct slapdplugin *plugin = NULL;
- struct slapi_componentid *cid = NULL;
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
LDAPDebug(LDAP_DEBUG_TRACE, "add_created_attrs\n", 0, 0, 0);
- slapi_pblock_get(pb, SLAPI_OPERATION, &op);
bvals[0] = &bv;
bvals[1] = NULL;
if(slapdFrontendConfig->plugin_track && !slapi_sdn_isempty(&op->o_sdn)){
- /* write the bind dn and plugin name to the new attributes */
- slapi_pblock_get (pb, SLAPI_PLUGIN_IDENTITY, &cid);
- if (cid)
- plugin=(struct slapdplugin *) cid->sci_plugin;
- if(plugin)
- plugin_dn = plugin_get_dn(plugin);
- if(plugin_dn){
- bv.bv_val = plugin_dn;
- bv.bv_len = strlen(bv.bv_val);
- } else {
- bv.bv_val = (char*)slapi_sdn_get_dn(&op->o_sdn);
- bv.bv_len = strlen(bv.bv_val);
- }
+ /* assume op->o_sdn holds the plugin DN */
+ bv.bv_val = (char*)slapi_sdn_get_dn(&op->o_sdn);
+ bv.bv_len = strlen(bv.bv_val);
slapi_entry_attr_replace(e, "internalCreatorsName", bvals);
slapi_entry_attr_replace(e, "internalModifiersName", bvals);
}
diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c
index 869eb27..c346a6a 100644
--- a/ldap/servers/slapd/modify.c
+++ b/ldap/servers/slapd/modify.c
@@ -489,14 +489,8 @@ slapi_modify_internal_set_pb (Slapi_PBlock *pb, const char *dn,
return;
}
- /* if we're tracking the plugin bind dn, then just set the type/flags */
- if(pb->plugin_tracking){
- operation_set_flag(pb->pb_op, operation_flags);
- operation_set_type(pb->pb_op, SLAPI_OPERATION_MODIFY);
- } else {
- op = internal_operation_new(SLAPI_OPERATION_MODIFY,operation_flags);
- slapi_pblock_set(pb, SLAPI_OPERATION, op);
- }
+ op= internal_operation_new(SLAPI_OPERATION_MODIFY,operation_flags);
+ slapi_pblock_set(pb, SLAPI_OPERATION, op);
slapi_pblock_set(pb, SLAPI_ORIGINAL_TARGET, (void*)dn);
slapi_pblock_set(pb, SLAPI_MODIFY_MODS, mods);
slapi_pblock_set(pb, SLAPI_CONTROLS_ARG, controls);
@@ -524,14 +518,8 @@ slapi_modify_internal_set_pb_ext(Slapi_PBlock *pb, const Slapi_DN *sdn,
return;
}
- /* if we're tracking the plugin bind dn, then just set the type/flags */
- if(pb->plugin_tracking){
- operation_set_flag(pb->pb_op, operation_flags);
- operation_set_type(pb->pb_op, SLAPI_OPERATION_MODIFY);
- } else {
- op = internal_operation_new(SLAPI_OPERATION_MODIFY,operation_flags);
- slapi_pblock_set(pb, SLAPI_OPERATION, op);
- }
+ op= internal_operation_new(SLAPI_OPERATION_MODIFY,operation_flags);
+ slapi_pblock_set(pb, SLAPI_OPERATION, op);
slapi_pblock_set(pb, SLAPI_ORIGINAL_TARGET, (void *)slapi_sdn_get_dn(sdn));
slapi_pblock_set(pb, SLAPI_TARGET_SDN, (void *)sdn);
slapi_pblock_set(pb, SLAPI_MODIFY_MODS, mods);
diff --git a/ldap/servers/slapd/modrdn.c b/ldap/servers/slapd/modrdn.c
index 7cd88ce..2c8aae8 100644
--- a/ldap/servers/slapd/modrdn.c
+++ b/ldap/servers/slapd/modrdn.c
@@ -359,14 +359,8 @@ slapi_rename_internal_set_pb_ext(Slapi_PBlock *pb,
return;
}
- /* if we're tracking the plugin bind dn, then just set the type/flags */
- if(pb->plugin_tracking){
- operation_set_flag(pb->pb_op, operation_flags);
- operation_set_type(pb->pb_op, SLAPI_OPERATION_MODRDN);
- } else {
- op = internal_operation_new(SLAPI_OPERATION_MODRDN,operation_flags);
- slapi_pblock_set(pb, SLAPI_OPERATION, op);
- }
+ op = internal_operation_new(SLAPI_OPERATION_MODRDN,operation_flags);
+ slapi_pblock_set(pb, SLAPI_OPERATION, op);
slapi_pblock_set(pb, SLAPI_ORIGINAL_TARGET,
(void*)slapi_sdn_get_dn(olddn));
slapi_pblock_set(pb, SLAPI_MODRDN_TARGET_SDN, (void*)olddn);
diff --git a/ldap/servers/slapd/pblock.c b/ldap/servers/slapd/pblock.c
index f3df0f6..b607f28 100644
--- a/ldap/servers/slapd/pblock.c
+++ b/ldap/servers/slapd/pblock.c
@@ -96,50 +96,13 @@ slapi_pblock_new()
return pb;
}
-/* Use for internal operations by plugins, where we need to track the bind dn */
-Slapi_PBlock *
-slapi_pblock_new_by_pb(Slapi_PBlock *origpb)
-{
- Slapi_PBlock *pb;
-
- pb = (Slapi_PBlock *) slapi_ch_calloc( 1, sizeof(Slapi_PBlock) );
- pb->pb_op = operation_new(OP_FLAG_INTERNAL);
- pb->plugin_tracking = 1;
-
- if(origpb == NULL){
- return pb;
- }
-
- if(origpb->pb_op != NULL){
- slapi_sdn_set_normdn_byval((&pb->pb_op->o_sdn), slapi_sdn_get_dn(&origpb->pb_op->o_sdn));
- } else {
- /* No operation? Have to use the plugin name */
- if(origpb->pb_plugin->plg_name){
- slapi_sdn_set_normdn_byval((&pb->pb_op->o_sdn), origpb->pb_plugin->plg_name);
- }
- }
-
- return pb;
-}
-
void
slapi_pblock_init( Slapi_PBlock *pb )
{
- Slapi_Operation *op;
-
if(pb!=NULL)
{
- if(pb->plugin_tracking){
- /* preserve the op, and then reset everything */
- op = pb->pb_op;
- pblock_done_by_pb(pb);
- pblock_init(pb);
- pb->pb_op = op;
- pb->plugin_tracking = 1;
- } else {
- pblock_done(pb);
- pblock_init(pb);
- }
+ pblock_done(pb);
+ pblock_init(pb);
}
}
@@ -155,14 +118,6 @@ pblock_done( Slapi_PBlock *pb )
}
void
-pblock_done_by_pb( Slapi_PBlock *pb )
-{
- /* don't free the operation because we still want to use it */
- slapi_ch_free((void**)&(pb->pb_vattr_context));
- slapi_ch_free((void**)&(pb->pb_result_text));
-}
-
-void
slapi_pblock_destroy( Slapi_PBlock* pb )
{
if(pb!=NULL)
diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h
index 6b868f5..01ca512 100644
--- a/ldap/servers/slapd/proto-slap.h
+++ b/ldap/servers/slapd/proto-slap.h
@@ -1083,7 +1083,6 @@ void do_unbind( Slapi_PBlock *pb );
void pblock_init( Slapi_PBlock *pb );
void pblock_init_common( Slapi_PBlock *pb, Slapi_Backend *be, Connection *conn, Operation *op );
void pblock_done( Slapi_PBlock *pb );
-void pblock_done_by_pb( Slapi_PBlock *pb );
void bind_credentials_set( Connection *conn,
char *authtype, char *normdn,
char *extauthtype, char *externaldn, CERTCertificate *clientcert , Slapi_Entry * binded);
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index cd9fcab..20c7a5c 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -607,19 +607,6 @@ typedef void (*TaskCallbackFn)(Slapi_Task *task);
Slapi_PBlock *slapi_pblock_new( void ); /* allocate and initialize */
/**
- * Creates a new parameter block.
- *
- * \return This function returns a pointer to the new parameter block.
- * \warning This function takes the original operation struct, and adds it the
- * the new pb. This is so we can track the original bind dn
- * \warning The pblock pointer allocated with this function must always be freed by
- * slapi_pblock_destroy(). The use of other memory deallocators (for example,
- * <tt>free()</tt>) is not supported and may lead to crashes or memory leaks.
- * \see slapi_pblock_destroy()
- */
-Slapi_PBlock *slapi_pblock_new_by_pb( Slapi_PBlock *pb ); /* allocate and initialize */
-
-/**
* Initializes an existing parameter block for re-use.
*
* \param pb The parameter block to initialize.
12 years, 2 months