auth-master.h revision 89fda66c5c4204f3bc27e160fbadb463e028b811
#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 {
};
struct auth_master_connection *
/* Returns the auth_socket_path */
/* 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). */
/* Flush authentication cache for everyone (users=NULL) or only for specified
users. Returns number of users flushed from cache. */
/* 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,
const struct auth_user_info *info);
/* Returns -1 if anything failed, 0 if ok */
#endif