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
7519cddd
Commit
7519cddd
authored
Nov 13, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Forward LogonUserA to LogonUserW.
parent
02970b57
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
advapi.c
dlls/advapi32/advapi.c
+17
-2
advapi32_misc.h
dlls/advapi32/advapi32_misc.h
+12
-0
No files found.
dlls/advapi32/advapi.c
View file @
7519cddd
...
...
@@ -35,6 +35,8 @@
#include "wine/unicode.h"
#include "wine/debug.h"
#include "advapi32_misc.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
advapi
);
/******************************************************************************
...
...
@@ -268,10 +270,23 @@ BOOL WINAPI InitiateSystemShutdownW( LPWSTR lpMachineName, LPWSTR lpMessage, DWO
BOOL
WINAPI
LogonUserA
(
LPCSTR
lpszUsername
,
LPCSTR
lpszDomain
,
LPCSTR
lpszPassword
,
DWORD
dwLogonType
,
DWORD
dwLogonProvider
,
PHANDLE
phToken
)
{
FIXME
(
"%s %s %p 0x%08x 0x%08x %p - stub
\n
"
,
debugstr_a
(
lpszUsername
),
WCHAR
*
usernameW
=
NULL
,
*
domainW
=
NULL
,
*
passwordW
=
NULL
;
BOOL
ret
=
FALSE
;
TRACE
(
"%s %s %p 0x%08x 0x%08x %p
\n
"
,
debugstr_a
(
lpszUsername
),
debugstr_a
(
lpszDomain
),
lpszPassword
,
dwLogonType
,
dwLogonProvider
,
phToken
);
return
TRUE
;
if
(
lpszUsername
&&
!
(
usernameW
=
strdupAW
(
lpszUsername
)))
return
FALSE
;
if
(
lpszDomain
&&
!
(
domainW
=
strdupAW
(
lpszUsername
)))
goto
done
;
if
(
lpszPassword
&&
!
(
passwordW
=
strdupAW
(
lpszPassword
)))
goto
done
;
ret
=
LogonUserW
(
usernameW
,
domainW
,
passwordW
,
dwLogonType
,
dwLogonProvider
,
phToken
);
done:
heap_free
(
usernameW
);
heap_free
(
domainW
);
heap_free
(
passwordW
);
return
ret
;
}
BOOL
WINAPI
LogonUserW
(
LPCWSTR
lpszUsername
,
LPCWSTR
lpszDomain
,
LPCWSTR
lpszPassword
,
...
...
dlls/advapi32/advapi32_misc.h
View file @
7519cddd
...
...
@@ -22,6 +22,7 @@
#include "ntsecapi.h"
#include "winsvc.h"
#include "winnls.h"
const
char
*
debugstr_sid
(
PSID
sid
)
DECLSPEC_HIDDEN
;
BOOL
ADVAPI_IsLocalComputer
(
LPCWSTR
ServerName
)
DECLSPEC_HIDDEN
;
...
...
@@ -52,4 +53,15 @@ static inline BOOL heap_free( void *mem )
return
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
}
static
inline
WCHAR
*
strdupAW
(
const
char
*
src
)
{
WCHAR
*
dst
=
NULL
;
if
(
src
)
{
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
src
,
-
1
,
NULL
,
0
);
if
((
dst
=
heap_alloc
(
len
*
sizeof
(
WCHAR
)
)))
MultiByteToWideChar
(
CP_ACP
,
0
,
src
,
-
1
,
dst
,
len
);
}
return
dst
;
}
#endif
/* __WINE_ADVAPI32MISC_H */
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