Commit Graph

12158 Commits

Author SHA1 Message Date
Howard Chu
14d4215bc1 ITS#9121 more for dynamic memmber/memberOf 2019-12-18 20:37:58 +00:00
Howard Chu
62ec3d99c0 ITS#9121 schema update for prev commit 2019-12-18 20:34:50 +00:00
Howard Chu
c458744e32 ITS#9121 cleanup
Delete unused code, add comments
2019-12-16 18:42:57 +00:00
Howard Chu
90b0abd894 ITS#9121 dynlist enhancements
1) allow filtering on dynamic attribute values
2) populate an optionally configured memberOf attribute

test044 script still needs to be extended to test these
enhancements. We need to define an interim attributeType
for testing memberOf functionality.
2019-12-16 18:31:12 +00:00
Arvid Requate
44a7b4632e ITS#9128 fix bus error in strchrlen 2019-12-04 20:50:44 +00:00
Ondřej Kuzník
b71235ac45 ITS#8629 Make sure pwcons is around for slapauth
Long term, overlay callbacks should not be running in tool mode at all.
2019-12-02 13:28:10 +00:00
Howard Chu
1a0ab3d269 ITS#9125 check HAVE_TLS 2019-12-01 19:04:27 +00:00
Ondřej Kuzník
1dbf0e9441 ITS#9124 Check we have data to process in Cancel Exop 2019-11-29 10:04:08 +00:00
Howard Chu
63922b076c ITS#9119 fix global operation counter reporting 2019-11-15 16:26:14 +00:00
Howard Chu
4d7be1c161 ITS#9112 cleaner error handling during connection setup
And additional debug code for tracking errant close()s
2019-10-28 23:01:08 +00:00
Howard Chu
230b469669 ITS#9100 relax domainScope check for absent value 2019-10-28 19:01:36 +00:00
Howard Chu
379f138098 ITS#9091 drop attr mappings added in an aborted txn
If a txn is aborted in id2entry_put, attribute index mappings
added during that txn must also be dropped from memory.
2019-10-14 18:34:07 +01:00
Howard Chu
4bc333c5e7 ITS#9095 insert missing commit at end of slapindex processing 2019-10-11 20:48:51 +01:00
Ondřej Kuzník
81025cc8bf ITS#9077 Let the loop finish 2019-09-23 16:37:38 +01:00
Ondřej Kuzník
dc3e450104 ITS#8731 Remove extra args 2019-09-10 19:00:24 +01:00
Ondřej Kuzník
a14fb731ac ITS#9076 Set oldctrls correctly 2019-09-10 19:00:24 +01:00
Julia Bremer
8514f2a771 ITS#9067 fix syntax evaluation of preferredDeliveryMethod 2019-08-26 17:14:25 +01:00
Howard Chu
92b03e82e0 ITS#7657 honor unchecked limit 2019-07-17 10:17:43 +01:00
Howard Chu
e90e8c7d3c ITS#7657 back-mdb improve alias deref
Don't search for scopes of entries with no children
2019-07-15 16:47:18 +01:00
Ondřej Kuzník
230b853488 ITS#8427 Take late TLS configuration into account 2019-07-15 17:01:08 +02:00
Howard Chu
5fec7b777f ITS#8977 don't use any stack allocated IDLs
Trying again, fixed previous attempt
2019-07-11 15:47:03 +01:00
Howard Chu
0fa0f8ff07 ITS#9052 zero out sasl_ssf in connection_init 2019-07-10 21:29:39 +01:00
Howard Chu
f6766f1a1f Revert "ITS#8977 don't use any stack allocated IDLs"
This reverts commit bfe9152c4c.
2019-07-03 17:20:34 +01:00
Howard Chu
bfe9152c4c ITS#8977 don't use any stack allocated IDLs 2019-07-03 16:59:53 +01:00
Howard Chu
ec411582d6 ITS#8977 make sure olcBackend entry is created 2019-06-27 15:33:09 +01:00
Ondřej Kuzník
c06dc95cf9 ITS#8799 Let the common backend be configured through cn=config 2019-06-20 17:03:27 +02:00
Ondřej Kuzník
747679256c Resolve conflict between ITS#7492 and ITS#7520 2019-06-20 17:03:27 +02:00
Ondřej Kuzník
75e0eba1f7 ITS#9000 memberof: noop a noop rename 2019-06-20 16:55:13 +02:00
Howard Chu
fbe5611e60 ITS#9038 restrict rootDN proxyauthz to its own DBs.
Treat as normal user for any other DB.
2019-06-19 12:40:19 +01:00
Quanah Gibson-Mount
bc61773904 ITS#8286 - Add missing matching rules
Add missing matching rules for the cn=config schema elements for:

slapd-null
slapd-relay
slapo-chain
2019-06-18 17:31:55 +00:00
Quanah Gibson-Mount
85ccf7bbac ITS#8997 - Fix segfault by setting return code value
Fix case with back-ldap where an entry was returned but didn't match the filter being applied by setting the return code value before dropping to cleanup.
2019-06-17 17:15:00 +00:00
Ondřej Kuzník
be55ce8087 ITS#8637 Reject multiple chain URIs just like slapd.conf 2019-06-17 16:05:44 +00:00
HAMANO Tsukasa
77119a1f6f ITS#8349 - Fix ppolicy behavior when pwdInHistory is changed 2019-06-17 15:55:15 +00:00
Ondřej Kuzník
d40b357f5d ITS#8964 Do not free original filter 2019-06-17 12:49:25 +02:00
Ondřej Kuzník
02df0b485a ITS#8427 Only do StartTLS if configured 2019-06-13 12:12:54 +02:00
Ondřej Kuzník
1273a38eda ITS#8427 Set up TLS settings on each reconnection 2019-06-12 16:40:04 +02:00
Quanah Gibson-Mount
ec2cb12e68 ITS#9010 - Delete back-bdb/back-hdb
This commits deletes all references and code for back-bdb and back-hdb.
There is some follow up work still necessary to flush out the admin
guide for back-mdb.
2019-05-13 17:20:28 +00:00
Ondřej Kuzník
5957cbb660 ITS#8743 Initialise the metafilter we allocate 2019-05-13 13:07:11 +01:00
Ondřej Kuzník
7ca538ff87 ITS#9015 Treat an empty cookie from a FALLBACK search as a success 2019-05-08 15:42:12 +01:00
Ondřej Kuzník
abcf0e8f23 ITS#9015 Don't generate contextCSN on empty DB 2019-05-08 15:42:12 +01:00
Ondřej Kuzník
1df2b85c32 ITS#9015 Generate contextCSN unless we're a pure replica.
Essentially reverts part of cd8ff37629 to
make sure there is always a contextCSN if the server is in charge of its
own serverID.
2019-05-08 15:42:12 +01:00
Howard Chu
c42c996966 ITS#9012 one more Win64 fix
Was omitted from dda779d83e
2019-04-21 22:10:03 +01:00
Ondřej Kuzník
3bda24173d Do not leak memory in slappasswd 2019-03-27 10:54:42 +00:00
Howard Chu
8b7f21c7aa ITS#8999 more for prev commit 2019-03-26 13:12:26 +00:00
Howard Chu
d8c90a2fee ITS#8999 fix telephoneNumberNormalize, cert DN validation 2019-03-26 11:18:55 +00:00
Howard Chu
47102fcced Add persist support 2019-03-20 08:47:48 -07:00
Howard Chu
4534528fe1 ITS#8990 pickup SLAP_MOD_SOFT modops 2019-03-11 18:52:26 +00:00
Howard Chu
c825edf67e ITS#8989 fix bitshift integer overflow 2019-03-10 14:26:08 +00:00
Quanah Gibson-Mount
a32cab8b72 write waiter handling cleanup
Follow on to commit 88d22a1ca3

Remove dead code
2019-03-07 23:31:44 +00:00
Nadezhda Ivanova
ea1eb19303 Use LDAP_OPT_KEEPCONN to prevent the target connection from being freed
On error, the ldap connection was freed and under some circumstances the fd was being reused,
which caused an assertion error in connection_init.
2019-02-28 17:28:04 +00:00
Nadezhda Ivanova
e9fa4af4d8 Move initialization of Connection mutexes to connections_init 2019-02-28 17:27:45 +00:00
Nadezhda Ivanova
bb7e14d201 ITS#8734 Fixes for many back-asyncmeta issues
Includes all the changes necessary to fix back-asyncmeta issues
discovered during on-site testing since the start of 2016.
These include:
Issues with stability - crashes and assetion failures
Incorrect behavior during unstable network conditions, such as inability to reset connections
or process responses, or "hanging" to wait for a response that would never be received.
Memory leaks and memory management fixes - major redesign of the way back-asyncmeta
works with memory contexts.
Rewrite was replaced with suffix-massage in configuration, and the network-timeout value was changed to milliseconds.
Incorrect behavior when SASL is used to bind to a target.
Many problems caused by race conditions
Fixes for compiler warnings, and tests.
Cleanup of unused code.
2019-02-28 16:22:11 +00:00
Ondřej Kuzník
117dcbc54d Silence compiler warnings 2019-02-19 10:28:08 +00:00
Ondřej Kuzník
f4a68297a0 Actually check for mi->bi_extra 2019-02-19 10:28:08 +00:00
Ondřej Kuzník
cd914149a6 Make prototypes available where needed 2019-02-19 10:26:39 +00:00
Ondřej Kuzník
7a98f7de5d ITS#8731 Remove more unused buffers 2019-02-19 10:24:43 +00:00
Howard Chu
d26b1049de ITS#8977 missed a commit 2019-02-16 13:51:56 +00:00
Ondřej Kuzník
cf9fea9379 ITS#8731 Manual adjustment post doc/devel/variadic_debug/07-shortcut.cocci 2019-02-15 16:51:53 +00:00
Ondřej Kuzník
76df74dbea ITS#8731 Apply doc/devel/variadic_debug/07-shortcut.cocci 2019-02-15 16:51:53 +00:00
Ondřej Kuzník
abbabbb3d7 ITS#8731 Manual work not picked up by coccinelle 2019-02-15 16:51:53 +00:00
Ondřej Kuzník
97a310b312 ITS#8731 Apply doc/devel/variadic_debug/04-variadic.cocci 2019-02-15 16:51:53 +00:00
Ondřej Kuzník
e1e643ea41 ITS#8731 Manual adjustments 2019-02-15 16:51:53 +00:00
Ondřej Kuzník
254d2adab0 ITS#8731 Rework logging 2019-02-15 16:51:53 +00:00
Ondřej Kuzník
129dcfbd86 ITS#8731 General Debug() related fixes 2019-02-15 16:51:53 +00:00
Howard Chu
a70b887e6c ITS#8977 fix prev commit 2019-02-15 16:12:41 +00:00
Howard Chu
c8b806b676 ITS#8977 make IDL size configurable 2019-02-15 14:37:51 +00:00
Nadezhda Ivanova
17f1e32b65 ITS#8841 Fix an assertion error in back-meta when network interface is unavailable
Because an API error code was assigned to sr_err, on network error back-meta would cause
an assert error at result.c: 830

assert( !LDAP_API_ERROR( rs->sr_err ) );
2019-02-14 14:41:42 +00:00
Howard Chu
6e2bac6465 ITS#7770 schema fixup 2019-02-04 02:50:17 +00:00
Howard Chu
e19c683c41 ITS#7770 add mdb_stat info to cn=monitor 2019-02-03 11:08:24 +00:00
Howard Chu
299a6ca0f4 ITS#8971 tweak prev commit
Check for BVISNULL, maybe rootDSE is a valid reqDN
2019-02-02 22:48:53 +00:00
Howard Chu
f052e94593 ITS#8971 most exops have no reqDN 2019-02-02 21:45:04 +00:00
Howard Chu
765dfaf0e4 ITS#8963 use BIND timeout for start_tls
Since we only support it in conjunction with Bind anyway, not
as a standalone op
2019-01-31 23:37:03 +00:00
Howard Chu
86b486e20a Schema cleanup 2019-01-30 14:06:09 +00:00
Howard Chu
e8c62bf8b4 ITS#8966 add changelog support to syncrepl consumer
Tested against DSEE7. The DSEE binaries must be in your path to run the test script.
2019-01-29 18:51:43 -08:00
Howard Chu
7b587018ec ITS#8472 only do index cleanup if DB is running 2019-01-25 18:11:58 +00:00
Howard Chu
e33d1c5461 ITS#6300 fix kqueue initialization 2019-01-15 21:39:46 +00:00
Quanah Gibson-Mount
b45a6a7dc7 Happy New Year! 2019-01-14 18:46:16 +00:00
Ondřej Kuzník
518e857c03 ITS#8663 Fix memberof SLAP_CONFIG_EMIT 2019-01-14 11:44:35 +00:00
Howard Chu
054c91335b ITS#8952 use msec for epoll / devpoll event wait 2019-01-02 21:51:48 +00:00
Howard Chu
dd760f2abc More for NULL modrdn modlist 2018-12-22 12:58:08 -08:00
Howard Chu
43d5d99494 More for NULL modrdn modlist 2018-12-22 10:40:59 -08:00
Howard Chu
ff6a671e64 MSAD dirsync fixes
Don't hijack whenCreated attribute for createTimestamp
Don't add RDN to entry on modrdn
free cookie on cleanup
2018-12-22 09:08:10 -08:00
Howard Chu
48461cbf7f Allow NULL modlist in modrdn
For compat with MSAD which doesn't add the naming attribute to
the entry during a rename
2018-12-22 09:00:34 -08:00
Howard Chu
6e6e6083b0 cleanup attr.c
rename attr_list to attrs_list to avoid confusion with at.c in gdb
2018-12-22 08:59:20 -08:00
Howard Chu
b4364baca7 Dirsync delete/modrdn fixes
Delete could try to queue a NULL syncCSN (dirsync has none)
Modrdn could try to delete a nonexistent oldRDN (leftover from #7144)
2018-12-22 05:21:56 -08:00
Thorsten Glaser
e0a7049ee5 ITS#8890 fix benign typos
No functional impact
2018-12-18 22:56:18 +00:00
Howard Chu
d8f8a60be8 More for privateKey tweak
Leave olcTLSCertificateKey as its own attr, not a subtype
2018-12-18 21:59:59 +00:00
Howard Chu
0e8c2d5a54 Tweak privateKey schema
We're using PKCS#8 syntax, drop the OpenLDAP syntax OID.
Rename attribute accordingly.
Tweak validator to accept encrypted keys.
2018-12-18 21:27:24 +00:00
Quanah Gibson-Mount
4e23cfc4a9 ITS#8286 - Additional fixes
Fix incorrect matching rules for olcTLSCertificateKey and olcDbCryptKey
Fix SYNTAX for olcRootPW to be octetString
2018-12-18 21:05:09 +00:00
Quanah Gibson-Mount
71a5d7cc0f Fix integerMatch to booleanMatch 2018-12-18 19:26:37 +00:00
Quanah Gibson-Mount
3add82a3bb ITS#8286 -- Add matching rules for attributes
Add matching rules for all cases where it was missing.  Cleanup
incorrect types for a few attributes as well.  Fix network-timeout
handling in back-ldap/meta/asyncmeta.
2018-12-18 19:14:06 +00:00
Ondřej Kuzník
c29542c418 ITS#8845 sc_extendedops is read-only 2018-12-18 18:34:23 +01:00
Howard Chu
190fccbcdc Missed a schema conflict 2018-12-17 16:21:03 -08:00
Howard Chu
9cc97ea9e1 MS AD DirSync support
Requires "attribute_option range=" in config.
No test script provided yet, since testing requires an actual AD server.
2018-12-17 16:11:25 -08:00
Howard Chu
2731ff0c23 ITS#5927 additional fix
Fix 2ee43073e9 to recognize range tags
2018-12-17 13:44:25 -08:00
Howard Chu
12dbcc0eb3 More for revert batched writes 2018-12-14 12:39:07 -08:00
Howard Chu
79ced664b8 Revert batched writes experimental code
Reverts
bea2c5d438
535cf92ff4
5a3a54333c
afa9a9c3e0
due to backend deadlocks
2018-12-13 06:34:54 -08:00
Howard Chu
6081a0307c ITS#8752 cleanup prev commit 2018-12-06 10:26:33 -08:00
Howard Chu
34823321c3 ITS#8752 more for accesslog deadlock
Restructure response/cleanup invocation to avoid cleanup happening before response
2018-12-06 10:03:27 -08:00
Howard Chu
a4fddc7b11 ITS#8932 check rdnNormalize success 2018-11-09 21:16:10 +00:00
Ondřej Kuzník
04a52cef40 ITS#8927 ppolicy: accept replicated changes even in MMR 2018-10-31 09:51:22 +00:00
Ondřej Kuzník
c351616ccd ITS#8866 Fix use-after free 2018-10-26 15:16:41 +01:00
Quanah Gibson-Mount
cd82de56c8 ITS#8866 (cont) slapo-unique
use correct memory allocation/free functions
2018-10-26 01:58:35 +00:00
Michael Ströder
7359a5413a ITS#8866 slapo-unique to return filter used in diagnostic message 2018-10-26 01:54:39 +00:00
Ondřej Kuzník
a2d93d69f0 ITS#8772 Remove reliance on the local rmutex implementation 2018-10-19 13:08:10 +01:00
Nadezhda Ivanova
33876e22d6 ITS#8859 Allow backends which do not need a database to work 2018-10-19 13:08:09 +01:00
Nadezhda Ivanova
d10fc664f7 ITS#8859 Enable backend configuration 2018-10-19 13:08:09 +01:00
Ondřej Kuzník
1f2caff7b9 ITS#8859 Record the correct RDN 2018-10-19 13:08:09 +01:00
Ondřej Kuzník
7127d5db11 ITS#8850 Wait until backends are closed before freeing connection_pool 2018-10-19 13:08:09 +01:00
Ondřej Kuzník
f4e824c8da ITS#8849 Introduce (un)pause callbacks to backends 2018-10-19 13:08:09 +01:00
Ondřej Kuzník
0f4d656a57 ITS#8849 Use server pause facility during config changes 2018-10-19 13:08:09 +01:00
Ondřej Kuzník
fa2ba35ae8 ITS#8849 Introduce slap_(un)pause_server 2018-10-19 13:08:09 +01:00
Ondřej Kuzník
df83989f0f Skip ITS#6545 transition markers when we change mod op 2018-10-18 10:41:43 +01:00
Howard Chu
1e30640037 ITS#8923 fix dyngroup NO_SUCH_OBJECT error handling 2018-10-03 21:58:32 +01:00
Howard Chu
38f95b9ab8 ITS#8918 fix typo 2018-09-24 13:47:09 +01:00
Howard Chu
78229b3a5b ITS#8912 omit hidden DBs from rootDse 2018-09-05 11:42:05 +01:00
Howard Chu
a29391d495 More for multival
fix index record detection
2018-09-01 13:07:58 +01:00
Howard Chu
ba80b97505 Fix index delete
Deleting all indices should also reset default mask
2018-08-31 14:33:22 +01:00
Howard Chu
83acffd83c More for multival
Fix clashes with index records
2018-08-31 14:27:23 +01:00
Howard Chu
8ec9a3bcca More for multival
Tweak config validity check
2018-08-30 15:47:16 +01:00
Howard Chu
111329a2dc More for back-mdb multival
Allow configuring thresholds for specific attributes
2018-08-30 11:24:25 +01:00
Howard Chu
6c221e7730 ITS#8909 additional tweak
Set error code on failure
2018-08-29 02:02:13 +01:00
Howard Chu
36e4dd2828 ITS#8909 fix "authz-policy all" condition
Broken since original commit 113727ba
2018-08-29 01:14:19 +01:00
Ondřej Kuzník
0f320b3442 Fail if we can't change to a directory 2018-07-25 16:19:54 +01:00
Howard Chu
776de6d796 More for back-mdb multival
Make sure a->a_numvals matches id2v counts
2018-07-18 17:58:10 +01:00
Ondřej Kuzník
b06f5b0493 ITS#8663 Improve memberof cn=config handling 2018-07-02 16:19:54 +01:00
Ondřej Kuzník
dac02c7ef1 ITS#8667 Do not finish glue initialisation in tool mode unless requested 2018-07-02 16:19:48 +01:00
Ondřej Kuzník
242ab9c6ef ITS#8845 Recognise control-exop compatibility 2018-07-02 16:18:26 +01:00
Howard Chu
8568716376 ITS#8868 don't convert IDL to range needlessly
in idl_intersection. It may lose precision in a subsequent union.
2018-06-22 00:31:04 +01:00
Ondřej Kuzník
8a259e3df1 ITS#8573 allow all libldap options in tools -o option 2018-06-14 16:19:10 +01:00
Howard Chu
5292fb3a3b Fix ldif-wrap errmsg typo 2018-06-13 16:19:04 +01:00
Howard Chu
9069cbe543 ITS#8616 don't check for existing value when deleting values 2018-05-24 17:53:10 +01:00
Ondřej Kuzník
77e87690c0 Make syntax highlighting/folding happier 2018-05-10 11:58:21 +01:00
Howard Chu
0ba50a1d06 ITS#8843 check for NULL modlist 2018-05-02 16:51:49 +01:00
Quanah Gibson-Mount
f32384ef44 ITS#8840 Fix domainScope control to ensure the control value is absent as per Microsoft specification (https://msdn.microsoft.com/en-us/library/aa366979%28v=vs.85%29.aspx). 2018-04-30 17:33:22 +00:00
Quanah Gibson-Mount
59e9ff6243 Happy New Year 2018-03-22 15:35:24 +00:00
Howard Chu
8300eee017 back-mdb Multival fixes
Fix multival logic on Replace
Fix return codes from modify_internal, id2entry_put
2018-02-28 22:37:38 +00:00
Howard Chu
08851a8200 ITS#8789 revert previous patch
And try another approach. Always write contextCSN updates, but
don't set dont_replicate for updates we want propagated.
2018-02-28 22:19:57 +00:00
Howard Chu
e0cc94a0b7 ITS#8789 avoid unnecessary writes of context entry
If syncprov is present, only write contextCSN attribute on
actual state changes, not on per-entry modifications.
Continue to update in-memory cookieState. Saves overhead,
syncprov will eventually checkpoint it into the DB anyway.
2018-02-21 19:51:59 +00:00
Howard Chu
434c306cbe Add debug msg if adding entry to logDB fails 2018-02-21 19:50:45 +00:00
Howard Chu
9fc6b894ec ITS#8752 accesslog: partially revert 3bb8b737ed 2018-02-21 19:48:02 +00:00
Howard Chu
dc3b3be429 ITS#8486 Don't keep sl_mutex locked when playing the sessionlog 2018-02-11 16:47:47 +00:00
Howard Chu
0c1ebd178c ITS#8801 Fix CSN queue processing 2018-02-08 00:18:00 +00:00
Howard Chu
4d1077ffa4 ITS#8800 remove originator check in syncprov_search_response
Let the entryCSN check do all the work. Reloading a server from an old
backup needs this to go thru.
2018-02-08 00:17:07 +00:00
Howard Chu
0eb577632f ITS#8607 Don't record checkpoints 2018-02-08 00:16:50 +00:00
Howard Chu
ca7f697e14 ITS#8100 fixes for delta-syncrepl with empty accesslog
Update syncprov contextCSNs when context entry is added.
Fix accesslog to properly tag Add op when adding context entry.
2018-01-30 21:40:05 +00:00
Ondřej Kuzník
52f7daab01 ITS#8796 Fix SSF reset
Maintain the SSF across SASL binds.
2018-01-15 16:58:58 +00:00
Hallvard Furuseth
57253688b3 ITS#8778 Fix telephoneNumberNormalize("-" or " ") 2017-11-26 21:22:23 +01:00
Quanah Gibson-Mount
c5b73dd85b ITS#6300 -- Update for multi-listener support 2017-10-19 14:55:01 -07:00
Bryan Duncan
a25046535c ITS #6300: Added support for using kqueue in slapd (for systems that support kqueue(2).
Patch obtained from:
        http://public.me.com/bryan.duncan/bryan-duncan.kqueue.090922.patch

 # This patch file is derived from OpenLDAP Software. All of the
 # modifications to OpenLDAP Software represented in the following
 # patch(es) were developed by Apple.  I, Bryan Duncan, am authorized by
 # Apple, my employer, to release this work under the following terms.
 #
 # Copyright 2009 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted only as authorized by the OpenLDAP
 # Public License.
 #
 # A copy of this license is available in file LICENSE in the
 # top-level directory of the distribution or, alternatively, at
 # http://www.OpenLDAP.org/license.html.
 #
2017-10-19 14:54:50 -07:00