summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-08-11 06:36:30 +0000
committerGerald Carter <jerry@samba.org>2003-08-11 06:36:30 +0000
commit63a72d20bd0effd544c46b8ddb593d21ebff5d3b (patch)
tree3903a90d877c12d2bac6e597367a688eba48d35f
parent99144d5541331862d9a2c550a6aab69499c3e95a (diff)
downloadsamba-63a72d20bd0effd544c46b8ddb593d21ebff5d3b.tar.gz
samba-63a72d20bd0effd544c46b8ddb593d21ebff5d3b.tar.bz2
samba-63a72d20bd0effd544c46b8ddb593d21ebff5d3b.zip
adding '.' special name to --domain to mean our domain
(This used to be commit f833d1f15691a418b99f82dbda75b673fb3428f6)
-rw-r--r--source3/nsswitch/wbinfo.c19
1 files 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;