diff options
author | Günther Deschner <gd@samba.org> | 2008-01-12 02:10:17 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-01-12 02:10:17 +0100 |
commit | a05edb57e753c567c6310d435439c29658cdd089 (patch) | |
tree | 641e2959a0550ceb4d1c37c008f5202390c8fa91 /source3/libnet | |
parent | 8921b2222a9e2db9e185486b247fb5fca448971d (diff) | |
download | samba-a05edb57e753c567c6310d435439c29658cdd089.tar.gz samba-a05edb57e753c567c6310d435439c29658cdd089.tar.bz2 samba-a05edb57e753c567c6310d435439c29658cdd089.zip |
Use WITH_ADS define in libnet_join, hopefully not breaking the build.
Guenther
(This used to be commit 48f638a45525c01db9855e3ef809f08ce65da8d8)
Diffstat (limited to 'source3/libnet')
-rw-r--r-- | source3/libnet/libnet_join.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index ea92059fb4..689d8def35 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -58,7 +58,7 @@ static void libnet_unjoin_set_error_string(TALLOC_CTX *mem_ctx, r->out.error_string = tmp; } -#ifdef HAVE_LDAP +#ifdef WITH_ADS /**************************************************************** ****************************************************************/ @@ -426,8 +426,6 @@ static ADS_STATUS libnet_join_set_os_attributes(TALLOC_CTX *mem_ctx, return ads_gen_mod(r->in.ads, r->out.dn, mods); } -#endif /* HAVE_LDAP */ - /**************************************************************** ****************************************************************/ @@ -437,16 +435,14 @@ static bool libnet_join_create_keytab(TALLOC_CTX *mem_ctx, if (!lp_use_kerberos_keytab()) { return true; } -#ifdef HAVE_KRB5 + if (!ads_keytab_create_default(r->in.ads)) { return false; } -#endif /* HAVE_KRB5 */ + return true; } -#ifdef HAVE_KRB5 - /**************************************************************** ****************************************************************/ @@ -495,7 +491,7 @@ static bool libnet_join_derive_salting_principal(TALLOC_CTX *mem_ctx, return kerberos_secrets_store_des_salt(salt); } -#endif /* HAVE_KRB5 */ +#endif /* WITH_ADS */ /**************************************************************** ****************************************************************/ @@ -1021,7 +1017,7 @@ static WERROR libnet_DomainJoin(TALLOC_CTX *mem_ctx, struct libnet_JoinCtx *r) { NTSTATUS status; -#ifdef HAVE_LDAP +#ifdef WITH_ADS ADS_STATUS ads_status; if (r->in.account_ou) { @@ -1040,7 +1036,7 @@ static WERROR libnet_DomainJoin(TALLOC_CTX *mem_ctx, r->in.join_flags &= ~WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE; } -#endif /* HAVE_LDAP */ +#endif /* WITH_ADS */ status = libnet_join_joindomain_rpc(mem_ctx, r); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status, NT_STATUS_USER_EXISTS)) { @@ -1053,7 +1049,7 @@ static WERROR libnet_DomainJoin(TALLOC_CTX *mem_ctx, return WERR_SETUP_NOT_JOINED; } -#ifdef HAVE_LDAP +#ifdef WITH_ADS ads_status = libnet_join_set_machine_spn(mem_ctx, r); if (!ADS_ERR_OK(ads_status)) { libnet_join_set_error_string(mem_ctx, r, @@ -1078,13 +1074,11 @@ static WERROR libnet_DomainJoin(TALLOC_CTX *mem_ctx, return WERR_GENERAL_FAILURE; } -#ifdef HAVE_KRB5 if (!libnet_join_derive_salting_principal(mem_ctx, r)) { return WERR_GENERAL_FAILURE; } -#endif /* HAVE_KRB5 */ +#endif /* WITH_ADS */ -#endif /* HAVE_LDAP */ if (!libnet_join_create_keytab(mem_ctx, r)) { libnet_join_set_error_string(mem_ctx, r, "failed to create kerberos keytab"); @@ -1148,7 +1142,7 @@ static WERROR libnet_DomainUnjoin(TALLOC_CTX *mem_ctx, return ntstatus_to_werror(status); } -#ifdef HAVE_LDAP +#ifdef WITH_ADS if (r->in.unjoin_flags & WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE) { ADS_STATUS ads_status; libnet_unjoin_connect_ads(mem_ctx, r); @@ -1159,7 +1153,8 @@ static WERROR libnet_DomainUnjoin(TALLOC_CTX *mem_ctx, ads_errstr(ads_status)); } } -#endif /* HAVE_LDAP */ +#endif /* WITH_ADS */ + libnet_join_unjoindomain_remove_secrets(mem_ctx, r); return WERR_OK; |