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
d5ebfb54
Commit
d5ebfb54
authored
Jul 20, 2005
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 20, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement ldap_simple_bind* and ldap_unbind* functions.
parent
39a6c8b4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
130 additions
and
0 deletions
+130
-0
bind.c
dlls/wldap32/bind.c
+116
-0
winldap_private.h
dlls/wldap32/winldap_private.h
+6
-0
wldap32.spec
dlls/wldap32/wldap32.spec
+8
-0
No files found.
dlls/wldap32/bind.c
View file @
d5ebfb54
...
...
@@ -132,3 +132,119 @@ ULONG ldap_bind_sW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method )
#endif
return
ret
;
}
ULONG
ldap_simple_bindA
(
WLDAP32_LDAP
*
ld
,
PCHAR
dn
,
PCHAR
passwd
)
{
ULONG
ret
=
LDAP_NOT_SUPPORTED
;
#ifdef HAVE_LDAP
WCHAR
*
dnW
,
*
passwdW
;
TRACE
(
"(%p, %s, %p)
\n
"
,
ld
,
debugstr_a
(
dn
),
passwd
);
dnW
=
strAtoW
(
dn
);
if
(
!
dnW
)
return
LDAP_NO_MEMORY
;
passwdW
=
strAtoW
(
passwd
);
if
(
!
passwdW
)
return
LDAP_NO_MEMORY
;
ret
=
ldap_simple_bindW
(
ld
,
dnW
,
passwdW
);
strfreeW
(
dnW
);
strfreeW
(
passwdW
);
#endif
return
ret
;
}
ULONG
ldap_simple_bindW
(
WLDAP32_LDAP
*
ld
,
PWCHAR
dn
,
PWCHAR
passwd
)
{
ULONG
ret
=
LDAP_NOT_SUPPORTED
;
#ifdef HAVE_LDAP
char
*
dnU
,
*
passwdU
;
TRACE
(
"(%p, %s, %p)
\n
"
,
ld
,
debugstr_w
(
dn
),
passwd
);
dnU
=
strWtoU
(
dn
);
if
(
!
dnU
)
return
LDAP_NO_MEMORY
;
passwdU
=
strWtoU
(
passwd
);
if
(
!
passwdU
)
return
LDAP_NO_MEMORY
;
ret
=
ldap_simple_bind
(
ld
,
dnU
,
passwdU
);
strfreeU
(
dnU
);
strfreeU
(
passwdU
);
#endif
return
ret
;
}
ULONG
ldap_simple_bind_sA
(
WLDAP32_LDAP
*
ld
,
PCHAR
dn
,
PCHAR
passwd
)
{
ULONG
ret
=
LDAP_NOT_SUPPORTED
;
#ifdef HAVE_LDAP
WCHAR
*
dnW
,
*
passwdW
;
TRACE
(
"(%p, %s, %p)
\n
"
,
ld
,
debugstr_a
(
dn
),
passwd
);
dnW
=
strAtoW
(
dn
);
if
(
!
dnW
)
return
LDAP_NO_MEMORY
;
passwdW
=
strAtoW
(
passwd
);
if
(
!
passwdW
)
return
LDAP_NO_MEMORY
;
ret
=
ldap_simple_bind_sW
(
ld
,
dnW
,
passwdW
);
strfreeW
(
dnW
);
strfreeW
(
passwdW
);
#endif
return
ret
;
}
ULONG
ldap_simple_bind_sW
(
WLDAP32_LDAP
*
ld
,
PWCHAR
dn
,
PWCHAR
passwd
)
{
ULONG
ret
=
LDAP_NOT_SUPPORTED
;
#ifdef HAVE_LDAP
char
*
dnU
,
*
passwdU
;
TRACE
(
"(%p, %s, %p)
\n
"
,
ld
,
debugstr_w
(
dn
),
passwd
);
dnU
=
strWtoU
(
dn
);
if
(
!
dnU
)
return
LDAP_NO_MEMORY
;
passwdU
=
strWtoU
(
passwd
);
if
(
!
passwdU
)
return
LDAP_NO_MEMORY
;
ret
=
ldap_simple_bind_s
(
ld
,
dnU
,
passwdU
);
strfreeU
(
dnU
);
strfreeU
(
passwdU
);
#endif
return
ret
;
}
ULONG
WLDAP32_ldap_unbind
(
WLDAP32_LDAP
*
ld
)
{
ULONG
ret
=
LDAP_NOT_SUPPORTED
;
#ifdef HAVE_LDAP
TRACE
(
"(%p)
\n
"
,
ld
);
ret
=
ldap_unbind
(
ld
);
#endif
return
ret
;
}
ULONG
WLDAP32_ldap_unbind_s
(
WLDAP32_LDAP
*
ld
)
{
ULONG
ret
=
LDAP_NOT_SUPPORTED
;
#ifdef HAVE_LDAP
TRACE
(
"(%p)
\n
"
,
ld
);
ret
=
ldap_unbind_s
(
ld
);
#endif
return
ret
;
}
dlls/wldap32/winldap_private.h
View file @
d5ebfb54
...
...
@@ -53,6 +53,12 @@ ULONG ldap_bindA(WLDAP32_LDAP*,PCHAR,PCHAR,ULONG);
ULONG
ldap_bindW
(
WLDAP32_LDAP
*
,
PWCHAR
,
PWCHAR
,
ULONG
);
ULONG
ldap_bind_sA
(
WLDAP32_LDAP
*
,
PCHAR
,
PCHAR
,
ULONG
);
ULONG
ldap_bind_sW
(
WLDAP32_LDAP
*
,
PWCHAR
,
PWCHAR
,
ULONG
);
ULONG
ldap_simple_bindA
(
WLDAP32_LDAP
*
,
PCHAR
,
PCHAR
);
ULONG
ldap_simple_bindW
(
WLDAP32_LDAP
*
,
PWCHAR
,
PWCHAR
);
ULONG
ldap_simple_bind_sA
(
WLDAP32_LDAP
*
,
PCHAR
,
PCHAR
);
ULONG
ldap_simple_bind_sW
(
WLDAP32_LDAP
*
,
PWCHAR
,
PWCHAR
);
ULONG
WLDAP32_ldap_unbind
(
WLDAP32_LDAP
*
);
ULONG
WLDAP32_ldap_unbind_s
(
WLDAP32_LDAP
*
);
ULONG
LdapGetLastError
(
void
);
ULONG
LdapMapErrorToWin32
(
ULONG
);
...
...
dlls/wldap32/wldap32.spec
View file @
d5ebfb54
...
...
@@ -22,3 +22,11 @@
@ stub ldap_open
@ stub ldap_openA
@ stub ldap_openW
@ cdecl ldap_simple_bind(ptr str str) ldap_simple_bindA
@ cdecl ldap_simple_bindA(ptr str str)
@ cdecl ldap_simple_bindW(ptr wstr wstr)
@ cdecl ldap_simple_bind_s(ptr str str) ldap_simple_bind_sA
@ cdecl ldap_simple_bind_sA(ptr str str)
@ cdecl ldap_simple_bind_sW(ptr wstr wstr)
@ cdecl ldap_unbind(ptr) WLDAP32_ldap_unbind
@ cdecl ldap_unbind_s(ptr) WLDAP32_ldap_unbind_s
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