~ubuntu-branches/ubuntu/natty/curl/natty-security

« back to all changes in this revision

Viewing changes to lib/curl_sspi.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-11-29 17:26:37 UTC
  • mfrom: (3.4.9 sid)
  • Revision ID: james.westby@ubuntu.com-20101129172637-7wwnlut14uxp2kfx
Tags: 7.21.2-1ubuntu1
* Merge with Debian unstable, remaining Ubuntu changes: (LP: #682286)
* debian/control:
  - (Keep build deps in main)
  - Drop build dependencies: stunnel, libssh2-1-dev
  - Add build-dependency on openssh-server
  - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#include "memdebug.h"
37
37
 
38
38
 
 
39
/* We use our own typedef here since some headers might lack these */
 
40
typedef PSecurityFunctionTableA (APIENTRY *INITSECURITYINTERFACE_FN_A)(VOID);
 
41
 
39
42
/* Handle of security.dll or secur32.dll, depending on Windows version */
40
43
HMODULE s_hSecDll = NULL;
41
44
 
59
62
Curl_sspi_global_init(void)
60
63
{
61
64
  OSVERSIONINFO osver;
62
 
  INIT_SECURITY_INTERFACE_A pInitSecurityInterface;
 
65
  INITSECURITYINTERFACE_FN_A pInitSecurityInterface;
63
66
 
64
67
  /* If security interface is not yet initialized try to do this */
65
68
  if(s_hSecDll == NULL) {
84
87
      return CURLE_FAILED_INIT;
85
88
 
86
89
    /* Get address of the InitSecurityInterfaceA function from the SSPI dll */
87
 
    pInitSecurityInterface = (INIT_SECURITY_INTERFACE_A)
 
90
    pInitSecurityInterface = (INITSECURITYINTERFACE_FN_A)
88
91
      GetProcAddress(s_hSecDll, "InitSecurityInterfaceA");
89
92
    if(! pInitSecurityInterface)
90
93
      return CURLE_FAILED_INIT;