1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r23827: Fix schema dump.

Guenther
(This used to be commit e3d6dabcb9)
This commit is contained in:
Günther Deschner 2007-07-11 09:49:10 +00:00 committed by Gerald (Jerry) Carter
parent 1c957f9559
commit 47d2f021c8

View File

@ -837,7 +837,8 @@ sub get_base_from_rootdse {
my $server = shift || ""; my $server = shift || "";
$dse = shift || get_dse($server,$async_ldap_hd) || return -1; $dse = shift || get_dse($server,$async_ldap_hd) || return -1;
return $dse->get_value('defaultNamingContext'); return $dse->get_value($opt_dump_schema ? 'schemaNamingContext':
'defaultNamingContext');
} }
sub get_realm_from_rootdse { sub get_realm_from_rootdse {
@ -1499,7 +1500,7 @@ sub gen_controls {
critical => 'true', critical => 'true',
value => ""); value => "");
if (defined($opt_paging)) { if (defined($opt_paging) || $opt_dump_schema) {
push(@ctrls, $ctl_paged); push(@ctrls, $ctl_paged);
push(@ctrls_s, "LDAP_PAGED_RESULT_OID_STRING" ); push(@ctrls_s, "LDAP_PAGED_RESULT_OID_STRING" );
} }
@ -1787,9 +1788,9 @@ sub main () {
if ($opt_dump_schema) { if ($opt_dump_schema) {
print "Dumping Schema:\n"; print "Dumping Schema:\n";
my $ads_schema = $async_ldap_hd->schema; # my $ads_schema = $async_ldap_hd->schema;
$ads_schema->dump; # $ads_schema->dump;
exit 0; # exit 0;
} }
while (1) { while (1) {