Commit 62646396 62646396b031ead023196feda7eea63d14075f8e by Sergey Poznyakoff

Reset the user privileges in case popauth is installed setuid.

1 parent 7f2497fe
......@@ -270,12 +270,15 @@ action_create (struct action_data *ap)
char buf[256];
int line = 0;
/* Make sure we have proper privileges if popauth is setuid */
setuid (getuid ());
if (ap->input_name)
{
fp = fopen (ap->input_name, "r");
if (!fp)
{
mu_error("can't create %s: %s", ap->input_name, strerror (errno));
mu_error("can't open %s: %s", ap->input_name, strerror (errno));
return 1;
}
}
......