git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4831b6e
)
s3:net ads join: interpret return code of ads_kinit_password() in dns update block
author
Michael Adam
<obnox@samba.org>
Mon, 30 Jan 2012 13:12:15 +0000
(14:12 +0100)
committer
Michael Adam
<obnox@samba.org>
Tue, 31 Jan 2012 16:00:30 +0000
(17:00 +0100)
If failed, print according error message and skip the attempt to do dns update.
source3/utils/net_ads.c
patch
|
blob
|
history
diff --git
a/source3/utils/net_ads.c
b/source3/utils/net_ads.c
index cb15b76a28c26245b7c92755399edcd9afcf77e7..ecb04ceea611f7a671f25e8a1305c932c7fe6c87 100644
(file)
--- 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"));