Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/utils/testparm.c

    r414 r740  
    3333
    3434#include "includes.h"
    35 
    36 extern bool AllowDebugChange;
     35#include "system/filesys.h"
     36#include "popt_common.h"
    3737
    3838/*******************************************************************
     
    7878        }
    7979
     80        if (strequal(lp_workgroup(), global_myname())) {
     81                fprintf(stderr, "WARNING: 'workgroup' and 'netbios name' " \
     82                        "must differ.\n");
     83                ret = 1;
     84        }
     85
    8086        if (!directory_exist_stat(lp_lockdir(), &st)) {
    8187                fprintf(stderr, "ERROR: lock directory %s does not exist\n",
     
    123129         */
    124130
    125         if((lp_security() == SEC_SERVER || lp_security() >= SEC_DOMAIN) && !lp_passwordserver()) {
     131        if((lp_security() == SEC_SERVER || lp_security() >= SEC_DOMAIN) && !*lp_passwordserver()) {
    126132                const char *sec_setting;
    127133                if(lp_security() == SEC_SERVER)
     
    129135                else if(lp_security() == SEC_DOMAIN)
    130136                        sec_setting = "domain";
     137                else if(lp_security() == SEC_ADS)
     138                        sec_setting = "ads";
    131139                else
    132140                        sec_setting = "";
    133141
    134                 fprintf(stderr, "ERROR: The setting 'security=%s' requires the 'password server' parameter be set \
    135 to a valid password server.\n", sec_setting );
    136                 ret = 1;
     142                fprintf(stderr, "ERROR: The setting 'security=%s' requires the 'password server' parameter be set\n"
     143                        "to the default value * or a valid password server.\n", sec_setting );
     144                ret = 1;
     145        }
     146
     147        if((lp_security() >= SEC_DOMAIN) && (strcmp(lp_passwordserver(), "*") != 0)) {
     148                const char *sec_setting;
     149                if(lp_security() == SEC_DOMAIN)
     150                        sec_setting = "domain";
     151                else if(lp_security() == SEC_ADS)
     152                        sec_setting = "ads";
     153                else
     154                        sec_setting = "";
     155
     156                fprintf(stderr, "WARNING: The setting 'security=%s' should NOT be combined with the 'password server' parameter.\n"
     157                        "(by default Samba will discover the correct DC to contact automatically).\n", sec_setting );
    137158        }
    138159
     
    320341        static char *parameter_name = NULL;
    321342        static const char *section_name = NULL;
    322         static char *new_local_machine = NULL;
    323343        const char *cname;
    324344        const char *caddr;
     
    330350                {"suppress-prompt", 's', POPT_ARG_VAL, &silent_mode, 1, "Suppress prompt for enter"},
    331351                {"verbose", 'v', POPT_ARG_NONE, &show_defaults, 1, "Show default options too"},
    332                 {"server", 'L',POPT_ARG_STRING, &new_local_machine, 0, "Set %%L macro to servername\n"},
    333352                {"skip-logic-checks", 'l', POPT_ARG_NONE, &skip_logic_checks, 1, "Skip the global checks"},
    334353                {"show-all-parameters", '\0', POPT_ARG_VAL, &show_all_parameters, True, "Show the parameters, type, possible values" },
     
    337356                POPT_COMMON_VERSION
    338357                POPT_COMMON_DEBUGLEVEL
     358                POPT_COMMON_OPTION
    339359                POPT_TABLEEND
    340360        };
     
    348368         * not by smb.conf.
    349369         */
    350         DEBUGLEVEL_CLASS[DBGC_ALL] = 2;
     370        lp_set_cmdline("log level", "2");
    351371
    352372        pc = poptGetContext(NULL, argc, argv, long_options,
     
    361381        }
    362382
    363         setup_logging(poptGetArg(pc), True);
     383        setup_logging(poptGetArg(pc), DEBUG_STDERR);
    364384
    365385        if (poptPeekArg(pc))
     
    376396                goto done;
    377397        }
    378 
    379         if (new_local_machine) {
    380                 set_local_machine_name(new_local_machine, True);
    381         }
    382 
    383         dbf = x_stderr;
    384         /* Don't let the debuglevel be changed by smb.conf. */
    385         AllowDebugChange = False;
    386398
    387399        fprintf(stderr,"Load smb config files from %s\n",config_file);
Note: See TracChangeset for help on using the changeset viewer.