Skip to content
Snippets Groups Projects
Commit ca5e55cb authored by Stephan Bosch's avatar Stephan Bosch
Browse files

ManageSieve: check for DUMP_CAPABILITY=1 before executing dump capability to...

ManageSieve: check for DUMP_CAPABILITY=1 before executing dump capability to prevent infinite recursion.
parent 3451298d
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@
#include <unistd.h>
#include <sys/wait.h>
#include <sysexits.h>
#include <stdlib.h>
typedef enum { CAP_SIEVE, CAP_NOTIFY } capability_type_t;
......@@ -105,6 +106,9 @@ static bool capability_dump(void)
unsigned int pos;
pid_t pid;
if ( getenv("DUMP_CAPABILITY") != NULL )
return TRUE;
if ( pipe(fd) < 0 ) {
i_error("managesieve-login: dump-capability pipe() failed: %m");
return FALSE;
......@@ -196,11 +200,9 @@ static void managesieve_login_config_parser_begin(struct config_parser_context *
}
}
/* Currently fails and makes doveconf go berserk
if ( capability_sieve != NULL )
managesieve_login_config_set(ctx, "managesieve_sieve_capability", capability_sieve);
if ( capability_notify != NULL )
managesieve_login_config_set(ctx, "managesieve_notify_capability", capability_notify);*/
managesieve_login_config_set(ctx, "managesieve_notify_capability", capability_notify);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.