summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-10-28 02:13:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:22 -0500
commit900d6fab322dfa8a0ff8a17fb440d269c8d6c678 (patch)
treeeb03adac722e49a9b2a1510501d98c08da6b28c6 /source4/libnet
parent26fde8dee17b02eb064c6410d781709094ce5160 (diff)
downloadsamba-900d6fab322dfa8a0ff8a17fb440d269c8d6c678.tar.gz
samba-900d6fab322dfa8a0ff8a17fb440d269c8d6c678.tar.bz2
samba-900d6fab322dfa8a0ff8a17fb440d269c8d6c678.zip
r11349: Actually add all the new spns...
Andrew Bartlett (This used to be commit 63eede2ad3f0238e1a925325c0be08d79f48c33b)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_join.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index 4927f5fb45..daa840f76e 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -417,6 +417,12 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
}
+ rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "servicePrincipalName", service_principal_name[i]);
+ if (rtn == -1) {
+ r->out.error_string = NULL;
+ talloc_free(tmp_ctx);
+ return NT_STATUS_NO_MEMORY;
+ }
}
rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "dNSHostName", dns_host_name);
@@ -425,18 +431,6 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
}
- rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "servicePrincipalName", service_principal_name[0]);
- if (rtn == -1) {
- r->out.error_string = NULL;
- talloc_free(tmp_ctx);
- return NT_STATUS_NO_MEMORY;
- }
- rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "servicePrincipalName", service_principal_name[1]);
- if (rtn == -1) {
- r->out.error_string = NULL;
- talloc_free(tmp_ctx);
- return NT_STATUS_NO_MEMORY;
- }
rtn = samdb_replace(remote_ldb, tmp_ctx, msg);
if (rtn != 0) {