Skip to content
Snippets Groups Projects
Commit b0121805 authored by Timo Sirainen's avatar Timo Sirainen
Browse files

plugins: sieve-extprograms: Adjust to lib-program-client API changes

parent baad32ac
No related branches found
No related tags found
No related merge requests found
...@@ -373,7 +373,6 @@ struct sieve_extprogram { ...@@ -373,7 +373,6 @@ struct sieve_extprogram {
const struct sieve_extprograms_config *ext_config; const struct sieve_extprograms_config *ext_config;
const struct sieve_script_env *scriptenv; const struct sieve_script_env *scriptenv;
struct program_client_settings set;
struct program_client *program_client; struct program_client *program_client;
}; };
...@@ -521,23 +520,18 @@ struct sieve_extprogram *sieve_extprogram_create ...@@ -521,23 +520,18 @@ struct sieve_extprogram *sieve_extprogram_create
sprog->ext_config = ext_config; sprog->ext_config = ext_config;
sprog->scriptenv = senv; sprog->scriptenv = senv;
sprog->set.client_connect_timeout_msecs = struct program_client_parameters pc_params = {
SIEVE_EXTPROGRAMS_CONNECT_TIMEOUT_MSECS; .client_connect_timeout_msecs =
sprog->set.input_idle_timeout_msecs = SIEVE_EXTPROGRAMS_CONNECT_TIMEOUT_MSECS,
ext_config->execute_timeout * 1000; .input_idle_timeout_msecs = ext_config->execute_timeout * 1000,
restrict_access_init(&sprog->set.restrict_set); };
if (senv->user->uid != 0)
sprog->set.restrict_set.uid = senv->user->uid;
if (senv->user->gid != 0)
sprog->set.restrict_set.gid = senv->user->gid;
sprog->set.debug = svinst->debug;
if ( fork ) { if ( fork ) {
sprog->program_client = sprog->program_client =
program_client_local_create(path, args, &sprog->set); program_client_local_create(svinst->event, path, args, &pc_params);
} else { } else {
sprog->program_client = sprog->program_client =
program_client_unix_create(path, args, &sprog->set, FALSE); program_client_unix_create(svinst->event, path, args, &pc_params);
} }
if ( svinst->username != NULL ) if ( svinst->username != NULL )
......
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.