* mkgroup.c (enum_local_groups): Call print_win_error with GetLastError

as argument when LookupAccountXXX failed.
	(enum_groups): Ditto.
This commit is contained in:
Corinna Vinschen 2008-08-18 12:42:44 +00:00
parent 5a62582162
commit 2d1bfd524d
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2008-08-18 Corinna Vinschen <corinna@vinschen.de>
* mkgroup.c (enum_local_groups): Call print_win_error with GetLastError
as argument when LookupAccountXXX failed.
(enum_groups): Ditto.
2008-08-18 Corinna Vinschen <corinna@vinschen.de> 2008-08-18 Corinna Vinschen <corinna@vinschen.de>
* mkgroup.c (enum_local_groups): Return failure if looking for a single * mkgroup.c (enum_local_groups): Return failure if looking for a single

View File

@ -388,7 +388,7 @@ enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
&sid_length, domain_name, &domname_len, &sid_length, domain_name, &domname_len,
&acc_type)) &acc_type))
{ {
print_win_error (rc); print_win_error (GetLastError ());
fprintf (stderr, " (%ls)\n", buffer[i].lgrpi0_name); fprintf (stderr, " (%ls)\n", buffer[i].lgrpi0_name);
continue; continue;
} }
@ -406,7 +406,7 @@ enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
domain_name, &domname_len, domain_name, &domname_len,
&acc_type)) &acc_type))
{ {
print_win_error (rc); print_win_error (GetLastError ());
fprintf(stderr, " (%ls)\n", domname); fprintf(stderr, " (%ls)\n", domname);
continue; continue;
} }
@ -538,7 +538,7 @@ enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
domain_name, &domname_len, domain_name, &domname_len,
&acc_type)) &acc_type))
{ {
print_win_error (rc); print_win_error (GetLastError ());
fprintf(stderr, " (%ls)\n", buffer[i].grpi2_name); fprintf(stderr, " (%ls)\n", buffer[i].grpi2_name);
continue; continue;
} }
@ -557,7 +557,7 @@ enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
domain_name, &domname_len, domain_name, &domname_len,
&acc_type)) &acc_type))
{ {
print_win_error (rc); print_win_error (GetLastError ());
fprintf(stderr, " (%ls)\n", domname); fprintf(stderr, " (%ls)\n", domname);
continue; continue;
} }