00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00027 #ifndef __BACKEND_FIREBIRD_H
00028 #define __BACKEND_FIREBIRD_H
00029 #if defined __BORLANDC__ && defined __WIN32__
00030 #define EXPORT _export
00031 #else
00032 #define EXPORT
00033 #endif
00034
00035 #include <security/pam_modules.h>
00036 #include <ibase.h>
00037
00038 #include "pam_kmux_options.h"
00039
00040
00042 #define ERRDESC(status) { sql_code = isc_sqlcode(status); \
00043 isc_sql_interprete(sql_code,buf, sizeof(buf)); \
00044 logdbg("%s for db (%s:%s)", buf, options->db, options->port); \
00045 }
00046
00048 #define SQL_VARCHAR(len) struct {short vary_length; char vary_string[(len)+1];}
00049
00058 void* firebird_db_connect(const modopt_t *options);
00059
00067 void firebird_db_disconnect(void *vconn);
00068
00084 int firebird_expand_query(char **command, const char** values, const char *query, const char *service, const char *user, const char *passwd, const char *rhost, const char *raddr, const modopt_t *options);
00085
00103 int firebird_exec_param(void *vconn, void **vres, const char *query, const char *service, const char *user, const char *passwd, const char *rhost, const modopt_t *options);
00104
00121 int firebird_backend_authenticate(const char *service, const char *user, const char *passwd, const char *rhost, const modopt_t *options);
00122 #endif