Improve LDAP Plugin for Filedaemon#595
Merged
pstorz merged 8 commits intobareos:masterfrom Sep 16, 2020
Merged
Conversation
Previously the destination dn when restoring an ldap object was generated in a way that made it really hard to restore do a different location. This patch replaces the parser with a much more relaxed approach that accepts different syntaxes. The new behaviour uses every path component that contains an equals-sign (=) and builds a DN out of these.
When the LDAP plugin fails to back up an object, it will be recorded in the catlog, but the data will be missing. Previously these objects were silently ignored during restore, leading to an incomplete set of restored objects. This patch now adds a rudimentary detection of this case by checking if plugin_io() is called with IO_READ, IO_WRITE or IO_SEEK between the calls to IO_OPEN and IO_CLOSE. When there is no call we now emit a warning that there was no data to restore the object.
Previously the plugin would not back up large objects (>64k ldif data). This patch now adds support for these larger objects.
Bareos cannot handle objects with a slash in their name gracefully, because it is the path delimiter. This patch adds detection of DNs the contain a slash to the plugin. It will now correctly raise an error and will no longer try to back up that data.
pstorz
reviewed
Sep 15, 2020
Member
pstorz
left a comment
There was a problem hiding this comment.
Very impressive. Please check my comments.
systemtests/tests/py2plug-fd-ldap/etc/bareos/bareos-dir.d/fileset/PluginTest.conf.in
Show resolved
Hide resolved
This patch implements compatibility with python-ldap 2.x and 3.x.
3bc1a8c to
4a77178
Compare
Member
|
I am happy with the current status and could run the tests locally with python-ldap 2.5.2 and 3.3.1 Good work! |
arogge
added a commit
that referenced
this pull request
Sep 17, 2020
Improve LDAP Plugin for Filedaemon (Backport PR #595 to bareos-19.2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a systemtest for the Filedaemon's LDAP-Plugin and fixes a few bugs: