Skip to content

Commit

Permalink
main: don't use secure_getenv
Browse files Browse the repository at this point in the history
secure_getenv() only makes sense in very specific circumstances (namely
in libraries that are used by setuid binaries, where the environment
variables can have a security impact). None of these factors apply to
our CATATONIT_* log configuration variables.

Signed-off-by: Aleksa Sarai <[email protected]>
  • Loading branch information
cyphar committed Dec 14, 2024
1 parent 773bd3c commit 56579ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions catatonit.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,11 @@ static int reap_zombies(pid_t pid1, int *pid1_exitcode)
int main(int argc, char **argv)
{
/* If CATATONIT_DEBUG is defined we change the global log level. */
char *logstring = secure_getenv("CATATONIT_DEBUG");
char *logstring = getenv("CATATONIT_DEBUG");
if (logstring != NULL)
global_log_level = LOG_DEBUG;
/* CATATONIT_LOG is reserved for future use. */
if (secure_getenv("CATATONIT_LOG"))
if (getenv("CATATONIT_LOG"))
bail("CATATONIT_LOG is reserved for future use");

/*
Expand Down

0 comments on commit 56579ad

Please sign in to comment.