Skip to content

daemons: fix issue with group and users commandline options#1206

Merged
pstorz merged 11 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/fix-user-option-crash
Jul 26, 2022
Merged

daemons: fix issue with group and users commandline options#1206
pstorz merged 11 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/fix-user-option-crash

Conversation

@alaaeddineelamri
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri commented Jul 19, 2022

Description:

After the introduction of the new CLI options, the -p, -u and -g options can make daemons crash. This PR fixes the issue.
Also adding some helpful messages for the changed options.

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
  • If backport: add original PR number and target branch at top of this file: Backport of PR#000 to bareos-2x
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 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

@alaaeddineelamri alaaeddineelamri marked this pull request as ready for review July 19, 2022 08:41
@alaaeddineelamri alaaeddineelamri marked this pull request as draft July 19, 2022 10:00
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/fix-user-option-crash branch 2 times, most recently from f922cc5 to 34d58e8 Compare July 19, 2022 14:17
@alaaeddineelamri alaaeddineelamri marked this pull request as ready for review July 19, 2022 15:44
@alaaeddineelamri alaaeddineelamri requested a review from pstorz July 19, 2022 15:54
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.

Looks good, only unified usage of c_str() would make sense.

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/fix-user-option-crash branch from 34d58e8 to 3e614a8 Compare July 20, 2022 13:07
@alaaeddineelamri alaaeddineelamri requested a review from pstorz July 20, 2022 13:10
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/fix-user-option-crash branch 9 times, most recently from 65a870a to ecd9295 Compare July 25, 2022 08:55
@pstorz pstorz changed the title daemons: fix issue with group and users options daemons: fix issue with group and users commandline options Jul 25, 2022
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, Please see the comments.

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/fix-user-option-crash branch from ecd9295 to 71c2b4a Compare July 25, 2022 19:25
updated daemons help messages
Alaa Eddine Elamri added 5 commits July 26, 2022 13:01
Most of the bareos CLI options are used throughout tests and are 
therefore tested, meaning if there is any issue with one of those options, 
the tests that use them will break. This is valid for -f, -d, --dt, -c, --xs, etc.

Certain other options like -u, -g, -r, -p are not tested, and there is no 
basic way to test if at least the daemons don't crash because of them.
update help doc
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/fix-user-option-crash branch from 4dd7112 to d67d8be Compare July 26, 2022 11:02
@pstorz pstorz merged commit 7855a6d into bareos:master Jul 26, 2022
@pstorz pstorz deleted the dev/alaaeddineelamri/master/fix-user-option-crash branch July 26, 2022 14:55
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