Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@georglauterbach
Copy link
Member

@georglauterbach georglauterbach commented Feb 5, 2024

Description

Fixes #3873

Type of change

  • Improvement (non-breaking change that does improve existing functionality)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary, I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added information about changes made in this PR to CHANGELOG.md

`rm` would fail when one of the files is not present, which is quite
undesirable log (not harmful until `set -e` is introduced).
@georglauterbach georglauterbach self-assigned this Feb 5, 2024
@georglauterbach georglauterbach added area/scripts kind/improvement Improve an existing feature, configuration file or the documentation service/security/rspamd labels Feb 5, 2024
@georglauterbach georglauterbach added this to the v14.0.0 milestone Feb 5, 2024
Copy link
Member

@polarathene polarathene left a comment

Choose a reason for hiding this comment

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

Approving since __do_as_rspamd_user() only appears to be relevant to the rspamd DKIM generation script.

We'd have avoided all this if permissions on the config volume weren't relevant correct? After the LDAP feature rework is done I'll fix up DKIM keypair generation for v15 too.

@georglauterbach
Copy link
Member Author

We'd have avoided all this if permissions on the config volume weren't relevant correct?

Absolutely!

@georglauterbach georglauterbach merged commit 4f222fe into master Feb 5, 2024
@georglauterbach georglauterbach deleted the rspamd/dkim branch February 5, 2024 23:30
Comment on lines +180 to +182
[[ -f ${PUBLIC_KEY_FILE} ]] && rm "${PUBLIC_KEY_FILE}"
[[ -f ${PUBLIC_KEY_DNS_FILE} ]] && rm "${PUBLIC_KEY_DNS_FILE}"
[[ -f ${PRIVATE_KEY_FILE} ]] && rm "${PRIVATE_KEY_FILE}"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe for a follow up "tuning":

rm -f "${PUBLIC_KEY_FILE}" etc. will always succeed, no matter if the file exist or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/scripts kind/improvement Improve an existing feature, configuration file or the documentation service/security/rspamd

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Rspamd create dkim key permissions errors

4 participants