Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
be5bf802
Commit
be5bf802
authored
Jul 24, 2005
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 24, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement ldap_sasl_bind* functions.
parent
3e05fe1e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
150 additions
and
0 deletions
+150
-0
bind.c
dlls/wldap32/bind.c
+142
-0
winldap_private.h
dlls/wldap32/winldap_private.h
+4
-0
wldap32.spec
dlls/wldap32/wldap32.spec
+4
-0
No files found.
dlls/wldap32/bind.c
View file @
be5bf802
...
...
@@ -133,6 +133,148 @@ ULONG ldap_bind_sW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method )
return
ret
;
}
ULONG
ldap_sasl_bindA
(
WLDAP32_LDAP
*
ld
,
const
PCHAR
dn
,
const
PCHAR
mechanism
,
const
BERVAL
*
cred
,
PLDAPControlA
*
serverctrls
,
PLDAPControlA
*
clientctrls
,
int
*
message
)
{
ULONG
ret
=
LDAP_NOT_SUPPORTED
;
#ifdef HAVE_LDAP
WCHAR
*
dnW
,
*
mechanismW
;
LDAPControlW
**
serverctrlsW
,
**
clientctrlsW
;
TRACE
(
"(%p, %s, %s, %p, %p, %p, %p)
\n
"
,
ld
,
debugstr_a
(
dn
),
debugstr_a
(
mechanism
),
cred
,
serverctrls
,
clientctrls
,
message
);
dnW
=
strAtoW
(
dn
);
if
(
!
dnW
)
return
LDAP_NO_MEMORY
;
mechanismW
=
strAtoW
(
mechanism
);
if
(
!
mechanismW
)
return
LDAP_NO_MEMORY
;
serverctrlsW
=
controlarrayAtoW
(
serverctrls
);
if
(
!
serverctrlsW
)
return
LDAP_NO_MEMORY
;
clientctrlsW
=
controlarrayAtoW
(
clientctrls
);
if
(
!
clientctrlsW
)
return
LDAP_NO_MEMORY
;
ret
=
ldap_sasl_bindW
(
ld
,
dnW
,
mechanismW
,
cred
,
serverctrlsW
,
clientctrlsW
,
message
);
strfreeW
(
dnW
);
strfreeW
(
mechanismW
);
controlarrayfreeW
(
serverctrlsW
);
controlarrayfreeW
(
clientctrlsW
);
#endif
return
ret
;
}
ULONG
ldap_sasl_bindW
(
WLDAP32_LDAP
*
ld
,
const
PWCHAR
dn
,
const
PWCHAR
mechanism
,
const
BERVAL
*
cred
,
PLDAPControlW
*
serverctrls
,
PLDAPControlW
*
clientctrls
,
int
*
message
)
{
ULONG
ret
=
LDAP_NOT_SUPPORTED
;
#ifdef HAVE_LDAP
char
*
dnU
,
*
mechanismU
;
LDAPControl
**
serverctrlsU
,
**
clientctrlsU
;
TRACE
(
"(%p, %s, %s, %p, %p, %p, %p)
\n
"
,
ld
,
debugstr_w
(
dn
),
debugstr_w
(
mechanism
),
cred
,
serverctrls
,
clientctrls
,
message
);
dnU
=
strWtoU
(
dn
);
if
(
!
dnU
)
return
LDAP_NO_MEMORY
;
mechanismU
=
strWtoU
(
mechanism
);
if
(
!
mechanismU
)
return
LDAP_NO_MEMORY
;
serverctrlsU
=
controlarrayWtoU
(
serverctrls
);
if
(
!
serverctrlsU
)
return
LDAP_NO_MEMORY
;
clientctrlsU
=
controlarrayWtoU
(
clientctrls
);
if
(
!
clientctrlsU
)
return
LDAP_NO_MEMORY
;
ret
=
ldap_sasl_bind
(
ld
,
dnU
,
mechanismU
,
(
struct
berval
*
)
cred
,
serverctrlsU
,
clientctrlsU
,
message
);
strfreeU
(
dnU
);
strfreeU
(
mechanismU
);
controlarrayfreeU
(
serverctrlsU
);
controlarrayfreeU
(
clientctrlsU
);
#endif
return
ret
;
}
ULONG
ldap_sasl_bind_sA
(
WLDAP32_LDAP
*
ld
,
const
PCHAR
dn
,
const
PCHAR
mechanism
,
const
BERVAL
*
cred
,
PLDAPControlA
*
serverctrls
,
PLDAPControlA
*
clientctrls
,
PBERVAL
*
serverdata
)
{
ULONG
ret
=
LDAP_NOT_SUPPORTED
;
#ifdef HAVE_LDAP
WCHAR
*
dnW
,
*
mechanismW
;
LDAPControlW
**
serverctrlsW
,
**
clientctrlsW
;
TRACE
(
"(%p, %s, %s, %p, %p, %p, %p)
\n
"
,
ld
,
debugstr_a
(
dn
),
debugstr_a
(
mechanism
),
cred
,
serverctrls
,
clientctrls
,
serverdata
);
dnW
=
strAtoW
(
dn
);
if
(
!
dnW
)
return
LDAP_NO_MEMORY
;
mechanismW
=
strAtoW
(
mechanism
);
if
(
!
mechanismW
)
return
LDAP_NO_MEMORY
;
serverctrlsW
=
controlarrayAtoW
(
serverctrls
);
if
(
!
serverctrlsW
)
return
LDAP_NO_MEMORY
;
clientctrlsW
=
controlarrayAtoW
(
clientctrls
);
if
(
!
clientctrlsW
)
return
LDAP_NO_MEMORY
;
ret
=
ldap_sasl_bind_sW
(
ld
,
dnW
,
mechanismW
,
cred
,
serverctrlsW
,
clientctrlsW
,
serverdata
);
strfreeW
(
dnW
);
strfreeW
(
mechanismW
);
controlarrayfreeW
(
serverctrlsW
);
controlarrayfreeW
(
clientctrlsW
);
#endif
return
ret
;
}
ULONG
ldap_sasl_bind_sW
(
WLDAP32_LDAP
*
ld
,
const
PWCHAR
dn
,
const
PWCHAR
mechanism
,
const
BERVAL
*
cred
,
PLDAPControlW
*
serverctrls
,
PLDAPControlW
*
clientctrls
,
PBERVAL
*
serverdata
)
{
ULONG
ret
=
LDAP_NOT_SUPPORTED
;
#ifdef HAVE_LDAP
char
*
dnU
,
*
mechanismU
;
LDAPControl
**
serverctrlsU
,
**
clientctrlsU
;
TRACE
(
"(%p, %s, %s, %p, %p, %p, %p)
\n
"
,
ld
,
debugstr_w
(
dn
),
debugstr_w
(
mechanism
),
cred
,
serverctrls
,
clientctrls
,
serverdata
);
dnU
=
strWtoU
(
dn
);
if
(
!
dnU
)
return
LDAP_NO_MEMORY
;
mechanismU
=
strWtoU
(
mechanism
);
if
(
!
mechanismU
)
return
LDAP_NO_MEMORY
;
serverctrlsU
=
controlarrayWtoU
(
serverctrls
);
if
(
!
serverctrlsU
)
return
LDAP_NO_MEMORY
;
clientctrlsU
=
controlarrayWtoU
(
clientctrls
);
if
(
!
clientctrlsU
)
return
LDAP_NO_MEMORY
;
ret
=
ldap_sasl_bind_s
(
ld
,
dnU
,
mechanismU
,
(
struct
berval
*
)
cred
,
serverctrlsU
,
clientctrlsU
,
(
struct
berval
**
)
serverdata
);
strfreeU
(
dnU
);
strfreeU
(
mechanismU
);
controlarrayfreeU
(
serverctrlsU
);
controlarrayfreeU
(
clientctrlsU
);
#endif
return
ret
;
}
ULONG
ldap_simple_bindA
(
WLDAP32_LDAP
*
ld
,
PCHAR
dn
,
PCHAR
passwd
)
{
ULONG
ret
=
LDAP_NOT_SUPPORTED
;
...
...
dlls/wldap32/winldap_private.h
View file @
be5bf802
...
...
@@ -103,6 +103,10 @@ WLDAP32_LDAP *ldap_initA(const PCHAR,ULONG);
WLDAP32_LDAP
*
ldap_initW
(
const
PWCHAR
,
ULONG
);
WLDAP32_LDAP
*
ldap_openA
(
PCHAR
,
ULONG
);
WLDAP32_LDAP
*
ldap_openW
(
PWCHAR
,
ULONG
);
ULONG
ldap_sasl_bindA
(
WLDAP32_LDAP
*
,
const
PCHAR
,
const
PCHAR
,
const
BERVAL
*
,
PLDAPControlA
*
,
PLDAPControlA
*
,
int
*
);
ULONG
ldap_sasl_bindW
(
WLDAP32_LDAP
*
,
const
PWCHAR
,
const
PWCHAR
,
const
BERVAL
*
,
PLDAPControlW
*
,
PLDAPControlW
*
,
int
*
);
ULONG
ldap_sasl_bind_sA
(
WLDAP32_LDAP
*
,
const
PCHAR
,
const
PCHAR
,
const
BERVAL
*
,
PLDAPControlA
*
,
PLDAPControlA
*
,
PBERVAL
*
);
ULONG
ldap_sasl_bind_sW
(
WLDAP32_LDAP
*
,
const
PWCHAR
,
const
PWCHAR
,
const
BERVAL
*
,
PLDAPControlW
*
,
PLDAPControlW
*
,
PBERVAL
*
);
ULONG
ldap_searchA
(
WLDAP32_LDAP
*
,
PCHAR
,
ULONG
,
PCHAR
,
PCHAR
[],
ULONG
);
ULONG
ldap_searchW
(
WLDAP32_LDAP
*
,
PWCHAR
,
ULONG
,
PWCHAR
,
PWCHAR
[],
ULONG
);
ULONG
ldap_search_sA
(
WLDAP32_LDAP
*
,
PCHAR
,
ULONG
,
PCHAR
,
PCHAR
[],
ULONG
,
WLDAP32_LDAPMessage
**
);
...
...
dlls/wldap32/wldap32.spec
View file @
be5bf802
...
...
@@ -25,6 +25,10 @@
@ cdecl ldap_open(str long) ldap_openA
@ cdecl ldap_openA(str long)
@ cdecl ldap_openW(wstr long)
@ cdecl ldap_sasl_bindA(ptr str str ptr ptr ptr ptr)
@ cdecl ldap_sasl_bindW(ptr wstr wstr ptr ptr ptr ptr)
@ cdecl ldap_sasl_bind_sA(ptr str str ptr ptr ptr ptr)
@ cdecl ldap_sasl_bind_sW(ptr wstr wstr ptr ptr ptr ptr)
@ cdecl ldap_search(ptr str long str ptr long) ldap_searchA
@ cdecl ldap_searchA(ptr str long str ptr long)
@ cdecl ldap_searchW(ptr wstr long wstr ptr long)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment