* mkgroup.c (enum_local_groups): Use NetLocalGroupGetInfo to find out
if a group exists, rather than just allocating a buffer and going ahead.
This commit is contained in:
parent
2d1bfd524d
commit
bba4895394
|
@ -1,3 +1,8 @@
|
||||||
|
2008-08-18 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* mkgroup.c (enum_local_groups): Use NetLocalGroupGetInfo to find out
|
||||||
|
if a group exists, rather than just allocating a buffer and going ahead.
|
||||||
|
|
||||||
2008-08-18 Corinna Vinschen <corinna@vinschen.de>
|
2008-08-18 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* mkgroup.c (enum_local_groups): Call print_win_error with GetLastError
|
* mkgroup.c (enum_local_groups): Call print_win_error with GetLastError
|
||||||
|
|
|
@ -348,9 +348,8 @@ enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
|
||||||
if (disp_groupname != NULL)
|
if (disp_groupname != NULL)
|
||||||
{
|
{
|
||||||
mbstowcs (gname, disp_groupname, GNLEN + 1);
|
mbstowcs (gname, disp_groupname, GNLEN + 1);
|
||||||
rc = NetApiBufferAllocate (sizeof (LOCALGROUP_INFO_0),
|
rc = NetLocalGroupGetInfo (servername, gname, 0, (void *) &buffer);
|
||||||
(void *) &buffer);
|
if (rc == ERROR_SUCCESS)
|
||||||
buffer[0].lgrpi0_name = gname;
|
|
||||||
entriesread = 1;
|
entriesread = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue