-
Notifications
You must be signed in to change notification settings - Fork 106
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
Bug fix: Fix configuration bug in radvd upstream - issue 220 #222
Bug fix: Fix configuration bug in radvd upstream - issue 220 #222
Conversation
|
||
/* | ||
* check that 'other' cannot write the file | ||
* for non-root, also that self/own group can't either | ||
*/ | ||
int do_reload = 1; | ||
if (check_conffile_perm(username, conf_path) != 0) { | ||
if (get_debuglevel() == 0) { | ||
flog(LOG_ERR, "permissions on conf_file invalid, ignoring reload request"); | ||
do_reload = 0; | ||
} else { | ||
flog(LOG_WARNING, "Insecure file permissions, but continuing reload anyway"); | ||
} | ||
} | ||
|
||
if (do_reload) { | ||
ifaces = reload_config(sock, ifaces, conf_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 just almost-duplicates the existing code.
Please refactor to introduce a new function that gets used in both places, and either exits or skips reloading in the caller.
@audreylace: Have you seen @robbat2 comment? |
@audreylace are you going to refactor, I would consider this a soft blocker for the 2.20 release |
@robbat2: It is only this which blocks a 2.20? What must be changed in this @audreylace PR to be merged? |
@audreylace: Any progress on it? |
@audreylace: Can you look @robbat2 comment from 2023-12-09? |
@audreylace: Why have you closed your PR? :/ |
Fix for issue 220. We will now check the permissions of the configuration file before reloading. If the checks fail, then the reload request is ignored.