Changeset 740 for vendor/current/source3/utils/testparm.c
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/utils/testparm.c
r414 r740 33 33 34 34 #include "includes.h" 35 36 extern bool AllowDebugChange; 35 #include "system/filesys.h" 36 #include "popt_common.h" 37 37 38 38 /******************************************************************* … … 78 78 } 79 79 80 if (strequal(lp_workgroup(), global_myname())) { 81 fprintf(stderr, "WARNING: 'workgroup' and 'netbios name' " \ 82 "must differ.\n"); 83 ret = 1; 84 } 85 80 86 if (!directory_exist_stat(lp_lockdir(), &st)) { 81 87 fprintf(stderr, "ERROR: lock directory %s does not exist\n", … … 123 129 */ 124 130 125 if((lp_security() == SEC_SERVER || lp_security() >= SEC_DOMAIN) && ! lp_passwordserver()) {131 if((lp_security() == SEC_SERVER || lp_security() >= SEC_DOMAIN) && !*lp_passwordserver()) { 126 132 const char *sec_setting; 127 133 if(lp_security() == SEC_SERVER) … … 129 135 else if(lp_security() == SEC_DOMAIN) 130 136 sec_setting = "domain"; 137 else if(lp_security() == SEC_ADS) 138 sec_setting = "ads"; 131 139 else 132 140 sec_setting = ""; 133 141 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 ); 137 158 } 138 159 … … 320 341 static char *parameter_name = NULL; 321 342 static const char *section_name = NULL; 322 static char *new_local_machine = NULL;323 343 const char *cname; 324 344 const char *caddr; … … 330 350 {"suppress-prompt", 's', POPT_ARG_VAL, &silent_mode, 1, "Suppress prompt for enter"}, 331 351 {"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"},333 352 {"skip-logic-checks", 'l', POPT_ARG_NONE, &skip_logic_checks, 1, "Skip the global checks"}, 334 353 {"show-all-parameters", '\0', POPT_ARG_VAL, &show_all_parameters, True, "Show the parameters, type, possible values" }, … … 337 356 POPT_COMMON_VERSION 338 357 POPT_COMMON_DEBUGLEVEL 358 POPT_COMMON_OPTION 339 359 POPT_TABLEEND 340 360 }; … … 348 368 * not by smb.conf. 349 369 */ 350 DEBUGLEVEL_CLASS[DBGC_ALL] = 2;370 lp_set_cmdline("log level", "2"); 351 371 352 372 pc = poptGetContext(NULL, argc, argv, long_options, … … 361 381 } 362 382 363 setup_logging(poptGetArg(pc), True);383 setup_logging(poptGetArg(pc), DEBUG_STDERR); 364 384 365 385 if (poptPeekArg(pc)) … … 376 396 goto done; 377 397 } 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;386 398 387 399 fprintf(stderr,"Load smb config files from %s\n",config_file);
Note:
See TracChangeset
for help on using the changeset viewer.