summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-13 09:25:26 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-13 09:32:35 +0200
commit6661ecbe944567a1813fad46d67554433196aae1 (patch)
tree1e674073ff149a0404fbce3002c0a4e1ffbfe033 /source4
parenta894d6cc37c3799d478720f4340fcef57a5d0b4b (diff)
downloadsamba-6661ecbe944567a1813fad46d67554433196aae1.tar.gz
samba-6661ecbe944567a1813fad46d67554433196aae1.tar.bz2
samba-6661ecbe944567a1813fad46d67554433196aae1.zip
s4:CLDAP - "fill_netlogon_samlogon_reponse" - check for out of memory
Diffstat (limited to 'source4')
-rw-r--r--source4/cldap_server/netlogon.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 292327496c..86f044aa87 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -76,6 +76,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
/* the domain has an optional trailing . */
if (domain && domain[strlen(domain)-1] == '.') {
domain = talloc_strndup(mem_ctx, domain, strlen(domain)-1);
+ NT_STATUS_HAVE_NO_MEMORY(domain);
}
if (domain && strcasecmp_m(domain, lp_dnsdomain(lp_ctx)) == 0) {
@@ -240,14 +241,16 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
#endif
pdc_name = talloc_asprintf(mem_ctx, "\\\\%s", lp_netbios_name(lp_ctx));
+ NT_STATUS_HAVE_NO_MEMORY(pdc_name);
domain_uuid = samdb_result_guid(dom_res->msgs[0], "objectGUID");
dns_domain = lp_dnsdomain(lp_ctx);
forest_domain = samdb_forest_name(sam_ctx, mem_ctx);
+ NT_STATUS_HAVE_NO_MEMORY(forest_domain);
pdc_dns_name = talloc_asprintf(mem_ctx, "%s.%s",
strlower_talloc(mem_ctx,
lp_netbios_name(lp_ctx)),
dns_domain);
-
+ NT_STATUS_HAVE_NO_MEMORY(pdc_dns_name);
flatname = lp_sam_name(lp_ctx);
server_site = samdb_server_site_name(sam_ctx, mem_ctx);
/* FIXME: Hardcoded site name */