diff options
author | Gerald Carter <jerry@samba.org> | 2003-08-10 22:01:11 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-08-10 22:01:11 +0000 |
commit | d5d9055b9be3960864ae479d52e587865648cbf0 (patch) | |
tree | 9e9e92f88c1e9cb52fb02bef45622f5776681bdf /source3/nsswitch/winbindd_misc.c | |
parent | ce7d025b20bd444f2aace6f7ad719ac2702223a0 (diff) | |
download | samba-d5d9055b9be3960864ae479d52e587865648cbf0.tar.gz samba-d5d9055b9be3960864ae479d52e587865648cbf0.tar.bz2 samba-d5d9055b9be3960864ae479d52e587865648cbf0.zip |
add --domain=DOMAINNAME to wbinfo
Add support for geting the sequence number, list of users, and list
of groups for a specific domain (assuming on reported back by
wbinfo -m)
wbinfo -u --domain=DOA
(This used to be commit 34fc6e1bf97d514d3b1763a808d08d730191e03b)
Diffstat (limited to 'source3/nsswitch/winbindd_misc.c')
-rw-r--r-- | source3/nsswitch/winbindd_misc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c index 740b760b93..d2d50c52ac 100644 --- a/source3/nsswitch/winbindd_misc.c +++ b/source3/nsswitch/winbindd_misc.c @@ -148,9 +148,14 @@ enum winbindd_result winbindd_show_sequence(struct winbindd_cli_state *state) { struct winbindd_domain *domain; char *extra_data = NULL; + const char *which_domain; DEBUG(3, ("[%5lu]: show sequence\n", (unsigned long)state->pid)); + /* Ensure null termination */ + state->request.domain_name[sizeof(state->request.domain_name)-1]='\0'; + which_domain = state->request.domain_name; + extra_data = strdup(""); /* this makes for a very simple data format, and is easily parsable as well @@ -158,6 +163,13 @@ enum winbindd_result winbindd_show_sequence(struct winbindd_cli_state *state) for (domain = domain_list(); domain; domain = domain->next) { char *s; + /* if we have a domain name restricting the request and this + one in the list doesn't match, then just bypass the remainder + of the loop */ + + if ( *which_domain && !strequal(which_domain, domain->name) ) + continue; + domain->methods->sequence_number(domain, &domain->sequence_number); if (DOM_SEQUENCE_NONE == (unsigned)domain->sequence_number) { |