Skip to content
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

Closed

Conversation

audreylace
Copy link
Contributor

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.

@audreylace audreylace changed the title Fix configuration bug in radvd upstream - issue 220 Bug fix: Fix configuration bug in radvd upstream - issue 220 Dec 8, 2023
Comment on lines +576 to +593

/*
* 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);
}
Copy link
Member

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.

@Neustradamus
Copy link
Member

@audreylace: Have you seen @robbat2 comment?

@robbat2
Copy link
Member

robbat2 commented Jan 23, 2024

@audreylace are you going to refactor, I would consider this a soft blocker for the 2.20 release

@Neustradamus
Copy link
Member

@robbat2: It is only this which blocks a 2.20?

What must be changed in this @audreylace PR to be merged?

@Neustradamus
Copy link
Member

@audreylace: Any progress on it?

@Neustradamus
Copy link
Member

@audreylace: Can you look @robbat2 comment from 2023-12-09?

@audreylace audreylace closed this Nov 27, 2024
@Neustradamus
Copy link
Member

@audreylace: Why have you closed your PR? :/

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

Successfully merging this pull request may close these issues.

3 participants