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

lib-sieve: file storage: When autodetecting storage path, use home even if it doesn't exist

If a home directory is given, it's assumed that it will be autocreated even
if it doesn't initially exist. Earlier the autocreation may have been done
by lib-storage as it created the mail root directory, but this no longer
happens.
parent cedc5e4b
No related branches found
No related tags found
No related merge requests found
......@@ -602,18 +602,9 @@ static void sieve_file_storage_autodetect
* It's $HOME/sieve or /sieve when (presumed to be) chrooted.
*/
if ( home != NULL && *home != '\0' ) {
if (access(home, mode) == 0) {
/* Use default ~/sieve */
sieve_storage_sys_debug(storage,
"Root exists (%s)", home);
*storage_path_r = t_strconcat(home, "/sieve", NULL);
} else {
/* Don't have required access on the home directory */
sieve_storage_sys_debug(storage,
"access(%s, rwx) failed: %m", home);
}
/* Use default ~/sieve */
sieve_storage_sys_debug(storage, "Use home (%s)", home);
*storage_path_r = t_strconcat(home, "/sieve", NULL);
} else {
sieve_storage_sys_debug(storage,
"HOME is not set");
......
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.