diff -urp samba-3.0.23d.org/source/lib/charcnv.c samba-3.0.23d/source/lib/charcnv.c --- samba-3.0.23d.org/source/lib/charcnv.c 2006-04-20 04:29:23.000000000 +0200 +++ samba-3.0.23d/source/lib/charcnv.c 2006-11-27 01:13:38.000000000 +0100 @@ -67,19 +67,26 @@ static const char *charset_name(charset_ const char *ln = NULL; #ifdef HAVE_SETLOCALE +fprintf(stderr, "here 33\n"); setlocale(LC_ALL, ""); +fprintf(stderr, "here 34\n"); #endif ln = nl_langinfo(CODESET); +fprintf(stderr, "here 35\n"); if (ln) { /* Check whether the charset name is supported by iconv */ +fprintf(stderr, "here 36: h = smb_iconv_open(%s,UCS-2LE)\n", ln); smb_iconv_t handle = smb_iconv_open(ln,"UCS-2LE"); +fprintf(stderr, "here 37\n"); if (handle == (smb_iconv_t) -1) { DEBUG(5,("Locale charset '%s' unsupported, using ASCII instead\n", ln)); ln = NULL; } else { +fprintf(stderr, "here 38: smb_iconv_close(h)\n"); DEBUG(5,("Substituting charset '%s' for LOCALE\n", ln)); smb_iconv_close(handle); +fprintf(stderr, "here 39\n"); } } ret = ln; @@ -132,27 +139,36 @@ void init_iconv(void) /* so that charset_name() works we need to get the UNIX<->UCS2 going first */ +fprintf(stderr, "here 20\n"); if (!conv_handles[CH_UNIX][CH_UCS2]) conv_handles[CH_UNIX][CH_UCS2] = smb_iconv_open(charset_name(CH_UCS2), "ASCII"); +fprintf(stderr, "here 21\n"); if (!conv_handles[CH_UCS2][CH_UNIX]) conv_handles[CH_UCS2][CH_UNIX] = smb_iconv_open("ASCII", charset_name(CH_UCS2)); +fprintf(stderr, "here 22\n"); for (c1=0;c1from_name) == 0 && strcmp(n2, conv_handles[c1][c2]->to_name) == 0) continue; +fprintf(stderr, "here 223\n"); did_reload = True; if (conv_handles[c1][c2]) smb_iconv_close(conv_handles[c1][c2]); +fprintf(stderr, "here 224\n"); conv_handles[c1][c2] = smb_iconv_open(n2,n1); +fprintf(stderr, "here 225\n"); if (conv_handles[c1][c2] == (smb_iconv_t)-1) { DEBUG(0,("init_iconv: Conversion from %s to %s not supported\n", charset_name((charset_t)c1), charset_name((charset_t)c2))); @@ -164,7 +180,9 @@ void init_iconv(void) } DEBUG(0,("init_iconv: Attempting to replace with conversion from %s to %s\n", n1, n2 )); +fprintf(stderr, "here 226\n"); conv_handles[c1][c2] = smb_iconv_open(n2,n1); +fprintf(stderr, "here 227\n"); if (!conv_handles[c1][c2]) { DEBUG(0,("init_iconv: Conversion from %s to %s failed", n1, n2)); smb_panic("init_iconv: conv_handle initialization failed."); @@ -172,6 +190,7 @@ void init_iconv(void) } } } +fprintf(stderr, "here 23\n"); if (did_reload) { /* XXX: Does this really get called every time the dos @@ -179,9 +198,11 @@ void init_iconv(void) /* XXX: Is the did_reload test too strict? */ conv_silent = True; init_doschar_table(); +fprintf(stderr, "here 24\n"); init_valid_table(); conv_silent = False; } +fprintf(stderr, "here 25\n"); } /** diff -urp samba-3.0.23d.org/source/lib/iconv.c samba-3.0.23d/source/lib/iconv.c --- samba-3.0.23d.org/source/lib/iconv.c 2006-05-23 20:54:32.000000000 +0200 +++ samba-3.0.23d/source/lib/iconv.c 2006-11-27 01:15:30.000000000 +0100 @@ -314,8 +314,11 @@ smb_iconv_t smb_iconv_open(const char *t int smb_iconv_close (smb_iconv_t cd) { #ifdef HAVE_NATIVE_ICONV +fprintf(stderr, "here 40\n"); if (cd->cd_direct) iconv_close((iconv_t)cd->cd_direct); +fprintf(stderr, "here 41\n"); if (cd->cd_pull) iconv_close((iconv_t)cd->cd_pull); +fprintf(stderr, "here 42\n"); if (cd->cd_push) iconv_close((iconv_t)cd->cd_push); #endif @@ -324,6 +327,7 @@ int smb_iconv_close (smb_iconv_t cd) memset(cd, 0, sizeof(*cd)); SAFE_FREE(cd); +fprintf(stderr, "here 44\n"); return 0; } diff -urp samba-3.0.23d.org/source/param/loadparm.c samba-3.0.23d/source/param/loadparm.c --- samba-3.0.23d.org/source/param/loadparm.c 2006-07-10 18:27:51.000000000 +0200 +++ samba-3.0.23d/source/param/loadparm.c 2006-11-27 01:04:54.000000000 +0100 @@ -4949,11 +4949,12 @@ BOOL lp_load(const char *pszFname, init_globals(! initialize_globals); debug_init(); - +fprintf(stderr, "here 10\n"); if (save_defaults) { init_locals(); lp_save_defaults(); } +fprintf(stderr, "here 11\n"); if (Globals.param_opt != NULL) { data = Globals.param_opt; @@ -4967,30 +4968,40 @@ BOOL lp_load(const char *pszFname, } Globals.param_opt = NULL; } +fprintf(stderr, "here 12\n"); /* We get sections first, so have to start 'behind' to make up */ iServiceIndex = -1; bRetval = pm_process(n2, do_section, do_parameter); +fprintf(stderr, "here 13\n"); /* finish up the last section */ DEBUG(4, ("pm_process() returned %s\n", BOOLSTR(bRetval))); if (bRetval) if (iServiceIndex >= 0) bRetval = service_ok(iServiceIndex); +fprintf(stderr, "here 14\n"); lp_add_auto_services(lp_auto_services()); +fprintf(stderr, "here 15\n"); if (add_ipc) { /* When 'restrict anonymous = 2' guest connections to ipc$ are denied */ +fprintf(stderr, "here 16\n"); lp_add_ipc("IPC$", (lp_restrict_anonymous() < 2)); +fprintf(stderr, "here 17\n"); if ( lp_enable_asu_support() ) lp_add_ipc("ADMIN$", False); } +fprintf(stderr, "here 18\n"); set_server_role(); +fprintf(stderr, "here 19\n"); set_default_server_announce_type(); +fprintf(stderr, "here 1a\n"); set_allowed_client_auth(); +fprintf(stderr, "here 1b\n"); bLoaded = True; @@ -4999,8 +5010,10 @@ BOOL lp_load(const char *pszFname, if (in_client && Globals.bWINSsupport) { lp_do_parameter(GLOBAL_SECTION_SNUM, "wins server", "127.0.0.1"); } +fprintf(stderr, "here 1c\n"); init_iconv(); +fprintf(stderr, "here 1d\n"); return (bRetval); } diff -urp samba-3.0.23d.org/source/utils/testparm.c samba-3.0.23d/source/utils/testparm.c --- samba-3.0.23d.org/source/utils/testparm.c 2006-05-23 20:54:35.000000000 +0200 +++ samba-3.0.23d/source/utils/testparm.c 2006-11-27 01:02:24.000000000 +0100 @@ -222,25 +222,32 @@ via the %%o substitution. With encrypted }; load_case_tables(); - +fprintf(stderr, "here 1\n"); pc = poptGetContext(NULL, argc, argv, long_options, POPT_CONTEXT_KEEP_FIRST); +fprintf(stderr, "here 2\n"); poptSetOtherOptionHelp(pc, "[OPTION...] [host-name] [host-ip]"); +fprintf(stderr, "here 3\n"); while(poptGetNextOpt(pc) != -1); +fprintf(stderr, "here 4\n"); if (show_all_parameters) { show_parameter_list(); exit(0); } +fprintf(stderr, "here 5\n"); setup_logging(poptGetArg(pc), True); +fprintf(stderr, "here 6\n"); if (poptPeekArg(pc)) config_file = poptGetArg(pc); +fprintf(stderr, "here 7\n"); cname = poptGetArg(pc); caddr = poptGetArg(pc); +fprintf(stderr, "here 8\n"); if ( cname && ! caddr ) { printf ( "ERROR: You must specify both a machine name and an IP address.\n" ); @@ -250,6 +257,7 @@ via the %%o substitution. With encrypted if (new_local_machine) { set_local_machine_name(new_local_machine, True); } +fprintf(stderr, "here 9\n"); dbf = x_stderr; DEBUGLEVEL = 2; @@ -261,6 +269,7 @@ via the %%o substitution. With encrypted fprintf(stderr,"Error loading services.\n"); return(1); } +fprintf(stderr, "here a\n"); fprintf(stderr,"Loaded services file OK.\n");