[PATCH] selftest: Print error message when smbd does not have ADS support
Andrew Bartlett
abartlet at samba.org
Wed Jul 3 17:51:20 MDT 2013
On Wed, 2013-07-03 at 13:09 -0700, Christof Schmitt wrote:
> When smbd cannot be compiled with ADS support, setting up the s3member
> environment fails with:
>
> Can't use string ("UNKNOWN") as a HASH ref while "strict refs" in use at
> /home/cschmit/test/samba/selftest/selftest.pl line 852.
>
> Add an explicit error message for the missing ADS support to make this
> easier to debug.
>
> Signed-off-by: Christof Schmitt <christof.schmitt at us.ibm.com>
> ---
> selftest/target/Samba3.pm | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
> index 26f5e92..20587bf 100755
> --- a/selftest/target/Samba3.pm
> +++ b/selftest/target/Samba3.pm
> @@ -25,6 +25,7 @@ sub have_ads($) {
> close IN;
>
> # If we were not built with ADS support, pretend we were never even available
> + print "smbd does not have ADS support\n" unless $found_ads;
> return $found_ads;
> }
While this is good, we should also have a line like this at line 919
} elsif ($envvars eq "UNKNOWN") {
and never deference the magic marker as a hash.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba-technical
mailing list