bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
f59c16625dc8fb1b734fddbba58012ec42cf945dTimo Sirainen#define REPLICATOR_AUTH_SERVICE_NAME "replicator"
f59c16625dc8fb1b734fddbba58012ec42cf945dTimo Sirainenvoid replicator_queue_add_auth_users(struct replicator_queue *queue,
f59c16625dc8fb1b734fddbba58012ec42cf945dTimo Sirainen auth_conn = auth_master_init(auth_socket_path,
f59c16625dc8fb1b734fddbba58012ec42cf945dTimo Sirainen user_info.service = REPLICATOR_AUTH_SERVICE_NAME;
f59c16625dc8fb1b734fddbba58012ec42cf945dTimo Sirainen /* add all users into replication queue, so that we can start doing
f59c16625dc8fb1b734fddbba58012ec42cf945dTimo Sirainen full syncs for everyone whose state can't be found */
f59c16625dc8fb1b734fddbba58012ec42cf945dTimo Sirainen ctx = auth_master_user_list_init(auth_conn, usermask, &user_info);
f59c16625dc8fb1b734fddbba58012ec42cf945dTimo Sirainen while ((username = auth_master_user_list_next(ctx)) != NULL) {
f59c16625dc8fb1b734fddbba58012ec42cf945dTimo Sirainen i_error("listing users failed, can't replicate existing data");