Skip to content

BareosCheckFunctions: check for chflags()#963

Merged
arogge merged 4 commits intomasterfrom
dev/pstorz/master/freebsd-havechflags
Nov 11, 2021
Merged

BareosCheckFunctions: check for chflags()#963
arogge merged 4 commits intomasterfrom
dev/pstorz/master/freebsd-havechflags

Conversation

@pstorz
Copy link
Member

@pstorz pstorz commented Oct 22, 2021

Thank you for contributing to the Bareos Project!

When porting to cmake, accidentially the check for the chflags() function was overseen.
This check is now added with this PR.

This enables the build of the support of backup and restore of BSD File Flags:

In addition to file permissions, FreeBSD supports the use of "file flags". These flags add an additional level of security and control over files, but not directories. With file flags, even root can be prevented from removing or altering files.

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
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
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
  • git status should not report modifications in the source tree after building and testing
Tests
  • Decision taken that a system- or unittest is required (if not, then remove this paragraph)
  • The decision towards a systemtest is reasonable compared to a unittest
  • Testname matches exactly what is being tested
  • Output of the test leads quickly to the origin of the fault

@arogge
Copy link
Member

arogge commented Oct 26, 2021

Technically, I agree with this.
But I guess you didn't come up with this out of thin air, so maybe we want to describe what issue this patch actually fixes?

@pstorz
Copy link
Member Author

pstorz commented Oct 26, 2021

The description what is done is added and also added a line to the changelog.

@pstorz pstorz force-pushed the dev/pstorz/master/freebsd-havechflags branch from 641e918 to b360458 Compare November 9, 2021 10:58
#shellcheck source=../scripts/functions
. "${rscripts}"/functions

BackupFile="${tmp}/file-with-acl"
Copy link
Member

Choose a reason for hiding this comment

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

Naming should use chflags and not acl

Suggested change
BackupFile="${tmp}/file-with-acl"
BackupFile="${tmp}/file-with-chflags"

@pstorz pstorz force-pushed the dev/pstorz/master/freebsd-havechflags branch 2 times, most recently from d9d6c54 to 6bcc9d8 Compare November 9, 2021 12:04
@arogge arogge force-pushed the dev/pstorz/master/freebsd-havechflags branch from 6bcc9d8 to 49d3c5b Compare November 11, 2021 14:06
@arogge arogge merged commit b57c50b into master Nov 11, 2021
@arogge arogge deleted the dev/pstorz/master/freebsd-havechflags branch November 11, 2021 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants