Skip to content

filed: fix handling of STREAM_ACL_PLUGIN during restore#1308

Merged
arogge merged 13 commits intomasterfrom
dev/pstorz/master/fix-acl-plugin-stream-handling
Dec 7, 2022
Merged

filed: fix handling of STREAM_ACL_PLUGIN during restore#1308
arogge merged 13 commits intomasterfrom
dev/pstorz/master/fix-acl-plugin-stream-handling

Conversation

@pstorz
Copy link
Member

@pstorz pstorz commented Nov 9, 2022

Thank you for contributing to the Bareos Project!

The handling of acl streams created by plugins was missing in the restore code of the filedaemon, whi ch results in the error message: Warning: Unknown stream=1020 ignored. This shouldn't happen!.

This PR fixes the problem, and also adds some example code how to handle the acl data in the python plugins.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Is the PR title usable as CHANGELOG entry?
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@arogge
Copy link
Member

arogge commented Nov 10, 2022

Looks good. We may want to have a test that actually tries to backup and restore xattr and acl though.

@pstorz pstorz force-pushed the dev/pstorz/master/fix-acl-plugin-stream-handling branch from 4fb4a16 to bdccdca Compare November 16, 2022 19:37
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

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

See comments.

@pstorz pstorz force-pushed the dev/pstorz/master/fix-acl-plugin-stream-handling branch 3 times, most recently from d3561db to fa5da5f Compare November 23, 2022 10:42
@pstorz pstorz requested a review from arogge December 5, 2022 08:27
@arogge arogge force-pushed the dev/pstorz/master/fix-acl-plugin-stream-handling branch from ee7afb9 to e6e15c3 Compare December 7, 2022 10:35
@arogge arogge force-pushed the dev/pstorz/master/fix-acl-plugin-stream-handling branch 8 times, most recently from e5eeadb to e6e15c3 Compare December 7, 2022 11:58
Add get_xattr()/set_xattr()/get_acl()/set_acl() to
BareosFdPluginLocalFileset.py.
Enable support for ACL and XATTR in fileset.
pstorz and others added 10 commits December 7, 2022 12:58
Saves us from buffer overrun when printing the content via dmsg();
Move get/set_acl() and get/set_xattr() functions into
BareosFdPluginBaseclass.py.
Also remove the non-utf8 file from the python3 test as currently that
does not work
PyAclPacketToNative() will now fail and return false if the provided
data was not a bytearray
Move code from duplicate BareosFdPluginLocalFileset into
BareosFdPluginLocalFilesetAclXattr.
@arogge arogge force-pushed the dev/pstorz/master/fix-acl-plugin-stream-handling branch from 0bf7489 to 0b968d5 Compare December 7, 2022 11:58
@arogge arogge merged commit f037d72 into master Dec 7, 2022
@arogge arogge deleted the dev/pstorz/master/fix-acl-plugin-stream-handling branch December 7, 2022 11:58
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