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
ce7da2e1
Commit
ce7da2e1
authored
Apr 30, 2021
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msv1_0: Implement SpQueryContextAttributes.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
57ae6251
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
1 deletion
+75
-1
main.c
dlls/msv1_0/main.c
+75
-1
No files found.
dlls/msv1_0/main.c
View file @
ce7da2e1
...
...
@@ -1047,6 +1047,80 @@ static NTSTATUS NTAPI ntlm_SpDeleteContext( LSA_SEC_HANDLE handle )
return
SEC_E_OK
;
}
static
SecPkgInfoW
*
build_package_info
(
const
SecPkgInfoW
*
info
)
{
SecPkgInfoW
*
ret
;
DWORD
size_name
=
(
wcslen
(
info
->
Name
)
+
1
)
*
sizeof
(
WCHAR
);
DWORD
size_comment
=
(
wcslen
(
info
->
Comment
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
!
(
ret
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
*
ret
)
+
size_name
+
size_comment
)))
return
NULL
;
ret
->
fCapabilities
=
info
->
fCapabilities
;
ret
->
wVersion
=
info
->
wVersion
;
ret
->
wRPCID
=
info
->
wRPCID
;
ret
->
cbMaxToken
=
info
->
cbMaxToken
;
ret
->
Name
=
(
SEC_WCHAR
*
)(
ret
+
1
);
memcpy
(
ret
->
Name
,
info
->
Name
,
size_name
);
ret
->
Comment
=
(
SEC_WCHAR
*
)((
char
*
)
ret
->
Name
+
size_name
);
memcpy
(
ret
->
Comment
,
info
->
Comment
,
size_comment
);
return
ret
;
}
static
NTSTATUS
NTAPI
ntlm_SpQueryContextAttributes
(
LSA_SEC_HANDLE
handle
,
ULONG
attr
,
void
*
buf
)
{
TRACE
(
"%lx, %u, %p
\n
"
,
handle
,
attr
,
buf
);
if
(
!
handle
)
return
SEC_E_INVALID_HANDLE
;
switch
(
attr
)
{
#define X(x) case (x) : FIXME(#x" stub\n"); break
X
(
SECPKG_ATTR_ACCESS_TOKEN
);
X
(
SECPKG_ATTR_AUTHORITY
);
X
(
SECPKG_ATTR_DCE_INFO
);
X
(
SECPKG_ATTR_KEY_INFO
);
X
(
SECPKG_ATTR_LIFESPAN
);
X
(
SECPKG_ATTR_NAMES
);
X
(
SECPKG_ATTR_NATIVE_NAMES
);
X
(
SECPKG_ATTR_PACKAGE_INFO
);
X
(
SECPKG_ATTR_PASSWORD_EXPIRY
);
X
(
SECPKG_ATTR_SESSION_KEY
);
X
(
SECPKG_ATTR_STREAM_SIZES
);
X
(
SECPKG_ATTR_TARGET_INFORMATION
);
case
SECPKG_ATTR_FLAGS
:
{
SecPkgContext_Flags
*
flags
=
(
SecPkgContext_Flags
*
)
buf
;
struct
ntlm_ctx
*
ctx
=
(
struct
ntlm_ctx
*
)
handle
;
flags
->
Flags
=
0
;
if
(
ctx
->
flags
&
FLAG_NEGOTIATE_SIGN
)
flags
->
Flags
|=
ISC_RET_INTEGRITY
;
if
(
ctx
->
flags
&
FLAG_NEGOTIATE_SEAL
)
flags
->
Flags
|=
ISC_RET_CONFIDENTIALITY
;
return
SEC_E_OK
;
}
case
SECPKG_ATTR_SIZES
:
{
SecPkgContext_Sizes
*
sizes
=
(
SecPkgContext_Sizes
*
)
buf
;
sizes
->
cbMaxToken
=
NTLM_MAX_BUF
;
sizes
->
cbMaxSignature
=
16
;
sizes
->
cbBlockSize
=
0
;
sizes
->
cbSecurityTrailer
=
16
;
return
SEC_E_OK
;
}
case
SECPKG_ATTR_NEGOTIATION_INFO
:
{
SecPkgContext_NegotiationInfoW
*
info
=
(
SecPkgContext_NegotiationInfoW
*
)
buf
;
if
(
!
(
info
->
PackageInfo
=
build_package_info
(
&
ntlm_package_info
)))
return
SEC_E_INSUFFICIENT_MEMORY
;
info
->
NegotiationState
=
SECPKG_NEGOTIATION_COMPLETE
;
return
SEC_E_OK
;
}
#undef X
default:
FIXME
(
"unknown attribute %u
\n
"
,
attr
);
break
;
}
return
SEC_E_UNSUPPORTED_FUNCTION
;
}
static
SECPKG_FUNCTION_TABLE
ntlm_table
=
{
ntlm_LsaApInitializePackage
,
...
...
@@ -1073,7 +1147,7 @@ static SECPKG_FUNCTION_TABLE ntlm_table =
NULL
,
/* ApplyControlToken */
NULL
,
/* GetUserInfo */
NULL
,
/* GetExtendedInformation */
NULL
,
/* SpQueryContextAttributes */
ntlm_SpQueryContextAttributes
,
NULL
,
/* SpAddCredentials */
NULL
,
/* SetExtendedInformation */
NULL
,
/* SetContextAttributes */
...
...
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