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