diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-10-02 15:09:59 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-10-02 15:09:59 +1000 |
commit | 5c07c7eac24ab891bdc90b1624afc804657cc1e1 (patch) | |
tree | 4947f1c6c49d5c41e58e18797ed102bfbab7cba9 /source4 | |
parent | 0227697bf42081db6db1a8257922edc2a36f85fc (diff) | |
download | samba-5c07c7eac24ab891bdc90b1624afc804657cc1e1.tar.gz samba-5c07c7eac24ab891bdc90b1624afc804657cc1e1.tar.bz2 samba-5c07c7eac24ab891bdc90b1624afc804657cc1e1.zip |
s4-libnet: give sane error messages when functional levels don't match
It is nice to tell the user why their command failed :-)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libnet/libnet_become_dc.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c index efd64aa295..3fb308dcd7 100644 --- a/source4/libnet/libnet_become_dc.c +++ b/source4/libnet/libnet_become_dc.c @@ -893,15 +893,17 @@ static NTSTATUS becomeDC_ldap1_crossref_behavior_version(struct libnet_BecomeDC_ if (s->forest.crossref_behavior_version < get_min_function_level(s->libnet->lp_ctx)) { talloc_free(r); - /* we don't support forest function levels below the specified - * value. */ + DEBUG(0,("The servers function level %u is below 'ads:min function level' of %u\n", + s->forest.crossref_behavior_version, + get_min_function_level(s->libnet->lp_ctx))); return NT_STATUS_NOT_SUPPORTED; } if (s->forest.crossref_behavior_version > get_dc_function_level(s->libnet->lp_ctx)) { talloc_free(r); - /* if the DC function level is lower than the forest one we - * cannot join. */ + DEBUG(0,("The servers function level %u is above 'ads:dc function level' of %u\n", + s->forest.crossref_behavior_version, + get_dc_function_level(s->libnet->lp_ctx))); return NT_STATUS_NOT_SUPPORTED; } @@ -936,15 +938,17 @@ static NTSTATUS becomeDC_ldap1_domain_behavior_version(struct libnet_BecomeDC_st if (s->domain.behavior_version < get_min_function_level(s->libnet->lp_ctx)) { talloc_free(r); - /* we don't support domain function levels below the specified - * value. */ + DEBUG(0,("The servers function level %u is below 'ads:min function level' of %u\n", + s->forest.crossref_behavior_version, + get_min_function_level(s->libnet->lp_ctx))); return NT_STATUS_NOT_SUPPORTED; } if (s->domain.behavior_version > get_dc_function_level(s->libnet->lp_ctx)) { talloc_free(r); - /* if the DC function level is lower than the forest one we - * cannot join. */ + DEBUG(0,("The servers function level %u is above 'ads:dc function level' of %u\n", + s->forest.crossref_behavior_version, + get_dc_function_level(s->libnet->lp_ctx))); return NT_STATUS_NOT_SUPPORTED; } |