diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-07 10:33:47 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-07 10:33:47 +1000 |
commit | 86f3a2ea0984e0a28fab2228ff7bd4f97543d098 (patch) | |
tree | 6c3a554da958aa9623a09cb52d20f8c8f6862004 | |
parent | 8ce73c6c50ef36b413a40640c04180a614cc2f68 (diff) | |
download | samba-86f3a2ea0984e0a28fab2228ff7bd4f97543d098.tar.gz samba-86f3a2ea0984e0a28fab2228ff7bd4f97543d098.tar.bz2 samba-86f3a2ea0984e0a28fab2228ff7bd4f97543d098.zip |
s4: fixed the secrets.ldb construction in libnet
on a vampire join we were not putting the right attributes and
objectclass on the secrets.ldb record
-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); |