diff options
author | Günther Deschner <gd@samba.org> | 2006-05-31 17:15:33 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:16 -0500 |
commit | 22a543f5bbf20a9104c7f448bb7b24921f17ee3e (patch) | |
tree | 3fe41861cf619375ac47d5162f629d977c163803 /source3/nsswitch | |
parent | a6f5c7998006ef485ef50166a4c5bf478ae63dd5 (diff) | |
download | samba-22a543f5bbf20a9104c7f448bb7b24921f17ee3e.tar.gz samba-22a543f5bbf20a9104c7f448bb7b24921f17ee3e.tar.bz2 samba-22a543f5bbf20a9104c7f448bb7b24921f17ee3e.zip |
r15985: Adding "own-domain" switch to wbinfo which is handy from time to time.
Guenther
(This used to be commit 3c9416c2bedeec7f075e94d45d08f37ae6dd41d1)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/wbinfo.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index c004b842f4..69d7a1069f 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -332,6 +332,14 @@ static BOOL wbinfo_list_domains(BOOL list_all_domains) return True; } +/* List own domain */ + +static BOOL wbinfo_list_own_domain(void) +{ + d_printf("%s\n", get_winbind_domain()); + + return True; +} /* show sequence numbers */ static BOOL wbinfo_show_sequence(const char *domain) @@ -1080,7 +1088,8 @@ enum { OPT_ALLOCATE_UID, OPT_ALLOCATE_GID, OPT_SEPARATOR, - OPT_LIST_ALL_DOMAINS + OPT_LIST_ALL_DOMAINS, + OPT_LIST_OWN_DOMAIN }; int main(int argc, char **argv) @@ -1116,6 +1125,7 @@ int main(int argc, char **argv) { "check-secret", 't', POPT_ARG_NONE, 0, 't', "Check shared secret" }, { "trusted-domains", 'm', POPT_ARG_NONE, 0, 'm', "List trusted domains" }, { "all-domains", 0, POPT_ARG_NONE, 0, OPT_LIST_ALL_DOMAINS, "List all domains (trusted and own domain)" }, + { "own-domain", 0, POPT_ARG_NONE, 0, OPT_LIST_OWN_DOMAIN, "List own domain" }, { "sequence", 0, POPT_ARG_NONE, 0, OPT_SEQUENCE, "Show sequence numbers of all domains" }, { "domain-info", 'D', POPT_ARG_STRING, &string_arg, 'D', "Show most of the info we have about the domain" }, { "user-info", 'i', POPT_ARG_STRING, &string_arg, 'i', "Get user info", "USER" }, @@ -1396,6 +1406,12 @@ int main(int argc, char **argv) if (!wbinfo_list_domains(True)) { goto done; } + break; + case OPT_LIST_OWN_DOMAIN: + if (!wbinfo_list_own_domain()) { + goto done; + } + break; /* generic configuration options */ case OPT_DOMAIN_NAME: break; |