From: Björn Jacke Date: Sun, 1 Jul 2012 22:46:06 +0000 (+0200) Subject: s3: fix build without ads support X-Git-Tag: samba-3.5.17~4 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=1bedfeadc04aa0fcd4740f647ea784d1bcdbd36b s3: fix build without ads support when we have no ads support we don't have the ads_get_sid_token symbol used in this unused code :-) this is the backport of 43c56dc4255a7a6cbd176e6ae66a7652c6d72d2c Fix bug #8996 - build without ads support (e.g. plain solaris 8) broken. (cherry picked from commit f8ed8815adc6acc42bab2f1b69085dcda8bb9894) --- diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c index 7a23b5cbd37..4e0c8ab0595 100644 --- a/libgpo/gpo_util.c +++ b/libgpo/gpo_util.c @@ -840,6 +840,7 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads, const char *dn, NT_USER_TOKEN **token) { +#ifdef HAVE_ADS NT_USER_TOKEN *ad_token = NULL; ADS_STATUS status; #if _SAMBA_BUILD_ == 4 @@ -848,9 +849,6 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads, NTSTATUS ntstatus; #endif -#ifndef HAVE_ADS - return ADS_ERROR_NT(NT_STATUS_NOT_SUPPORTED); -#endif status = ads_get_sid_token(ads, mem_ctx, dn, &ad_token); if (!ADS_ERR_OK(status)) { return status; @@ -866,4 +864,7 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads, } #endif return ADS_SUCCESS; +#else + return ADS_ERROR_NT(NT_STATUS_NOT_SUPPORTED); +#endif }