It can be accessed via the user parameter.
return ret;
}
-void mail_storage_service_restrict_setenv(struct mail_storage_service_ctx *ctx,
- struct mail_storage_service_user *user)
+void mail_storage_service_restrict_setenv(struct mail_storage_service_user *user)
{
struct mail_storage_service_privileges priv;
const char *error;
- if (service_parse_privileges(ctx, user, &priv, &error) < 0)
+ if (service_parse_privileges(user->service_ctx, user, &priv, &error) < 0)
i_fatal("user %s: %s", user->input.username, error);
if (service_drop_privileges(user, &priv,
TRUE, FALSE, TRUE, &error) < 0)
const char *session_id_postfix,
struct mail_user **mail_user_r,
const char **error_r);
-void mail_storage_service_restrict_setenv(struct mail_storage_service_ctx *ctx,
- struct mail_storage_service_user *user);
+void mail_storage_service_restrict_setenv(struct mail_storage_service_user *user);
/* Combine lookup() and next() into one call. */
int mail_storage_service_lookup_next(struct mail_storage_service_ctx *ctx,
const struct mail_storage_service_input *input,
service_ctx = mail_storage_service_init(master_service, NULL, flags);
if (mail_storage_service_lookup(service_ctx, &input, &user, &error) <= 0)
i_fatal("%s", error);
- mail_storage_service_restrict_setenv(service_ctx, user);
+ mail_storage_service_restrict_setenv(user);
/* we can't exec anything in a chroot */
env_remove("RESTRICT_CHROOT");
restrict_access_by_env(0, getenv("HOME"));