mirror of
https://github.com/samba-team/samba.git
synced 2025-12-03 04:23:50 +03:00
netapi: Correctly increase idx when displaying user information
(This used to be commit 5fad9de250)
This commit is contained in:
committed by
Günther Deschner
parent
fc6216b2da
commit
b3152fb268
@@ -78,11 +78,13 @@ int main(int argc, const char **argv)
|
|||||||
if (status == 0 || status == ERROR_MORE_DATA) {
|
if (status == 0 || status == ERROR_MORE_DATA) {
|
||||||
user = (struct NET_DISPLAY_USER *)buffer;
|
user = (struct NET_DISPLAY_USER *)buffer;
|
||||||
for (i=0; i<entries_read; i++) {
|
for (i=0; i<entries_read; i++) {
|
||||||
printf("user %d: %s\n", i, user->usri1_name);
|
printf("user %d: %s\n", i + idx,i
|
||||||
|
user->usri1_name);
|
||||||
user++;
|
user++;
|
||||||
}
|
}
|
||||||
NetApiBufferFree(buffer);
|
NetApiBufferFree(buffer);
|
||||||
}
|
}
|
||||||
|
idx += entries_read;
|
||||||
} while (status == ERROR_MORE_DATA);
|
} while (status == ERROR_MORE_DATA);
|
||||||
|
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user