[4/7] sspicli: Implement SspiEncodeAuthIdentityAsStrings.
Hans Leidekker
hans at codeweavers.com
Wed Jul 13 03:28:32 CDT 2016
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
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
--
2.8.1
More information about the wine-patches
mailing list