diff options
Diffstat (limited to 'src/lib/gssapi/mechglue/g_initialize.c')
-rw-r--r-- | src/lib/gssapi/mechglue/g_initialize.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/lib/gssapi/mechglue/g_initialize.c b/src/lib/gssapi/mechglue/g_initialize.c new file mode 100644 index 0000000000..5081b1a286 --- /dev/null +++ b/src/lib/gssapi/mechglue/g_initialize.c @@ -0,0 +1,34 @@ +#ident "@(#)gss_initialize.c 1.5 95/09/11 SMI" +/* + * This function will initialize the gssapi mechglue library + * + * Copyright (c) 1995, by Sun Microsystems, Inc. + * All rights reserved. + */ + +#include "mglueP.h" + +static int _gss_initialized = 0; + +void gss_initialize (void) +{ + gss_mechanism mech; + + /* Make sure we've not run already */ + if (_gss_initialized) + return; + _gss_initialized = 1; + + /* + * Use hard-coded in mechanisms... I need to know what mechanisms + * are supported... As more mechanisms become supported, they + * should be added here, unless shared libraries are used. + */ + + /* Initialize the krb5 mechanism */ + mech = (gss_mechanism)krb5_gss_initialize(); + if (mech) + add_mechanism (mech, 1); + + return; +} |