MySQL  8.0.21
Source Code Documentation
isasl.h
Go to the documentation of this file.
1 #ifndef ISASL_H
2 #define ISASL_H 1
3 
4 #define SASL_CB_LIST_END 0 /* end of list */
5 
6 #define SASL_USERNAME 0 /* pointer to NUL terminated user name */
7 #define ISASL_CONFIG 20 /* Just so we don't have to implement all the auxprop stuff */
8 
9 typedef struct sasl_callback {
10  unsigned long id;
11  int (*proc)(void);
12  void *context;
14 
15 typedef struct sasl_conn {
16  char *username;
17  char *config;
18 } sasl_conn_t;
19 
20 typedef struct user_db_entry {
21  char *username;
22  char *password;
23  char *config;
26 
27 void sasl_dispose(sasl_conn_t **pconn);
28 
30  const char *appname);
31 
32 int sasl_server_new(const char *service,
33  const char *serverFQDN,
34  const char *user_realm,
35  const char *iplocalport,
36  const char *ipremoteport,
38  unsigned flags,
39  sasl_conn_t **pconn);
40 
42  const char *user,
43  const char *prefix,
44  const char *sep,
45  const char *suffix,
46  const char **result,
47  unsigned *plen,
48  int *pcount);
49 
51  const char *mech,
52  const char *clientin,
53  unsigned clientinlen,
54  const char **serverout,
55  unsigned *serveroutlen);
56 
58  const char *clientin,
59  unsigned clientinlen,
60  const char **serverout,
61  unsigned *serveroutlen);
62 
63 int sasl_getprop(sasl_conn_t *conn, int propnum,
64  const void **pvalue);
65 
66 #define SASL_OK 0
67 #define SASL_CONTINUE 1
68 #define SASL_FAIL -1 /* generic failure */
69 #define SASL_NOMEM -2 /* memory shortage failure */
70 #define SASL_BADPARAM -7 /* invalid parameter supplied */
71 #define SASL_NOUSER -20 /* user not found */
72 
73 #endif /* ISASL_H */
Definition: result.h:29
char * user
Definition: mysqladmin.cc:59
char * config
Definition: isasl.h:23
struct user_db_entry * next
Definition: isasl.h:24
char * username
Definition: isasl.h:16
struct user_db_entry user_db_entry_t
char * username
Definition: isasl.h:21
char * password
Definition: isasl.h:22
The structure representing a connection into memcached.
Definition: memcached.h:283
void sasl_dispose(sasl_conn_t **pconn)
Definition: isasl.c:183
int(* proc)(void)
Definition: isasl.h:11
Definition: isasl.h:9
int sasl_server_start(sasl_conn_t *conn, const char *mech, const char *clientin, unsigned clientinlen, const char **serverout, unsigned *serveroutlen)
Definition: isasl.c:320
int sasl_server_init(const sasl_callback_t *callbacks, const char *appname)
Definition: isasl.c:244
Definition: isasl.h:15
struct sasl_callback sasl_callback_t
unsigned long id
Definition: isasl.h:10
struct sasl_conn sasl_conn_t
char * config
Definition: isasl.h:17
int sasl_listmech(sasl_conn_t *conn, const char *user, const char *prefix, const char *sep, const char *suffix, const char **result, unsigned *plen, int *pcount)
Definition: isasl.c:291
int sasl_server_new(const char *service, const char *serverFQDN, const char *user_realm, const char *iplocalport, const char *ipremoteport, const sasl_callback_t *callbacks, unsigned flags, sasl_conn_t **pconn)
Definition: isasl.c:278
int sasl_server_step(sasl_conn_t *conn, const char *clientin, unsigned clientinlen, const char **serverout, unsigned *serveroutlen)
Definition: isasl.c:370
Definition: isasl.h:20
void * context
Definition: isasl.h:12
static const char * sep
Definition: test_session_detach.cc:46
static int flags[50]
Definition: hp_test1.cc:39
static const sasl_callback_t callbacks[]
Definition: auth_ldap_sasl_client.h:44
int sasl_getprop(sasl_conn_t *conn, int propnum, const void **pvalue)
Definition: isasl.c:381