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:
Jeffrey Altman
2012-03-13 23:56:11 -04:00
parent cb6f7ea40e
commit 8257cc2232
6 changed files with 24 additions and 24 deletions

View File

@@ -39,7 +39,7 @@
#define KRB5_PLUGIN_AN2LN "an2ln"
#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
*
@@ -81,9 +81,9 @@ typedef krb5_error_code (*set_result_f)(void *, const char *);
*/
typedef struct krb5plugin_an2ln_ftable_desc {
int minor_version;
krb5_error_code (*init)(krb5_context, void **);
void (*fini)(void *);
krb5_error_code (*an2ln)(void *, krb5_context, const char *,
krb5_error_code (KRB5_LIB_CALL *init)(krb5_context, void **);
void (KRB5_LIB_CALL *fini)(void *);
krb5_error_code (KRB5_LIB_CALL *an2ln)(void *, krb5_context, const char *,
krb5_const_principal, set_result_f, void *);
} krb5plugin_an2ln_ftable;

View File

@@ -36,9 +36,9 @@
#include "db_plugin.h"
/* Default plugin (DB using binary search of sorted text file) follows */
static krb5_error_code an2ln_def_plug_init(krb5_context, void **);
static void 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_init(krb5_context, void **);
static void KRB5_LIB_CALL an2ln_def_plug_fini(void *);
static krb5_error_code KRB5_LIB_CALL an2ln_def_plug_an2ln(void *, krb5_context, const char *,
krb5_const_principal, set_result_f,
void *);
@@ -349,14 +349,14 @@ krb5_aname_to_localname(krb5_context context,
return ret;
}
static krb5_error_code
static krb5_error_code KRB5_LIB_CALL
an2ln_def_plug_init(krb5_context context, void **ctx)
{
*ctx = NULL;
return 0;
}
static void
static void KRB5_LIB_CALL
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);
}
static krb5_error_code
static krb5_error_code KRB5_LIB_CALL
an2ln_def_plug_an2ln(void *plug_ctx, krb5_context context,
const char *rule,
krb5_const_principal aname,

View File

@@ -60,8 +60,8 @@
*/
typedef struct krb5plugin_db_ftable_desc {
int minor_version;
krb5_error_code (*init)(krb5_context, void **);
void (*fini)(void *);
krb5_error_code (KRB5_LIB_CALL *init)(krb5_context, void **);
void (KRB5_LIB_CALL *fini)(void *);
} krb5plugin_db_ftable;
#endif /* HEIMDAL_KRB5_DB_PLUGIN_H */

View File

@@ -55,7 +55,7 @@ struct plctx {
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)
{
const krb5plugin_kuserok_ftable *locate = plug;
@@ -523,7 +523,7 @@ out:
* 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,
unsigned int flags, const char *k5login_dir,
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.
*/
static krb5_error_code
static krb5_error_code KRB5_LIB_CALL
kuserok_sys_k5login_plug_f(void *plug_ctx, krb5_context context,
const char *rule, unsigned int flags,
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
*/
static krb5_error_code
static krb5_error_code KRB5_LIB_CALL
kuserok_user_k5login_plug_f(void *plug_ctx, krb5_context context,
const char *rule, unsigned int flags,
const char *k5login_dir, const char *luser,
@@ -669,7 +669,7 @@ kuserok_user_k5login_plug_f(void *plug_ctx, krb5_context context,
#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,
unsigned int flags, const char *k5login_dir,
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;
}
static krb5_error_code
static krb5_error_code KRB5_LIB_CALL
kuser_ok_null_plugin_init(krb5_context context, void **ctx)
{
*ctx = NULL;
return 0;
}
static void
static void KRB5_LIB_CALL
kuser_ok_null_plugin_fini(void *ctx)
{
return;

View File

@@ -77,9 +77,9 @@
*/
typedef struct krb5plugin_kuserok_ftable_desc {
int minor_version;
krb5_error_code (*init)(krb5_context, void **);
void (*fini)(void *);
krb5_error_code (*kuserok)(void *, krb5_context, const char *,
krb5_error_code (KRB5_LIB_CALL *init)(krb5_context, void **);
void (KRB5_LIB_CALL *fini)(void *);
krb5_error_code (KRB5_LIB_CALL *kuserok)(void *, krb5_context, const char *,
unsigned int, const char *, const char *,
krb5_const_principal,
krb5_boolean *);

View File

@@ -551,7 +551,7 @@ struct iter_ctx {
const char *name;
int min_version;
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;
krb5_error_code ret;
};
@@ -636,7 +636,7 @@ _krb5_plugin_run_f(krb5_context context,
int min_version,
int flags,
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_dict_t dict;