Check 'hosts equiv' and 'use rhosts' compatability with 'hostname
authorAndrew Bartlett <abartlet@samba.org>
Thu, 20 Sep 2001 07:27:55 +0000 (07:27 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 20 Sep 2001 07:27:55 +0000 (07:27 +0000)
lookup' value.
(This used to be commit 5f5b4b48ca78b3981001965058a2b4e796ba815c)

source3/utils/testparm.c

index 1caf79254327b78cc64bc98c2cff91d1c8e64716..f4d072ed77ff6d34f9cc7fcd3e6f9dcabc19ecde 100644 (file)
@@ -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.
         */