diff options
author | Michael Adam <obnox@samba.org> | 2012-01-30 14:05:59 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-01-31 17:00:30 +0100 |
commit | ca913c98a6948f1b4acf38dd548fb6fa0191367c (patch) | |
tree | 97f07bbb6fca77127d9baa67ad5e74bf07cac53f | |
parent | 04fa9a389c6d027dc4defb2527550fda650c4a6b (diff) | |
download | samba-ca913c98a6948f1b4acf38dd548fb6fa0191367c.tar.gz samba-ca913c98a6948f1b4acf38dd548fb6fa0191367c.tar.bz2 samba-ca913c98a6948f1b4acf38dd548fb6fa0191367c.zip |
s3:net ads join: check for success of fetching machine password in dns update block
log and cleanup accordingly if failed
-rw-r--r-- | source3/utils/net_ads.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 22486ea7fb..ddfe10b914 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -1486,6 +1486,11 @@ int net_ads_join(struct net_context *c, int argc, const char **argv) ads_dns->auth.password = secrets_fetch_machine_password( r->out.netbios_domain_name, NULL, NULL); + if (ads_dns->auth.password == NULL) { + d_fprintf(stderr, _("DNS update failed: out of memory\n")); + goto dns_done; + } + ads_dns->auth.realm = SMB_STRDUP(r->out.dns_domain_name); strupper_m(ads_dns->auth.realm); ads_kinit_password(ads_dns); |