X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwingss.c;h=0187a5a7c19bde2359cf3ea622550bc8aa1ae276;hb=89da2ddf564a93414ee9ab2df3f053608094e417;hp=a161ad6e53c73123d47d84c548fe5948ec67da64;hpb=d764872e9eda35196551b506aa04c03bc8118074;p=PuTTY.git diff --git a/windows/wingss.c b/windows/wingss.c index a161ad6e..0187a5a7 100644 --- a/windows/wingss.c +++ b/windows/wingss.c @@ -2,6 +2,7 @@ #include "putty.h" +#define SECURITY_WIN32 #include #include "pgssapi.h" @@ -65,11 +66,12 @@ const char *gsslogmsg = NULL; static void ssh_sspi_bind_fns(struct ssh_gss_library *lib); -struct ssh_gss_liblist *ssh_gss_setup(const Config *cfg) +struct ssh_gss_liblist *ssh_gss_setup(Conf *conf) { HMODULE module; HKEY regkey; struct ssh_gss_liblist *list = snew(struct ssh_gss_liblist); + char *path; list->libraries = snewn(3, struct ssh_gss_library); list->nlibraries = 0; @@ -148,8 +150,9 @@ struct ssh_gss_liblist *ssh_gss_setup(const Config *cfg) * Custom GSSAPI DLL. */ module = NULL; - if (cfg->ssh_gss_custom.path[0]) { - module = LoadLibrary(cfg->ssh_gss_custom.path); + path = conf_get_filename(conf, CONF_ssh_gss_custom)->path; + if (*path) { + module = LoadLibrary(path); } if (module) { struct ssh_gss_library *lib = @@ -157,7 +160,7 @@ struct ssh_gss_liblist *ssh_gss_setup(const Config *cfg) lib->id = 2; lib->gsslogmsg = dupprintf("Using GSSAPI from user-specified" - " library '%s'", cfg->ssh_gss_custom.path); + " library '%s'", path); lib->handle = (void *)module; #define BIND_GSS_FN(name) \ @@ -352,7 +355,7 @@ static Ssh_gss_stat ssh_sspi_display_status(struct ssh_gss_library *lib, Ssh_gss_ctx ctx, Ssh_gss_buf *buf) { winSsh_gss_ctx *winctx = (winSsh_gss_ctx *) ctx; - char *msg; + const char *msg; if (winctx == NULL) return SSH_GSS_FAILURE;