diff options
-rw-r--r-- | source4/libnet/libnet_join.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c index 6f32a6ec37..86ad685c51 100644 --- a/source4/libnet/libnet_join.c +++ b/source4/libnet/libnet_join.c @@ -940,13 +940,6 @@ NTSTATUS libnet_set_join_secrets(struct libnet_context *ctx, talloc_free(tmp_mem); return NT_STATUS_NO_MEMORY; } - - rtn = samdb_msg_add_string(ldb, tmp_mem, msg, "objectClass", "primaryDomain"); - if (rtn == -1) { - r->out.error_string = NULL; - talloc_free(tmp_mem); - return NT_STATUS_NO_MEMORY; - } } rtn = samdb_msg_add_string(ldb, tmp_mem, msg, "objectClass", "primaryDomain"); @@ -956,6 +949,13 @@ NTSTATUS libnet_set_join_secrets(struct libnet_context *ctx, return NT_STATUS_NO_MEMORY; } + rtn = samdb_msg_add_string(ldb, tmp_mem, msg, "objectClass", "kerberosSecret"); + if (rtn == -1) { + r->out.error_string = NULL; + talloc_free(tmp_mem); + return NT_STATUS_NO_MEMORY; + } + rtn = samdb_msg_add_string(ldb, tmp_mem, msg, "secret", r->in.join_password); if (rtn == -1) { r->out.error_string = NULL; @@ -1008,7 +1008,7 @@ NTSTATUS libnet_set_join_secrets(struct libnet_context *ctx, "(|" SECRETS_PRIMARY_DOMAIN_FILTER "(realm=%s))", r->in.domain_name, r->in.realm); if (ret == 0) { - rtn = samdb_msg_set_string(ldb, tmp_mem, msg, "secretsKeytab", "secrets.keytab"); + rtn = samdb_msg_set_string(ldb, tmp_mem, msg, "privateKeytab", "secrets.keytab"); if (rtn == -1) { r->out.error_string = NULL; talloc_free(tmp_mem); |