diff options
author | Günther Deschner <gd@samba.org> | 2004-12-22 16:58:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:44 -0500 |
commit | 9aba116607c0b85a371c3556a6483bc662c769a3 (patch) | |
tree | 1226aeb6a22916e841504272e172d7c410369301 /source3/rpcclient | |
parent | 3312191867e97a7cf3d485c050c1e689ea574f6d (diff) | |
download | samba-9aba116607c0b85a371c3556a6483bc662c769a3.tar.gz samba-9aba116607c0b85a371c3556a6483bc662c769a3.tar.bz2 samba-9aba116607c0b85a371c3556a6483bc662c769a3.zip |
r4331: Implement SAMR query_dom_info-call info-level 8 server- and client-side,
based on samba4-idl.
This saves us an enormous amount of totally unnecessary ldap-traffic
when several hundreds of winbind-daemons query a Samba3 DC just to get
the fake SAM-sequence-number (time(NULL)) by enumerating all users, all
groups and all aliases when query-dom-info level 2 is used.
Note that we apparently never get the sequence number right (we parse a
uint32, although it's a uint64, at least in samba4 idl). For the time
being, I would propose to stay with that behaviour.
Guenther
(This used to be commit f9ab15a986626581000d4b93961184c501f36b93)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index f8be84a5c9..2a282680a8 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -160,16 +160,23 @@ static void display_sam_unk_info_2(SAM_UNK_INFO_2 *info2) printf("Total Groups:\t%d\n", info2->num_domain_grps); printf("Total Aliases:\t%d\n", info2->num_local_grps); - printf("Sequence No:\t%d\n", info2->seq_num); + printf("Sequence No:\t%d\n", info2->seq_num.low); printf("Unknown 0:\t0x%x\n", info2->unknown_0); printf("Unknown 1:\t0x%x\n", info2->unknown_1); - printf("Unknown 3:\t0x%x\n", info2->unknown_3); printf("Unknown 4:\t0x%x\n", info2->unknown_4); printf("Unknown 5:\t0x%x\n", info2->unknown_5); printf("Unknown 6:\t0x%x\n", info2->unknown_6); } +static void display_sam_unk_info_8(SAM_UNK_INFO_8 *info8) +{ + printf("Sequence No:\t%d\n", info8->seq_num.low); + printf("Domain Create Time:\t%s\n", + http_timestring(nt_time_to_unix(&info8->domain_create_time))); + +} + static void display_sam_unk_info_12(SAM_UNK_INFO_12 *info12) { printf("Bad password lockout duration: %s\n", display_time(info12->duration)); @@ -1130,6 +1137,9 @@ static NTSTATUS cmd_samr_query_dominfo(struct cli_state *cli, case 2: display_sam_unk_info_2(&ctr.info.inf2); break; + case 8: + display_sam_unk_info_8(&ctr.info.inf8); + break; case 12: display_sam_unk_info_12(&ctr.info.inf12); break; |