diff options
author | Gerald Carter <jerry@samba.org> | 2003-08-11 06:36:30 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-08-11 06:36:30 +0000 |
commit | 63a72d20bd0effd544c46b8ddb593d21ebff5d3b (patch) | |
tree | 3903a90d877c12d2bac6e597367a688eba48d35f /source3 | |
parent | 99144d5541331862d9a2c550a6aab69499c3e95a (diff) | |
download | samba-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)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nsswitch/wbinfo.c | 19 |
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; |