Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
39894c24
Commit
39894c24
authored
Sep 12, 2008
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Sep 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32: Improve NetUserGetLocalGroups stub.
Report the user as member of the admins group.
parent
5d687f40
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
4 deletions
+33
-4
access.c
dlls/netapi32/access.c
+33
-4
No files found.
dlls/netapi32/access.c
View file @
39894c24
...
...
@@ -417,6 +417,10 @@ NetUserGetLocalGroups(LPCWSTR servername, LPCWSTR username, DWORD level,
LPDWORD
entriesread
,
LPDWORD
totalentries
)
{
NET_API_STATUS
status
;
const
WCHAR
admins
[]
=
{
'A'
,
'd'
,
'm'
,
'i'
,
'n'
,
'i'
,
's'
,
't'
,
'r'
,
'a'
,
't'
,
'o'
,
'r'
,
's'
,
0
};
LPWSTR
currentuser
;
LOCALGROUP_USERS_INFO_0
*
info
;
DWORD
size
;
FIXME
(
"(%s, %s, %d, %08x, %p %d, %p, %p) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
username
),
level
,
flags
,
bufptr
,
...
...
@@ -426,12 +430,37 @@ NetUserGetLocalGroups(LPCWSTR servername, LPCWSTR username, DWORD level,
if
(
status
!=
NERR_Success
)
return
status
;
if
(
!
NETAPI_FindUser
(
username
))
size
=
UNLEN
+
1
;
NetApiBufferAllocate
(
size
,
(
LPVOID
*
)
&
currentuser
);
GetUserNameW
(
currentuser
,
&
size
);
if
(
lstrcmpiW
(
username
,
currentuser
)
&&
NETAPI_FindUser
(
username
))
{
NetApiBufferFree
(
currentuser
);
return
NERR_UserNotFound
;
}
NetApiBufferFree
(
currentuser
);
*
totalentries
=
1
;
size
=
sizeof
(
*
info
)
+
sizeof
(
admins
);
if
(
prefmaxlen
<
size
)
status
=
ERROR_MORE_DATA
;
else
status
=
NetApiBufferAllocate
(
size
,
(
LPVOID
*
)
&
info
);
if
(
status
!=
NERR_Success
)
{
*
bufptr
=
NULL
;
*
entriesread
=
0
;
return
status
;
}
info
->
lgrui0_name
=
(
LPWSTR
)((
LPBYTE
)
info
+
sizeof
(
*
info
));
lstrcpyW
(
info
->
lgrui0_name
,
admins
);
if
(
bufptr
)
*
bufptr
=
NULL
;
if
(
entriesread
)
*
entriesread
=
0
;
if
(
totalentries
)
*
totalentries
=
0
;
*
bufptr
=
(
LPBYTE
)
info
;
*
entriesread
=
1
;
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