fiche icon indicating copy to clipboard operation
fiche copied to clipboard

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

Open m0n73 opened this issue 4 years ago • 1 comments

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 avatar Aug 20 '20 17:08 m0n73

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

m0n73 avatar Sep 06 '20 06:09 m0n73