From 63a72d20bd0effd544c46b8ddb593d21ebff5d3b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 11 Aug 2003 06:36:30 +0000 Subject: adding '.' special name to --domain to mean our domain (This used to be commit f833d1f15691a418b99f82dbda75b673fb3428f6) --- source3/nsswitch/wbinfo.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index 68948ec889..657d9c83bd 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -699,8 +699,13 @@ static BOOL print_domain_users(const char *domain) ZERO_STRUCT(request); ZERO_STRUCT(response); - if (domain) - fstrcpy( request.domain_name, domain ); + if (domain) { + /* '.' is the special sign for our own domwin */ + if ( strequal(domain, ".") ) + fstrcpy( request.domain_name, lp_workgroup() ); + else + fstrcpy( request.domain_name, domain ); + } if (winbindd_request(WINBINDD_LIST_USERS, &request, &response) != NSS_STATUS_SUCCESS) @@ -733,9 +738,13 @@ static BOOL print_domain_groups(const char *domain) ZERO_STRUCT(request); ZERO_STRUCT(response); - if (domain) - fstrcpy( request.domain_name, domain ); - + if (domain) { + if ( strequal(domain, ".") ) + fstrcpy( request.domain_name, lp_workgroup() ); + else + fstrcpy( request.domain_name, domain ); + } + if (winbindd_request(WINBINDD_LIST_GROUPS, &request, &response) != NSS_STATUS_SUCCESS) return False; -- cgit