-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#424] Improve the invalid master key file error #443
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that there is the usage of user_path
everywhere, but it sould be related to the specific path we are looking for, or am I missing something here? Also, a configuration error should not point to an invalida master key file error, since it is more an error in the configuration and not in the "cannot decrypt".
{ | ||
|
||
snprintf(message, MISC_LENGTH, "Invalid master key file"); | ||
snprintf(message, MISC_LENGTH, "USERS configuration file cannot decrypt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change the message to "Cannot decrypt USERS file" ?
|| ret == PGAGROAL_CONFIGURATION_STATUS_KO) | ||
else if (ret == PGAGROAL_CONFIGURATION_STATUS_KO) | ||
{ | ||
snprintf(message, MISC_LENGTH, "Invalid master key file"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why "invalid master key file"? This branch is for configuration errors on frontend user file.
{ | ||
snprintf(message, MISC_LENGTH, "Invalid master key file"); | ||
#ifdef HAVE_LINUX | ||
sd_notifyf(0, "STATUS=%s: %s", message, users_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why user_path
? Shouldn't it be frontend_users_path
?
#endif | ||
errx(1, "Invalid master key file"); | ||
errx(1, "%s (file <%s>)", message, users_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user_path
shoud be frontend_user_path
or not?
#ifdef HAVE_LINUX | ||
sd_notify(0, "STATUS=Invalid master key file"); | ||
sd_notifyf(0, "STATUS=%s: %s", message, users_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message should be about configuration error.
#endif | ||
errx(1, "Invalid master key file"); | ||
errx(1, "%s (file <%s>)", message, users_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user_path
should be 'admins_path`?
{ | ||
snprintf(message, MISC_LENGTH, "Invalid master key file"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message should be about configuration errors.
#ifdef HAVE_LINUX | ||
sd_notify(0, "STATUS=Invalid master key file"); | ||
sd_notifyf(0, "STATUS=%s: %s", message, users_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
users
pathshould be
superuser_path`?
Clsoing because no activity has been done after my review. @T1t4m1un if you wish to complete this job, please rebase and reopen. |
No description provided.