diff --git a/main.c b/main.c index c7db77e..a61e59b 100644 --- a/main.c +++ b/main.c @@ -75,6 +75,11 @@ main(int argc, char * argv[]) who_am_i = text_easy_sprintf("%s/%s", buf, argv[0]); } + /* Set our real user id equal to the effective user id to avoid + confusion in case we're started as a setuid binary. */ + + setreuid(geteuid(), geteuid()); + /* Parse the command line. */ argv_help_string = "Petidomo Mailing List Server";