adsldp: Add support for IADsOpenDSObject::OpenDSObject(ADS_SECURE_AUTHENTICATION).
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3c3d0f6f00
commit
791791931c
|
@ -27,6 +27,7 @@
|
||||||
#include "initguid.h"
|
#include "initguid.h"
|
||||||
#include "objbase.h"
|
#include "objbase.h"
|
||||||
#include "rpcproxy.h"
|
#include "rpcproxy.h"
|
||||||
|
#include "rpc.h"
|
||||||
#include "iads.h"
|
#include "iads.h"
|
||||||
#include "adserr.h"
|
#include "adserr.h"
|
||||||
#define SECURITY_WIN32
|
#define SECURITY_WIN32
|
||||||
|
@ -777,10 +778,24 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B
|
||||||
|
|
||||||
if (flags & ADS_SECURE_AUTHENTICATION)
|
if (flags & ADS_SECURE_AUTHENTICATION)
|
||||||
{
|
{
|
||||||
FIXME("ADS_SECURE_AUTHENTICATION is not supported\n");
|
SEC_WINNT_AUTH_IDENTITY_W id;
|
||||||
hr = ERROR_DS_AUTH_METHOD_NOT_SUPPORTED;
|
|
||||||
ldap_unbind(ld);
|
id.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
|
||||||
goto fail;
|
id.Domain = (unsigned short *)host;
|
||||||
|
id.DomainLength = wcslen(host);
|
||||||
|
id.User = (unsigned short *)user;
|
||||||
|
id.UserLength = user ? wcslen(user) : 0;
|
||||||
|
id.Password = (unsigned short *)password;
|
||||||
|
id.PasswordLength = password ? wcslen(password) : 0;
|
||||||
|
|
||||||
|
err = ldap_bind_sW(ld, NULL, (WCHAR *)&id, LDAP_AUTH_NEGOTIATE);
|
||||||
|
if (err != LDAP_SUCCESS)
|
||||||
|
{
|
||||||
|
TRACE("ldap_bind_sW error %#x\n", err);
|
||||||
|
hr = HRESULT_FROM_WIN32(map_ldap_error(err));
|
||||||
|
ldap_unbind(ld);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -184,6 +184,18 @@ typedef struct berelement
|
||||||
#define LDAP_RES_EXTENDED 0x78
|
#define LDAP_RES_EXTENDED 0x78
|
||||||
#define LDAP_RES_ANY (-1)
|
#define LDAP_RES_ANY (-1)
|
||||||
|
|
||||||
|
#define LDAP_AUTH_SIMPLE 0x80
|
||||||
|
#define LDAP_AUTH_SASL 0x83
|
||||||
|
#define LDAP_AUTH_OTHERKIND 0x86
|
||||||
|
|
||||||
|
#define LDAP_AUTH_EXTERNAL (LDAP_AUTH_OTHERKIND | 0x0020)
|
||||||
|
#define LDAP_AUTH_SICILY (LDAP_AUTH_OTHERKIND | 0x0200)
|
||||||
|
#define LDAP_AUTH_NEGOTIATE (LDAP_AUTH_OTHERKIND | 0x0400)
|
||||||
|
#define LDAP_AUTH_MSN (LDAP_AUTH_OTHERKIND | 0x0800)
|
||||||
|
#define LDAP_AUTH_NTLM (LDAP_AUTH_OTHERKIND | 0x1000)
|
||||||
|
#define LDAP_AUTH_DPA (LDAP_AUTH_OTHERKIND | 0x2000)
|
||||||
|
#define LDAP_AUTH_DIGEST (LDAP_AUTH_OTHERKIND | 0x4000)
|
||||||
|
|
||||||
typedef struct ldap
|
typedef struct ldap
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
|
|
Loading…
Reference in New Issue