From a88ed5d1be987af6fe1353a18298d206fbfca4e0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 20 Sep 2001 07:27:55 +0000 Subject: Check 'hosts equiv' and 'use rhosts' compatability with 'hostname lookup' value. (This used to be commit 5f5b4b48ca78b3981001965058a2b4e796ba815c) --- source3/utils/testparm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source3/utils/testparm.c') diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index 1caf792543..f4d072ed77 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -85,6 +85,22 @@ to a valid password server.\n", sec_setting ); ret = 1; } + + /* + * Check 'hosts equiv' and 'use rhosts' compatability with 'hostname lookup' value. + */ + + if(*lp_hosts_equiv() && !lp_hostname_lookups()) { + printf("ERROR: The setting 'hosts equiv = %s' requires that 'hostname lookups = yes'.\n", lp_hosts_equiv()); + ret = 1; + } + + if(lp_use_rhosts() && !lp_hostname_lookups()) { + printf("ERROR: The setting 'use rhosts = yes' requires the 'hostname lookups = yes'.\n"); + ret = 1; + } + + /* * Password chat sanity checks. */ -- cgit