r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
[vlendec/samba-autobuild/.git] / source3 / utils / testparm.c
index 2b72479ac0762082b564388a201465c17611339a..56360d2ef5a09d3e606e48b7017aa18b6d785533 100644 (file)
@@ -8,7 +8,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -17,8 +17,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 /*
@@ -73,6 +72,11 @@ cannot be set in the smb.conf file. nmbd will abort with this setting.\n");
                ret = 1;
        }
 
+       if (lp_passdb_expand_explicit()) {
+               fprintf(stderr, "WARNING: passdb expand explicit = yes is "
+                       "deprecated\n");
+       }
+
        /*
         * Password server sanity checks.
         */
@@ -90,15 +94,6 @@ to a valid password server.\n", sec_setting );
        }
 
        
-       /*
-        * Check 'hosts equiv' and 'use rhosts' compatibility with 'hostname lookup' value.
-        */
-
-       if(*lp_hosts_equiv() && !lp_hostname_lookups()) {
-               fprintf(stderr, "ERROR: The setting 'hosts equiv = %s' requires that 'hostname lookups = yes'.\n", lp_hosts_equiv());
-               ret = 1;
-       }
-
        /*
         * Password chat sanity checks.
         */
@@ -206,7 +201,7 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_
        poptContext pc;
        static const char *term_code = "";
        static char *parameter_name = NULL;
-       static char *section_name = NULL;
+       static const char *section_name = NULL;
        static char *new_local_machine = NULL;
        const char *cname;
        const char *caddr;
@@ -225,6 +220,8 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_
                POPT_TABLEEND
        };
 
+       load_case_tables();
+
        pc = poptGetContext(NULL, argc, argv, long_options, 
                            POPT_CONTEXT_KEEP_FIRST);
        poptSetOtherOptionHelp(pc, "[OPTION...] <config-file> [host-name] [host-ip]");
@@ -259,7 +256,7 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_
 
        fprintf(stderr,"Load smb config files from %s\n",config_file);
 
-       if (!lp_load(config_file,False,True,False)) {
+       if (!lp_load(config_file,False,True,False,True)) {
                fprintf(stderr,"Error loading services.\n");
                return(1);
        }
@@ -342,25 +339,8 @@ print command parameter is ignored when using CUPS libraries.\n",
        }
 
 
-       if (!silent_mode && !section_name && !parameter_name) {
-               fprintf(stderr,"Server role: ");
-               switch(lp_server_role()) {
-                       case ROLE_STANDALONE:
-                               fprintf(stderr,"ROLE_STANDALONE\n");
-                               break;
-                       case ROLE_DOMAIN_MEMBER:
-                               fprintf(stderr,"ROLE_DOMAIN_MEMBER\n");
-                               break;
-                       case ROLE_DOMAIN_BDC:
-                               fprintf(stderr,"ROLE_DOMAIN_BDC\n");
-                               break;
-                       case ROLE_DOMAIN_PDC:
-                               fprintf(stderr,"ROLE_DOMAIN_PDC\n");
-                               break;
-                       default:
-                               fprintf(stderr,"Unknown -- internal error?\n");
-                               break;
-               }
+       if (!section_name && !parameter_name) {
+               fprintf(stderr,"Server role: %s\n", server_role_str(lp_server_role()));
        }
 
        if (!cname) {