Skip to content

Conversation

@HeikoSchlittermann
Copy link

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.

Re-read the filter file with the runtime user permissions,
create useful log message when the filter cannot be read.
Fixes Debian #756040.
@rofl0r
Copy link
Contributor

rofl0r commented Dec 20, 2018

funny, was just about to remove the SIGHUP functionality at all... see: #218

*/
if (connfd < 0) {
log_message (LOG_ERR,
if (errno != EAGAIN) /* do not spam the logs */
Copy link
Contributor

Choose a reason for hiding this comment

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

under which circumstances do you get an EAGAIN here ?

@HeikoSchlittermann
Copy link
Author

HeikoSchlittermann commented Dec 20, 2018 via email

@HeikoSchlittermann
Copy link
Author

HeikoSchlittermann commented Dec 20, 2018 via email

@rofl0r
Copy link
Contributor

rofl0r commented May 2, 2022

i think this PR is no longer needed; if i'm wrong on that please reopen.

@rofl0r rofl0r closed this May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants