diff options
author | Günther Deschner <gd@samba.org> | 2005-02-07 14:14:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:55:34 -0500 |
commit | e98f56373bca0efc200bc3a4263477e1790a746b (patch) | |
tree | b90a2b814be5fffe100b7660f5493e5323836925 /source3/rpcclient | |
parent | 5a595ccff88c59af42b7ac23ac5cf75e33104137 (diff) | |
download | samba-e98f56373bca0efc200bc3a4263477e1790a746b.tar.gz samba-e98f56373bca0efc200bc3a4263477e1790a746b.tar.bz2 samba-e98f56373bca0efc200bc3a4263477e1790a746b.zip |
r5262: Fix server_role in the samr_query_dom_info calls. When we are a BDC we
should not say we are a PDC.
Guenther
(This used to be commit 6cdf3b97de2c28ac92f972621b0ce04c1c80cea5)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index a69a0cb73a..331353aee7 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -141,6 +141,27 @@ static const char *display_time(NTTIME nttime) return (string); } +static const char* server_role_str(uint32 server_role) +{ + switch(server_role) { + case ROLE_STANDALONE: + return strdup("ROLE_STANDALONE"); + break; + case ROLE_DOMAIN_MEMBER: + return strdup("ROLE_DOMAIN_MEMBER"); + break; + case ROLE_DOMAIN_BDC: + return strdup("ROLE_DOMAIN_BDC"); + break; + case ROLE_DOMAIN_PDC: + return strdup("ROLE_DOMAIN_PDC"); + break; + default: + return strdup("Unknown -- internal error?"); + break; + } +} + static void display_sam_unk_info_1(SAM_UNK_INFO_1 *info1) { @@ -159,10 +180,10 @@ static void display_sam_unk_info_2(SAM_UNK_INFO_2 *info2) fstring name; unistr2_to_ascii(name, &info2->uni_domain, sizeof(name) - 1); - printf("Domain:\t%s\n", name); + printf("Domain:\t\t%s\n", name); unistr2_to_ascii(name, &info2->uni_server, sizeof(name) - 1); - printf("Server:\t%s\n", name); + printf("Server:\t\t%s\n", name); unistr2_to_ascii(name, &info2->uni_comment, sizeof(name) - 1); printf("Comment:\t%s\n", name); @@ -176,10 +197,15 @@ static void display_sam_unk_info_2(SAM_UNK_INFO_2 *info2) printf("Force Logoff:\t%d\n", (int)nt_time_to_unix_abs(&info2->logout)); printf("Unknown 4:\t0x%x\n", info2->unknown_4); - printf("Unknown 5:\t0x%x\n", info2->unknown_5); + printf("Server Role:\t%s\n", server_role_str(info2->server_role)); printf("Unknown 6:\t0x%x\n", info2->unknown_6); } +static void display_sam_unk_info_7(SAM_UNK_INFO_7 *info7) +{ + printf("Server Role:\t%s\n", server_role_str(info7->server_role)); +} + static void display_sam_unk_info_8(SAM_UNK_INFO_8 *info8) { printf("Sequence No:\t%d\n", info8->seq_num.low); @@ -1161,6 +1187,9 @@ static NTSTATUS cmd_samr_query_dominfo(struct cli_state *cli, case 2: display_sam_unk_info_2(&ctr.info.inf2); break; + case 7: + display_sam_unk_info_7(&ctr.info.inf7); + break; case 8: display_sam_unk_info_8(&ctr.info.inf8); break; |