log failure in filter reload, use lowered permissions on initial filter-read #219
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a long standing bug entry in the Debian packaged tinyproxy (Debian #756040).
I fixed this some years ago and I believe, the fix could be included in the upstream source.
Old behaviour:
Tinyproxy read the config and the filter file with the startup permissions (usually root).
After a HUP (reload), e.g. issued after regular logrotate, the child processes ran with lowered permissions and - depending on the perms of the filter file - they couldn't re-read the filter. And they didn't even iussed a notice about that failure.
New behaviour:
Read the filter definition after changing the uid of the tinyproxy processes, and write a log message there is a failure in reading the filter definition.