Plugin functions should be KRB5_LIB_CALL
Plugin functions should be KRB5_LIB_CALL for speed on Windows. Change-Id: Iaa4dcf73fd2e29e3f95feede5217eac4eaded4e2
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
#define KRB5_PLUGIN_AN2LN "an2ln"
|
#define KRB5_PLUGIN_AN2LN "an2ln"
|
||||||
#define KRB5_PLUGIN_AN2LN_VERSION_0 0
|
#define KRB5_PLUGIN_AN2LN_VERSION_0 0
|
||||||
|
|
||||||
typedef krb5_error_code (*set_result_f)(void *, const char *);
|
typedef krb5_error_code (KRB5_LIB_CALL *set_result_f)(void *, const char *);
|
||||||
|
|
||||||
/** @struct krb5plugin_an2ln_ftable_desc
|
/** @struct krb5plugin_an2ln_ftable_desc
|
||||||
*
|
*
|
||||||
@@ -81,9 +81,9 @@ typedef krb5_error_code (*set_result_f)(void *, const char *);
|
|||||||
*/
|
*/
|
||||||
typedef struct krb5plugin_an2ln_ftable_desc {
|
typedef struct krb5plugin_an2ln_ftable_desc {
|
||||||
int minor_version;
|
int minor_version;
|
||||||
krb5_error_code (*init)(krb5_context, void **);
|
krb5_error_code (KRB5_LIB_CALL *init)(krb5_context, void **);
|
||||||
void (*fini)(void *);
|
void (KRB5_LIB_CALL *fini)(void *);
|
||||||
krb5_error_code (*an2ln)(void *, krb5_context, const char *,
|
krb5_error_code (KRB5_LIB_CALL *an2ln)(void *, krb5_context, const char *,
|
||||||
krb5_const_principal, set_result_f, void *);
|
krb5_const_principal, set_result_f, void *);
|
||||||
} krb5plugin_an2ln_ftable;
|
} krb5plugin_an2ln_ftable;
|
||||||
|
|
||||||
|
@@ -36,9 +36,9 @@
|
|||||||
#include "db_plugin.h"
|
#include "db_plugin.h"
|
||||||
|
|
||||||
/* Default plugin (DB using binary search of sorted text file) follows */
|
/* Default plugin (DB using binary search of sorted text file) follows */
|
||||||
static krb5_error_code an2ln_def_plug_init(krb5_context, void **);
|
static krb5_error_code KRB5_LIB_CALL an2ln_def_plug_init(krb5_context, void **);
|
||||||
static void an2ln_def_plug_fini(void *);
|
static void KRB5_LIB_CALL an2ln_def_plug_fini(void *);
|
||||||
static krb5_error_code an2ln_def_plug_an2ln(void *, krb5_context, const char *,
|
static krb5_error_code KRB5_LIB_CALL an2ln_def_plug_an2ln(void *, krb5_context, const char *,
|
||||||
krb5_const_principal, set_result_f,
|
krb5_const_principal, set_result_f,
|
||||||
void *);
|
void *);
|
||||||
|
|
||||||
@@ -349,14 +349,14 @@ krb5_aname_to_localname(krb5_context context,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code KRB5_LIB_CALL
|
||||||
an2ln_def_plug_init(krb5_context context, void **ctx)
|
an2ln_def_plug_init(krb5_context context, void **ctx)
|
||||||
{
|
{
|
||||||
*ctx = NULL;
|
*ctx = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void KRB5_LIB_CALL
|
||||||
an2ln_def_plug_fini(void *ctx)
|
an2ln_def_plug_fini(void *ctx)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -369,7 +369,7 @@ sorted_text_db_init_f(void *arg)
|
|||||||
(void) heim_db_register("sorted-text", NULL, &heim_sorted_text_file_dbtype);
|
(void) heim_db_register("sorted-text", NULL, &heim_sorted_text_file_dbtype);
|
||||||
}
|
}
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code KRB5_LIB_CALL
|
||||||
an2ln_def_plug_an2ln(void *plug_ctx, krb5_context context,
|
an2ln_def_plug_an2ln(void *plug_ctx, krb5_context context,
|
||||||
const char *rule,
|
const char *rule,
|
||||||
krb5_const_principal aname,
|
krb5_const_principal aname,
|
||||||
|
@@ -60,8 +60,8 @@
|
|||||||
*/
|
*/
|
||||||
typedef struct krb5plugin_db_ftable_desc {
|
typedef struct krb5plugin_db_ftable_desc {
|
||||||
int minor_version;
|
int minor_version;
|
||||||
krb5_error_code (*init)(krb5_context, void **);
|
krb5_error_code (KRB5_LIB_CALL *init)(krb5_context, void **);
|
||||||
void (*fini)(void *);
|
void (KRB5_LIB_CALL *fini)(void *);
|
||||||
} krb5plugin_db_ftable;
|
} krb5plugin_db_ftable;
|
||||||
|
|
||||||
#endif /* HEIMDAL_KRB5_DB_PLUGIN_H */
|
#endif /* HEIMDAL_KRB5_DB_PLUGIN_H */
|
||||||
|
@@ -55,7 +55,7 @@ struct plctx {
|
|||||||
krb5_boolean result;
|
krb5_boolean result;
|
||||||
};
|
};
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code KRB5_LIB_CALL
|
||||||
plcallback(krb5_context context, const void *plug, void *plugctx, void *userctx)
|
plcallback(krb5_context context, const void *plug, void *plugctx, void *userctx)
|
||||||
{
|
{
|
||||||
const krb5plugin_kuserok_ftable *locate = plug;
|
const krb5plugin_kuserok_ftable *locate = plug;
|
||||||
@@ -523,7 +523,7 @@ out:
|
|||||||
* Simple kuserok: check that the lname for the aname matches luser.
|
* Simple kuserok: check that the lname for the aname matches luser.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code KRB5_LIB_CALL
|
||||||
kuserok_simple_plug_f(void *plug_ctx, krb5_context context, const char *rule,
|
kuserok_simple_plug_f(void *plug_ctx, krb5_context context, const char *rule,
|
||||||
unsigned int flags, const char *k5login_dir,
|
unsigned int flags, const char *k5login_dir,
|
||||||
const char *luser, krb5_const_principal principal,
|
const char *luser, krb5_const_principal principal,
|
||||||
@@ -546,7 +546,7 @@ kuserok_simple_plug_f(void *plug_ctx, krb5_context context, const char *rule,
|
|||||||
* directories.
|
* directories.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code KRB5_LIB_CALL
|
||||||
kuserok_sys_k5login_plug_f(void *plug_ctx, krb5_context context,
|
kuserok_sys_k5login_plug_f(void *plug_ctx, krb5_context context,
|
||||||
const char *rule, unsigned int flags,
|
const char *rule, unsigned int flags,
|
||||||
const char *k5login_dir, const char *luser,
|
const char *k5login_dir, const char *luser,
|
||||||
@@ -588,7 +588,7 @@ kuserok_sys_k5login_plug_f(void *plug_ctx, krb5_context context,
|
|||||||
* Check ~luser/.k5login and/or ~/luser/.k5login.d
|
* Check ~luser/.k5login and/or ~/luser/.k5login.d
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code KRB5_LIB_CALL
|
||||||
kuserok_user_k5login_plug_f(void *plug_ctx, krb5_context context,
|
kuserok_user_k5login_plug_f(void *plug_ctx, krb5_context context,
|
||||||
const char *rule, unsigned int flags,
|
const char *rule, unsigned int flags,
|
||||||
const char *k5login_dir, const char *luser,
|
const char *k5login_dir, const char *luser,
|
||||||
@@ -669,7 +669,7 @@ kuserok_user_k5login_plug_f(void *plug_ctx, krb5_context context,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code KRB5_LIB_CALL
|
||||||
kuserok_deny_plug_f(void *plug_ctx, krb5_context context, const char *rule,
|
kuserok_deny_plug_f(void *plug_ctx, krb5_context context, const char *rule,
|
||||||
unsigned int flags, const char *k5login_dir,
|
unsigned int flags, const char *k5login_dir,
|
||||||
const char *luser, krb5_const_principal principal,
|
const char *luser, krb5_const_principal principal,
|
||||||
@@ -682,14 +682,14 @@ kuserok_deny_plug_f(void *plug_ctx, krb5_context context, const char *rule,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code KRB5_LIB_CALL
|
||||||
kuser_ok_null_plugin_init(krb5_context context, void **ctx)
|
kuser_ok_null_plugin_init(krb5_context context, void **ctx)
|
||||||
{
|
{
|
||||||
*ctx = NULL;
|
*ctx = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void KRB5_LIB_CALL
|
||||||
kuser_ok_null_plugin_fini(void *ctx)
|
kuser_ok_null_plugin_fini(void *ctx)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@@ -77,9 +77,9 @@
|
|||||||
*/
|
*/
|
||||||
typedef struct krb5plugin_kuserok_ftable_desc {
|
typedef struct krb5plugin_kuserok_ftable_desc {
|
||||||
int minor_version;
|
int minor_version;
|
||||||
krb5_error_code (*init)(krb5_context, void **);
|
krb5_error_code (KRB5_LIB_CALL *init)(krb5_context, void **);
|
||||||
void (*fini)(void *);
|
void (KRB5_LIB_CALL *fini)(void *);
|
||||||
krb5_error_code (*kuserok)(void *, krb5_context, const char *,
|
krb5_error_code (KRB5_LIB_CALL *kuserok)(void *, krb5_context, const char *,
|
||||||
unsigned int, const char *, const char *,
|
unsigned int, const char *, const char *,
|
||||||
krb5_const_principal,
|
krb5_const_principal,
|
||||||
krb5_boolean *);
|
krb5_boolean *);
|
||||||
|
@@ -551,7 +551,7 @@ struct iter_ctx {
|
|||||||
const char *name;
|
const char *name;
|
||||||
int min_version;
|
int min_version;
|
||||||
heim_array_t result;
|
heim_array_t result;
|
||||||
krb5_error_code (*func)(krb5_context, const void *, void *, void *);
|
krb5_error_code (KRB5_LIB_CALL *func)(krb5_context, const void *, void *, void *);
|
||||||
void *userctx;
|
void *userctx;
|
||||||
krb5_error_code ret;
|
krb5_error_code ret;
|
||||||
};
|
};
|
||||||
@@ -636,7 +636,7 @@ _krb5_plugin_run_f(krb5_context context,
|
|||||||
int min_version,
|
int min_version,
|
||||||
int flags,
|
int flags,
|
||||||
void *userctx,
|
void *userctx,
|
||||||
krb5_error_code (*func)(krb5_context, const void *, void *, void *))
|
krb5_error_code (KRB5_LIB_CALL *func)(krb5_context, const void *, void *, void *))
|
||||||
{
|
{
|
||||||
heim_string_t m = heim_string_create(module);
|
heim_string_t m = heim_string_create(module);
|
||||||
heim_dict_t dict;
|
heim_dict_t dict;
|
||||||
|
Reference in New Issue
Block a user