summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-01-30 14:12:15 +0100
committerMichael Adam <obnox@samba.org>2012-01-31 17:00:30 +0100
commit9cd7b8f04d6e51a0be4e18e8842ff1062134afae (patch)
tree88e69ef4420dfbd27e8c634f70b7e71a69e20c01 /source3/utils
parent4831b6e6bb422a9186cf42980894b5e46c147ed4 (diff)
downloadsamba-9cd7b8f04d6e51a0be4e18e8842ff1062134afae.tar.gz
samba-9cd7b8f04d6e51a0be4e18e8842ff1062134afae.tar.bz2
samba-9cd7b8f04d6e51a0be4e18e8842ff1062134afae.zip
s3:net ads join: interpret return code of ads_kinit_password() in dns update block
If failed, print according error message and skip the attempt to do dns update.
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index cb15b76a28..ecb04ceea6 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1498,7 +1498,14 @@ int net_ads_join(struct net_context *c, int argc, const char **argv)
}
strupper_m(ads_dns->auth.realm);
- ads_kinit_password(ads_dns);
+
+ ret = ads_kinit_password(ads_dns);
+ if (ret != 0) {
+ d_fprintf(stderr,
+ _("DNS update failed: kinit failed: %s\n"),
+ error_message(ret));
+ goto dns_done;
+ }
if (!NT_STATUS_IS_OK(net_update_dns( ctx, ads_dns, NULL))) {
d_fprintf( stderr, _("DNS update failed!\n"));