Skip to content

Check whether the logfile is a regular file. Fixed incomplete privilege drop.#105

Open
m0n73 wants to merge 2 commits intosolusipse:masterfrom
m0n73:master
Open

Check whether the logfile is a regular file. Fixed incomplete privilege drop.#105
m0n73 wants to merge 2 commits intosolusipse:masterfrom
m0n73:master

Conversation

@m0n73
Copy link

@m0n73 m0n73 commented Aug 20, 2020

If the requested log file (-l option) isn't a regular file, fopen will fail to open it, subsequently passing a NULL pointer into fclose which causes a segfault. This patch adds an appropriate file type check and shifts the logic around, so that we only create a new log file if it doesn't already exist.

@m0n73
Copy link
Author

m0n73 commented Sep 6, 2020

Adding another commit to this pull request, which fixes incomplete privilege drop in perform_user_change().

@m0n73 m0n73 changed the title Check whether the logfile is a regular file. Check whether the logfile is a regular file. Fixed incomplete privilege drop. Sep 6, 2020
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.

1 participant