Opened 14 years ago

Closed 14 years ago

#146 closed defect (fixed)

testparm.exe chokes on its own output (was:SSCC trashes smb.conf upon exit)

Reported by: Herwig Bauernfeind Owned by: Silvan Scherrer
Priority: critical Milestone: Samba Server for eCS (OS/2) 1.1.0
Component: Samba Server GUI Tools Version: Server 3.3.x
Keywords: Cc:

Description

With Samba 3.3.x, when changing smb.conf using SSCC.EXE, smb.conf is trashed when quiting SSCC.EXE.

This is a spin-off from Ticket #145 (as this deals with several unrelated issues).

Attachments (1)

smb.conf (2.4 KB ) - added by David McKenna 14 years ago.
working smb.conf for SAMBA 3.3.15

Download all attachments as: .zip

Change History (14)

comment:1 by Herwig Bauernfeind, 14 years ago

Owner: changed from Herwig Bauernfeind to Silvan Scherrer
Summary: SSCC trashes smb.conf upon exittestparm.exe chokes on its own output (was:SSCC trashes smb.conf upon exit)

Ok, found the reason for this bug: The problem is not really in SSCC.EXE (it just cannot cope with the situation), but in testparm.exe, which chokes on its own output from testparm -v

Reproduction scenario:

  1. Run
    testparm -v 1>%ETC%\samba\smb.conf
    

That is basically what sscc.exe does when switching into expert mode. The result is an smb.conf with all valid Samba 3.3 options.

  1. Now run
    testparm 1>emptysmb.conf 2>errormsgfromtestparm
    

You see that we simply get an error message from testparm.exe and no more output. The error msg is

Load smb config files from D:\MPTN\ETC/samba/smb.conf
creating default valid table
creating default valid table
creating default valid table
params.c:pm_process() - Failed.  Error returned from params.c:parse().
Error loading services.

Note: testparm.exe from a recent Samba 3.0.37 considers the very same output from 3.3-testparm.exe as a valid smb.conf. It only complains about several unknown parameters (which is to be expected).

comment:2 by Herwig Bauernfeind, 14 years ago

More research on this bug reveals that testparm.exe chokes on the following parameters:

idmap uid =
idmap gid =
copy =

Removing these from smb.conf makes the problem go away.

A workaround similar to the one added for the winbind separator problem would make SSCC.EXE usable with Samba 3.3.x until this problem is fixed in testparm.exe.

comment:3 by Silvan Scherrer, 14 years ago

Milestone: GUI Tools 1.0.0Samba Server for eCS (OS/2) 1.1.0

comment:4 by Silvan Scherrer, 14 years ago

Resolution: fixed
Status: newclosed

works as designed, those parameters are not allowed to be blank.

comment:5 by David McKenna, 14 years ago

I upgraded to the new SAMBA 3.3.15 -eCS 1.1.0-565 (from 1.0.6 using SSCC 1.01) and ran into this exact problem again. Is there some way to make SSCC check smb.conf to make sure all required lines are present and warn if not (with suggestions for missing lines)? It's not nice using SSCC and then discovering your server doesn't work any more and smb.conf has been blanked....

comment:6 by David McKenna, 14 years ago

Resolution: fixed
Status: closedreopened

comment:7 by Herwig Bauernfeind, 14 years ago

Resolution: feedback pending
Status: reopenedclosed

Samba 1.0.6 WPI came with SSCC.exe 1.0.0 which trashed smb.conf while used together with Samba 3.3.x when switching into expert mode and back.

SSCC.EXE 1.0.1 (available as a standalone package from here has a workaround implemented as described above. 1.0.1 should not trash smb.conf anymore (and it does not, when tested with the above scenario, as I just re-tested).

So could you please confirm that SSCC.EXE 1.0.1 trashed your smb.conf? If so there must be a loophole in the workaround... Sorry for the inconveniance.

comment:8 by David McKenna, 14 years ago

According to 'Help' -> 'About' it is version 1.01, dated 6/13/2011. To reproduce, all I need to do is open SSCC, switch to 'Expert mode', then click the 'Close' button. SMB.conf then only has 3 header lines. I will upload my original SMB.CONF.

by David McKenna, 14 years ago

Attachment: smb.conf added

working smb.conf for SAMBA 3.3.15

comment:9 by Herwig Bauernfeind, 14 years ago

Ok, I can reproduce. There is a loophole. Will fix it ASAP.

comment:10 by Herwig Bauernfeind, 14 years ago

Please try new SSCC from here.

comment:11 by David McKenna, 14 years ago

Wow... thanks for the speedy update! This one works well, and the new smb.conf seems to have all parameters listed after using 'Expert Mode'. Very nice!

comment:12 by Herwig Bauernfeind, 14 years ago

Resolution: feedback pending
Status: closedreopened

comment:13 by Herwig Bauernfeind, 14 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.