summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-07 20:20:03 +0100
committerGünther Deschner <gd@samba.org>2008-01-07 20:21:02 +0100
commitec75d53dfc6b678f1270927864dae621e63b11c7 (patch)
tree350a30ca2df831fda1a388ff4d2e2ac8fea4a49f
parent60eb92478c58ae3c68b691c62e6bc7cb6518c679 (diff)
downloadsamba-ec75d53dfc6b678f1270927864dae621e63b11c7.tar.gz
samba-ec75d53dfc6b678f1270927864dae621e63b11c7.tar.bz2
samba-ec75d53dfc6b678f1270927864dae621e63b11c7.zip
Finally use libnet_join_set_* functions in libnetjoin.
Guenther (This used to be commit 1436670854ae635cfa2a69939d3ac31da87c3f66)
-rw-r--r--source3/libnet/libnet_join.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 4149116833..94fa62e47b 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -990,6 +990,36 @@ static WERROR libnet_DomainJoin(TALLOC_CTX *mem_ctx,
return WERR_SETUP_NOT_JOINED;
}
+ ads_status = libnet_join_set_machine_spn(mem_ctx, r);
+ if (!ADS_ERR_OK(ads_status)) {
+ libnet_join_set_error_string(mem_ctx, r,
+ "failed to set machine spn: %s\n",
+ ads_errstr(ads_status));
+ return WERR_GENERAL_FAILURE;
+ }
+
+ ads_status = libnet_join_set_os_attributes(mem_ctx, r);
+ if (!ADS_ERR_OK(ads_status)) {
+ libnet_join_set_error_string(mem_ctx, r,
+ "failed to set machine os attributes: %s\n",
+ ads_errstr(ads_status));
+ return WERR_GENERAL_FAILURE;
+ }
+
+ ads_status = libnet_join_set_machine_upn(mem_ctx, r);
+ if (!ADS_ERR_OK(ads_status)) {
+ libnet_join_set_error_string(mem_ctx, r,
+ "failed to set machine upn: %s\n",
+ ads_errstr(ads_status));
+ return WERR_GENERAL_FAILURE;
+ }
+
+ if (!libnet_join_create_keytab(mem_ctx, r)) {
+ libnet_join_set_error_string(mem_ctx, r,
+ "failed to create kerberos keytab\n");
+ return WERR_GENERAL_FAILURE;
+ }
+
return WERR_OK;
}