Improve LDAP Plugin for Filedaemon (Backport PR #595 to bareos-19.2)#601
Merged
arogge merged 7 commits intobareos:bareos-19.2from Sep 17, 2020
Merged
Conversation
(backported from commit 41bb9f6)
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. (backport of commit 35451a0)
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. (backport of commit e9b60b1)
Previously the plugin would not back up large objects (>64k ldif data). This patch now adds support for these larger objects. (backport of commit 7ee398a)
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. (backport of commit 0f53026)
This patch implements compatibility with python-ldap 2.x and 3.x. (cherry picked from commit c94a0a5)
pstorz
approved these changes
Sep 17, 2020
Member
pstorz
left a comment
There was a problem hiding this comment.
Good work! I only added one commit so that the PYTHON detection is done before the first usage.
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.
No description provided.