示例#1
0
static bool director_username_hash(struct client *client, unsigned int *hash_r)
{
	const char *error;

	if (!mail_user_hash(client->virtual_user,
			    client->set->director_username_hash,
			    hash_r, &error)) {
		i_error("Failed to expand director_username_hash=%s: %s",
			client->set->director_username_hash, error);
		return FALSE;
	}
	return TRUE;
}
示例#2
0
文件: login-proxy.c 项目: bjacke/core
static unsigned int director_username_hash(struct client *client)
{
	return mail_user_hash(client->virtual_user,
			      client->set->director_username_hash);
}
示例#3
0
		i_error("Director disconnected unexpectedly");
		doveadm_exit_code = EX_TEMPFAIL;
	}
	director_disconnect(ctx);
}

static void
user_list_add(const char *username, pool_t pool,
	      HASH_TABLE_TYPE(user_list) users)
{
	struct user_list *user, *old_user;
	unsigned int user_hash;

	user = p_new(pool, struct user_list, 1);
	user->name = p_strdup(pool, username);
	user_hash = mail_user_hash(username, doveadm_settings->director_username_hash);

	old_user = hash_table_lookup(users, POINTER_CAST(user_hash));
	if (old_user != NULL)
		user->next = old_user;
	hash_table_insert(users, POINTER_CAST(user_hash), user);
}

static void ATTR_NULL(1)
userdb_get_user_list(const char *auth_socket_path, pool_t pool,
		     HASH_TABLE_TYPE(user_list) users)
{
	struct auth_master_user_list_ctx *ctx;
	struct auth_master_connection *conn;
	const char *username;