Skip to content

Improve LDAP Plugin for Filedaemon (Backport PR #595 to bareos-19.2)#601

Merged
arogge merged 7 commits intobareos:bareos-19.2from
arogge:dev/arogge/bareos-19.2/TT4200674
Sep 17, 2020
Merged

Improve LDAP Plugin for Filedaemon (Backport PR #595 to bareos-19.2)#601
arogge merged 7 commits intobareos:bareos-19.2from
arogge:dev/arogge/bareos-19.2/TT4200674

Conversation

@arogge
Copy link
Member

@arogge arogge commented Sep 16, 2020

No description provided.

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)
@arogge arogge requested a review from pstorz September 16, 2020 13:33
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! I only added one commit so that the PYTHON detection is done before the first usage.

@arogge arogge merged commit d172180 into bareos:bareos-19.2 Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants