summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-07-05 15:29:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:11 -0500
commit57dd09939a59385902ca309f0bd382a11e2f773a (patch)
tree823bd9688cff4362dae3c09c586b34cce5c52181
parent99a0d5ca1e402c856f440f6fa256414810e8efa7 (diff)
downloadsamba-57dd09939a59385902ca309f0bd382a11e2f773a.tar.gz
samba-57dd09939a59385902ca309f0bd382a11e2f773a.tar.bz2
samba-57dd09939a59385902ca309f0bd382a11e2f773a.zip
r16823: Allow to call wbinfo --domain-info="" or --domain-info="." to get domain
info for our own domain. Guenther (This used to be commit ebd3c547e508e191d5e1b5bb001797666db7b269)
-rw-r--r--source3/nsswitch/wbinfo.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index 69d7a1069f..27ec27d0be 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -380,7 +380,10 @@ static BOOL wbinfo_domain_info(const char *domain_name)
ZERO_STRUCT(request);
ZERO_STRUCT(response);
- fstrcpy(request.domain_name, domain_name);
+ if ((strequal(domain_name, ".")) || (domain_name[0] == '\0'))
+ fstrcpy(request.domain_name, get_winbind_domain());
+ else
+ fstrcpy(request.domain_name, domain_name);
/* Send request */
@@ -905,9 +908,9 @@ static BOOL print_domain_users(const char *domain)
ZERO_STRUCT(response);
if (domain) {
- /* '.' is the special sign for our own domwin */
+ /* '.' is the special sign for our own domain */
if ( strequal(domain, ".") )
- fstrcpy( request.domain_name, lp_workgroup() );
+ fstrcpy( request.domain_name, get_winbind_domain() );
else
fstrcpy( request.domain_name, domain );
}
@@ -945,7 +948,7 @@ static BOOL print_domain_groups(const char *domain)
if (domain) {
if ( strequal(domain, ".") )
- fstrcpy( request.domain_name, lp_workgroup() );
+ fstrcpy( request.domain_name, get_winbind_domain() );
else
fstrcpy( request.domain_name, domain );
}