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
d54043c0
Commit
d54043c0
authored
Aug 12, 2006
by
Robert Reif
Committed by
Alexandre Julliard
Aug 14, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32: NetUserModalsGet bug fixes and cleanup.
parent
ef1c8fd1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
access.c
dlls/netapi32/access.c
+15
-13
No files found.
dlls/netapi32/access.c
View file @
d54043c0
...
...
@@ -618,10 +618,11 @@ NET_API_STATUS WINAPI NetUserModalsGet(
NTSTATUS
ntStatus
;
PSID
domainIdentifier
=
NULL
;
int
domainNameLen
;
ZeroMemory
(
&
objectAttributes
,
sizeof
(
objectAttributes
));
ntStatus
=
LsaOpenPolicy
(
NULL
,
&
objectAttributes
,
objectAttributes
.
Length
=
sizeof
(
objectAttributes
);
ntStatus
=
LsaOpenPolicy
(
NULL
,
&
objectAttributes
,
POLICY_VIEW_LOCAL_INFORMATION
,
&
policyHandle
);
if
(
ntStatus
!=
STATUS_SUCCESS
)
...
...
@@ -630,28 +631,29 @@ NET_API_STATUS WINAPI NetUserModalsGet(
LsaNtStatusToWinError
(
ntStatus
));
return
ntStatus
;
}
ntStatus
=
LsaQueryInformationPolicy
(
policyHandle
,
ntStatus
=
LsaQueryInformationPolicy
(
policyHandle
,
PolicyAccountDomainInformation
,
(
PVOID
*
)
&
domainInfo
);
if
(
ntStatus
!=
STATUS_SUCCESS
)
{
WARN
(
"LsaQueryInformationPolicy failed with NT status %lx
\n
"
,
LsaNtStatusToWinError
(
ntStatus
));
LsaClose
(
policyHandle
);
return
ntStatus
;
}
domainIdentifier
=
domainInfo
->
DomainSid
;
domainNameLen
=
lstrlenW
(
domainInfo
->
DomainName
.
Buffer
)
+
1
;
LsaClose
(
policyHandle
);
ntStatus
=
NetApiBufferAllocate
(
sizeof
(
USER_MODALS_INFO_2
)
+
GetLengthSid
(
domainIdentifier
)
+
domainNameLen
*
sizeof
(
WCHAR
),
(
LPVOID
*
)
pbuffer
);
if
(
ntStatus
!=
NERR_Success
)
{
{
WARN
(
"NetApiBufferAllocate() failed
\n
"
);
LsaFreeMemory
(
domainInfo
);
return
ntStatus
;
...
...
@@ -662,7 +664,7 @@ NET_API_STATUS WINAPI NetUserModalsGet(
sizeof
(
USER_MODALS_INFO_2
));
umi
->
usrmod2_domain_name
=
(
LPWSTR
)(
*
pbuffer
+
sizeof
(
USER_MODALS_INFO_2
)
+
GetLengthSid
(
domainIdentifier
));
lstrcpynW
(
umi
->
usrmod2_domain_name
,
domainInfo
->
DomainName
.
Buffer
,
domainNameLen
);
...
...
@@ -670,9 +672,9 @@ NET_API_STATUS WINAPI NetUserModalsGet(
domainIdentifier
);
LsaFreeMemory
(
domainInfo
);
break
;
}
}
case
3
:
/* return lockout information */
FIXME
(
"level 3 not implemented!
\n
"
);
...
...
@@ -683,6 +685,6 @@ NET_API_STATUS WINAPI NetUserModalsGet(
*
pbuffer
=
NULL
;
return
ERROR_INVALID_LEVEL
;
}
return
NERR_Success
;
}
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