auth-master.h revision a10ed8c47534b4c6b6bf2711ccfe577e720a47b4
#ifndef AUTH_MASTER_H
#define AUTH_MASTER_H
#include "network.h"
enum auth_master_flags {
/* Enable logging debug information */
AUTH_MASTER_FLAG_DEBUG = 0x01,
/* Don't disconnect from auth socket when idling */
};
struct auth_user_info {
const char *service;
unsigned int local_port, remote_port;
};
struct auth_user_reply {
unsigned int anonymous:1;
};
struct auth_master_connection *
/* Do a USER lookup. Returns -1 = error, 0 = user not found, 1 = ok.
When returning -1 and fields[0] isn't NULL, it contains an error message
that should be shown to user. */
const char *const **fields_r);
/* Do a PASS lookup (the actual password isn't returned). */
/* Parse userdb extra fields into auth_user_reply structure. */
struct auth_user_reply *reply_r);
/* Iterate through all users. If user_mask is non-NULL, it contains a string
with wildcards ('*', '?') that the auth server MAY use to limit what users
are returned (but it may as well return all users anyway). */
struct auth_master_user_list_ctx *
const char *user_mask,
/* Returns -1 if anything failed, 0 if ok */
#endif