Hans Leidekker : sspicli: Implement SspiEncodeAuthIdentityAsStrings.
Alexandre Julliard
julliard at winehq.org
Thu Jul 14 08:58:05 CDT 2016
Module: wine
Branch: master
Commit: 20ba0b08a983c1e9610c31d8105d279de6313933
URL: http://source.winehq.org/git/wine.git/?a=commit;h=20ba0b08a983c1e9610c31d8105d279de6313933
Author: Hans Leidekker <hans at codeweavers.com>
Date: Wed Jul 13 10:28:32 2016 +0200
sspicli: Implement SspiEncodeAuthIdentityAsStrings.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/sspicli/main.c | 27 +++++++++++++++++++++++++++
dlls/sspicli/sspicli.spec | 2 +-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/dlls/sspicli/main.c b/dlls/sspicli/main.c
index 026ecfc..cbbb7f1 100644
--- a/dlls/sspicli/main.c
+++ b/dlls/sspicli/main.c
@@ -95,3 +95,30 @@ void SEC_ENTRY SspiZeroAuthIdentity( PSEC_WINNT_AUTH_IDENTITY_OPAQUE opaque_id )
if (id->Password) memset( id->Password, 0, id->PasswordLength * sizeof(WCHAR) );
memset( id, 0, sizeof(*id) );
}
+
+static inline WCHAR *strdupW( const WCHAR *src )
+{
+ WCHAR *dst;
+ if (!src) return NULL;
+ if ((dst = HeapAlloc( GetProcessHeap(), 0, (strlenW( src ) + 1) * sizeof(WCHAR) )))
+ strcpyW( dst, src );
+ return dst;
+}
+
+/***********************************************************************
+ * SspiEncodeAuthIdentityAsStrings (SECUR32.0)
+ */
+SECURITY_STATUS SEC_ENTRY SspiEncodeAuthIdentityAsStrings(
+ PSEC_WINNT_AUTH_IDENTITY_OPAQUE opaque_id, PCWSTR *username,
+ PCWSTR *domainname, PCWSTR *creds )
+{
+ SEC_WINNT_AUTH_IDENTITY_W *id = (SEC_WINNT_AUTH_IDENTITY_W *)opaque_id;
+
+ FIXME("%p %p %p %p\n", opaque_id, username, domainname, creds);
+
+ *username = strdupW( id->User );
+ *domainname = strdupW( id->Domain );
+ *creds = strdupW( id->Password );
+
+ return SEC_E_OK;
+}
diff --git a/dlls/sspicli/sspicli.spec b/dlls/sspicli/sspicli.spec
index 2a78cff..6a6a24c 100644
--- a/dlls/sspicli/sspicli.spec
+++ b/dlls/sspicli/sspicli.spec
@@ -83,7 +83,7 @@
@ stub SspiCopyAuthIdentity
@ stub SspiDecryptAuthIdentity
@ stub SspiDecryptAuthIdentityEx
-@ stub SspiEncodeAuthIdentityAsStrings
+@ stdcall SspiEncodeAuthIdentityAsStrings(ptr ptr ptr ptr)
@ stdcall SspiEncodeStringsAsAuthIdentity(wstr wstr wstr ptr)
@ stub SspiEncryptAuthIdentity
@ stub SspiEncryptAuthIdentityEx
More information about the wine-cvs
mailing list