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
edbf3ac0
Commit
edbf3ac0
authored
Nov 12, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32: Merge local_group.c into netapi32.c.
parent
192cc0ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
215 additions
and
252 deletions
+215
-252
Makefile.in
dlls/netapi32/Makefile.in
+0
-1
local_group.c
dlls/netapi32/local_group.c
+0
-251
netapi32.c
dlls/netapi32/netapi32.c
+215
-0
No files found.
dlls/netapi32/Makefile.in
View file @
edbf3ac0
...
...
@@ -4,7 +4,6 @@ IMPORTLIB = netapi32
IMPORTS
=
iphlpapi ws2_32 advapi32
C_SRCS
=
\
local_group.c
\
nbcmdqueue.c
\
nbnamecache.c
\
nbt.c
\
...
...
dlls/netapi32/local_group.c
deleted
100644 → 0
View file @
192cc0ac
/*
* Copyright 2006 Robert Reif
*
* netapi32 local group functions
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "lmcons.h"
#include "lmaccess.h"
#include "lmapibuf.h"
#include "lmerr.h"
#include "winreg.h"
#include "ntsecapi.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
netapi32
);
/************************************************************
* NetLocalGroupAdd (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupAdd
(
LPCWSTR
servername
,
DWORD
level
,
LPBYTE
buf
,
LPDWORD
parm_err
)
{
FIXME
(
"(%s %d %p %p) stub!
\n
"
,
debugstr_w
(
servername
),
level
,
buf
,
parm_err
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupAddMember (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupAddMember
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
PSID
membersid
)
{
FIXME
(
"(%s %s %p) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
membersid
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupAddMembers (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupAddMembers
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
DWORD
level
,
LPBYTE
buf
,
DWORD
totalentries
)
{
FIXME
(
"(%s %s %d %p %d) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
level
,
buf
,
totalentries
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupDel (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupDel
(
LPCWSTR
servername
,
LPCWSTR
groupname
)
{
FIXME
(
"(%s %s) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
));
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupDelMember (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupDelMember
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
PSID
membersid
)
{
FIXME
(
"(%s %s %p) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
membersid
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupDelMembers (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupDelMembers
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
DWORD
level
,
LPBYTE
buf
,
DWORD
totalentries
)
{
FIXME
(
"(%s %s %d %p %d) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
level
,
buf
,
totalentries
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupEnum (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupEnum
(
LPCWSTR
servername
,
DWORD
level
,
LPBYTE
*
bufptr
,
DWORD
prefmaxlen
,
LPDWORD
entriesread
,
LPDWORD
totalentries
,
PDWORD_PTR
resumehandle
)
{
FIXME
(
"(%s %d %p %d %p %p %p) stub!
\n
"
,
debugstr_w
(
servername
),
level
,
bufptr
,
prefmaxlen
,
entriesread
,
totalentries
,
resumehandle
);
*
entriesread
=
0
;
*
totalentries
=
0
;
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupGetInfo (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupGetInfo
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
DWORD
level
,
LPBYTE
*
bufptr
)
{
static
const
WCHAR
commentW
[]
=
{
'N'
,
'o'
,
' '
,
'c'
,
'o'
,
'm'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
LOCALGROUP_INFO_1
*
info
;
DWORD
size
;
FIXME
(
"(%s %s %d %p) semi-stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
level
,
bufptr
);
size
=
sizeof
(
*
info
)
+
sizeof
(
WCHAR
)
*
(
lstrlenW
(
groupname
)
+
1
)
+
sizeof
(
commentW
);
NetApiBufferAllocate
(
size
,
(
LPVOID
*
)
&
info
);
info
->
lgrpi1_name
=
(
LPWSTR
)(
info
+
1
);
lstrcpyW
(
info
->
lgrpi1_name
,
groupname
);
info
->
lgrpi1_comment
=
info
->
lgrpi1_name
+
lstrlenW
(
groupname
)
+
1
;
lstrcpyW
(
info
->
lgrpi1_comment
,
commentW
);
*
bufptr
=
(
LPBYTE
)
info
;
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupGetMembers (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupGetMembers
(
LPCWSTR
servername
,
LPCWSTR
localgroupname
,
DWORD
level
,
LPBYTE
*
bufptr
,
DWORD
prefmaxlen
,
LPDWORD
entriesread
,
LPDWORD
totalentries
,
PDWORD_PTR
resumehandle
)
{
FIXME
(
"(%s %s %d %p %d, %p %p %p) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
localgroupname
),
level
,
bufptr
,
prefmaxlen
,
entriesread
,
totalentries
,
resumehandle
);
if
(
level
==
3
)
{
WCHAR
userName
[
MAX_COMPUTERNAME_LENGTH
+
1
];
DWORD
userNameLen
;
DWORD
len
,
needlen
;
PLOCALGROUP_MEMBERS_INFO_3
ptr
;
/* still a stub, current user is belonging to all groups */
*
totalentries
=
1
;
*
entriesread
=
0
;
userNameLen
=
MAX_COMPUTERNAME_LENGTH
+
1
;
if
(
!
GetUserNameW
(
userName
,
&
userNameLen
))
return
ERROR_NOT_ENOUGH_MEMORY
;
needlen
=
sizeof
(
LOCALGROUP_MEMBERS_INFO_3
)
+
(
userNameLen
+
2
)
*
sizeof
(
WCHAR
);
if
(
prefmaxlen
!=
MAX_PREFERRED_LENGTH
)
len
=
min
(
prefmaxlen
,
needlen
);
else
len
=
needlen
;
NetApiBufferAllocate
(
len
,
(
LPVOID
*
)
bufptr
);
if
(
len
<
needlen
)
return
ERROR_MORE_DATA
;
ptr
=
(
PLOCALGROUP_MEMBERS_INFO_3
)
*
bufptr
;
ptr
->
lgrmi3_domainandname
=
(
LPWSTR
)(
*
bufptr
+
sizeof
(
LOCALGROUP_MEMBERS_INFO_3
));
lstrcpyW
(
ptr
->
lgrmi3_domainandname
,
userName
);
*
entriesread
=
1
;
}
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupSetInfo (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupSetInfo
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
DWORD
level
,
LPBYTE
buf
,
LPDWORD
parm_err
)
{
FIXME
(
"(%s %s %d %p %p) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
level
,
buf
,
parm_err
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupSetMember (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupSetMembers
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
DWORD
level
,
LPBYTE
buf
,
DWORD
totalentries
)
{
FIXME
(
"(%s %s %d %p %d) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
level
,
buf
,
totalentries
);
return
NERR_Success
;
}
dlls/netapi32/netapi32.c
View file @
edbf3ac0
...
...
@@ -2,6 +2,7 @@
* Copyright 2002 Andriy Palamarchuk
* Copyright 2003 Juan Lang
* Copyright 2005,2006 Paul Vriens
* Copyright 2006 Robert Reif
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -2121,3 +2122,217 @@ DWORD WINAPI DsRoleGetPrimaryDomainInformation(
}
return
ret
;
}
/************************************************************
* NetLocalGroupAdd (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupAdd
(
LPCWSTR
servername
,
DWORD
level
,
LPBYTE
buf
,
LPDWORD
parm_err
)
{
FIXME
(
"(%s %d %p %p) stub!
\n
"
,
debugstr_w
(
servername
),
level
,
buf
,
parm_err
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupAddMember (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupAddMember
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
PSID
membersid
)
{
FIXME
(
"(%s %s %p) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
membersid
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupAddMembers (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupAddMembers
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
DWORD
level
,
LPBYTE
buf
,
DWORD
totalentries
)
{
FIXME
(
"(%s %s %d %p %d) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
level
,
buf
,
totalentries
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupDel (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupDel
(
LPCWSTR
servername
,
LPCWSTR
groupname
)
{
FIXME
(
"(%s %s) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
));
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupDelMember (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupDelMember
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
PSID
membersid
)
{
FIXME
(
"(%s %s %p) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
membersid
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupDelMembers (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupDelMembers
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
DWORD
level
,
LPBYTE
buf
,
DWORD
totalentries
)
{
FIXME
(
"(%s %s %d %p %d) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
level
,
buf
,
totalentries
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupEnum (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupEnum
(
LPCWSTR
servername
,
DWORD
level
,
LPBYTE
*
bufptr
,
DWORD
prefmaxlen
,
LPDWORD
entriesread
,
LPDWORD
totalentries
,
PDWORD_PTR
resumehandle
)
{
FIXME
(
"(%s %d %p %d %p %p %p) stub!
\n
"
,
debugstr_w
(
servername
),
level
,
bufptr
,
prefmaxlen
,
entriesread
,
totalentries
,
resumehandle
);
*
entriesread
=
0
;
*
totalentries
=
0
;
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupGetInfo (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupGetInfo
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
DWORD
level
,
LPBYTE
*
bufptr
)
{
static
const
WCHAR
commentW
[]
=
{
'N'
,
'o'
,
' '
,
'c'
,
'o'
,
'm'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
LOCALGROUP_INFO_1
*
info
;
DWORD
size
;
FIXME
(
"(%s %s %d %p) semi-stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
level
,
bufptr
);
size
=
sizeof
(
*
info
)
+
sizeof
(
WCHAR
)
*
(
lstrlenW
(
groupname
)
+
1
)
+
sizeof
(
commentW
);
NetApiBufferAllocate
(
size
,
(
LPVOID
*
)
&
info
);
info
->
lgrpi1_name
=
(
LPWSTR
)(
info
+
1
);
lstrcpyW
(
info
->
lgrpi1_name
,
groupname
);
info
->
lgrpi1_comment
=
info
->
lgrpi1_name
+
lstrlenW
(
groupname
)
+
1
;
lstrcpyW
(
info
->
lgrpi1_comment
,
commentW
);
*
bufptr
=
(
LPBYTE
)
info
;
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupGetMembers (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupGetMembers
(
LPCWSTR
servername
,
LPCWSTR
localgroupname
,
DWORD
level
,
LPBYTE
*
bufptr
,
DWORD
prefmaxlen
,
LPDWORD
entriesread
,
LPDWORD
totalentries
,
PDWORD_PTR
resumehandle
)
{
FIXME
(
"(%s %s %d %p %d, %p %p %p) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
localgroupname
),
level
,
bufptr
,
prefmaxlen
,
entriesread
,
totalentries
,
resumehandle
);
if
(
level
==
3
)
{
WCHAR
userName
[
MAX_COMPUTERNAME_LENGTH
+
1
];
DWORD
userNameLen
;
DWORD
len
,
needlen
;
PLOCALGROUP_MEMBERS_INFO_3
ptr
;
/* still a stub, current user is belonging to all groups */
*
totalentries
=
1
;
*
entriesread
=
0
;
userNameLen
=
MAX_COMPUTERNAME_LENGTH
+
1
;
if
(
!
GetUserNameW
(
userName
,
&
userNameLen
))
return
ERROR_NOT_ENOUGH_MEMORY
;
needlen
=
sizeof
(
LOCALGROUP_MEMBERS_INFO_3
)
+
(
userNameLen
+
2
)
*
sizeof
(
WCHAR
);
if
(
prefmaxlen
!=
MAX_PREFERRED_LENGTH
)
len
=
min
(
prefmaxlen
,
needlen
);
else
len
=
needlen
;
NetApiBufferAllocate
(
len
,
(
LPVOID
*
)
bufptr
);
if
(
len
<
needlen
)
return
ERROR_MORE_DATA
;
ptr
=
(
PLOCALGROUP_MEMBERS_INFO_3
)
*
bufptr
;
ptr
->
lgrmi3_domainandname
=
(
LPWSTR
)(
*
bufptr
+
sizeof
(
LOCALGROUP_MEMBERS_INFO_3
));
lstrcpyW
(
ptr
->
lgrmi3_domainandname
,
userName
);
*
entriesread
=
1
;
}
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupSetInfo (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupSetInfo
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
DWORD
level
,
LPBYTE
buf
,
LPDWORD
parm_err
)
{
FIXME
(
"(%s %s %d %p %p) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
level
,
buf
,
parm_err
);
return
NERR_Success
;
}
/************************************************************
* NetLocalGroupSetMember (NETAPI32.@)
*/
NET_API_STATUS
WINAPI
NetLocalGroupSetMembers
(
LPCWSTR
servername
,
LPCWSTR
groupname
,
DWORD
level
,
LPBYTE
buf
,
DWORD
totalentries
)
{
FIXME
(
"(%s %s %d %p %d) stub!
\n
"
,
debugstr_w
(
servername
),
debugstr_w
(
groupname
),
level
,
buf
,
totalentries
);
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