From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4 Description of problem: system-config-samba crashes when invoked from the command line Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.Type system-config-samba 2. 3. Actual Results: Crashes, the stack dump is provided below Expected Results: Additional info: Traceback (most recent call last): File "/usr/share/system-config-samba/system-config-samba.py", line 41, in <module> mainWindow.MainWindow(debug_flag) File "/usr/share/system-config-samba/mainWindow.py", line 79, in __init__ self.samba_data = sambaParser.SambaParser(self) File "/usr/share/system-config-samba/sambaParser.py", line 177, in __init__ Traceback (most recent call last): File "/usr/share/system-config-samba/system-config-samba.py", line 41, in <module> mainWindow.MainWindow(debug_flag) File "/usr/share/system-config-samba/mainWindow.py", line 79, in __init__ self.samba_data = sambaParser.SambaParser(self) File "/usr/share/system-config-samba/sambaParser.py", line 177, in __init__ self.parseFile() File "/usr/share/system-config-samba/sambaParser.py", line 215, in parseFile token = self.createToken(line, section) File "/usr/share/system-config-samba/sambaParser.py", line 264, in createToken token = sambaToken.SambaToken(sambaToken.SambaToken.SAMBA_TOKEN_KEYVAL, (name, value)) File "/usr/share/system-config-samba/sambaToken.py", line 60, in __init__ raise AttributeError, value AttributeError: ('revalidate', 'yes') self.parseFile() File "/usr/share/system-config-samba/sambaParser.py", line 215, in parseFile token = self.createToken(line, section) File "/usr/share/system-config-samba/sambaParser.py", line 264, in createToken token = sambaToken.SambaToken(sambaToken.SambaToken.SAMBA_TOKEN_KEYVAL, (name, value)) File "/usr/share/system-config-samba/sambaToken.py", line 60, in __init__ raise AttributeError, value AttributeError: ('revalidate', 'yes')
Running FC7 i386 samba-client-3.0.25b-2.fc7 samba-3.0.25b-2.fc7 samba-common-3.0.25b-2.fc7 system-config-samba-1.2.47-1.fc7 Same kind here, when validating before exiting : [root@localhost data]# system-config-samba Traceback (most recent call last): File "/usr/share/system-config-samba/shareWindow.py", line 436, in onOkButtonClicked token = self.samba_data.createToken("", last_section) File "/usr/share/system-config-samba/sambaParser.py", line 228, in createToken if line[-1] == '\n': IndexError: string index out of range And also, I wanted to eras a shared folder. It did not erased anything but diplayed : [root@localhost data]# system-config-samba Traceback (most recent call last): File "/usr/share/system-config-samba/shareWindow.py", line 436, in onOkButtonClicked token = self.samba_data.createToken("", last_section) File "/usr/share/system-config-samba/sambaParser.py", line 228, in createToken if line[-1] == '\n': IndexError: string index out of range Traceback (most recent call last): File "/usr/share/system-config-samba/shareWindow.py", line 436, in onOkButtonClicked token = self.samba_data.createToken("", last_section) File "/usr/share/system-config-samba/sambaParser.py", line 228, in createToken if line[-1] == '\n': IndexError: string index out of range Traceback (most recent call last): File "/usr/share/system-config-samba/mainWindow.py", line 341, in onDeleteButtonClicked section.delete () AttributeError: 'NoneType' object has no attribute 'delete' Traceback (most recent call last): File "/usr/share/system-config-samba/mainWindow.py", line 341, in onDeleteButtonClicked section.delete () AttributeError: 'NoneType' object has no attribute 'delete' Traceback (most recent call last): File "/usr/share/system-config-samba/mainWindow.py", line 341, in onDeleteButtonClicked section.delete () AttributeError: 'NoneType' object has no attribute 'delete'
(In reply to comment #1) > Running FC7 i386 > samba-client-3.0.25b-2.fc7 > samba-3.0.25b-2.fc7 > samba-common-3.0.25b-2.fc7 > system-config-samba-1.2.47-1.fc7 > > > Same kind here, when validating before exiting : > > [root@localhost data]# system-config-samba > Traceback (most recent call last): > File "/usr/share/system-config-samba/shareWindow.py", line 436, in > onOkButtonClicked > token = self.samba_data.createToken("", last_section) > File "/usr/share/system-config-samba/sambaParser.py", line 228, in createToken > if line[-1] == '\n': > IndexError: string index out of range > > > And also, I wanted to eras a shared folder. It did not erased anything but > diplayed : > > [root@localhost data]# system-config-samba > Traceback (most recent call last): > File "/usr/share/system-config-samba/shareWindow.py", line 436, in > onOkButtonClicked > token = self.samba_data.createToken("", last_section) > File "/usr/share/system-config-samba/sambaParser.py", line 228, in createToken > if line[-1] == '\n': > IndexError: string index out of range This is the same as bug #253464. > Traceback (most recent call last): > File "/usr/share/system-config-samba/shareWindow.py", line 436, in > onOkButtonClicked > token = self.samba_data.createToken("", last_section) > File "/usr/share/system-config-samba/sambaParser.py", line 228, in createToken > if line[-1] == '\n': > IndexError: string index out of range > Traceback (most recent call last): > File "/usr/share/system-config-samba/mainWindow.py", line 341, in > onDeleteButtonClicked > section.delete () > AttributeError: 'NoneType' object has no attribute 'delete' > Traceback (most recent call last): > File "/usr/share/system-config-samba/mainWindow.py", line 341, in > onDeleteButtonClicked > section.delete () > AttributeError: 'NoneType' object has no attribute 'delete' > Traceback (most recent call last): > File "/usr/share/system-config-samba/mainWindow.py", line 341, in > onDeleteButtonClicked > section.delete () > AttributeError: 'NoneType' object has no attribute 'delete' > Please open a new bug for this one. Describe what exactly you did before getting the error, possibly attach your smb.conf file so I can reproduce it here.
(In reply to comment #0) > File "/usr/share/system-config-samba/sambaToken.py", line 60, in __init__ > raise AttributeError, value > AttributeError: ('revalidate', 'yes') This means that system-config-samba doesn't know the keyword "revalidate". Simo, neither "/usr/bin/testparm -s -v /dev/null 2>/dev/null" nor "man smb.conf" tell me anything about it. What does this parameter do and why doesn't testparm know anything about it (or the man page)?
It's not reported because such a parameter does not exist in the 3.0 codebase. You should make system-config-samba not crash on unknown options though. Samba has stuff called parametrical options which can added dynamically by vfs or idmap plugins like for example the "recycle" vfs plugin set of prameters. See for example the options in man vfs_recycle or man idmap_ad Parametrical options are not reported nor checked by testparm.
Well that's bad, we can't have it both ways -- either I can allow unknown keywords and not detect bad configuration or I won't allow them and stumble over parameters defined by a plugin. Support for "parametrical" options shouldn't be too difficult to add though, as long as they can easily be described with regexes (e.g. "^idmap .*" for the idmap stuff). But I need to know at least some things about valid options. What do you think?
Either you follow closely samba development and keep up a list, or you just throw warning s about unknown options and ignore completely options which have ':' in the name. Parametrical options are not predictable as a user made plugin can introduce new ones at any time (think the samba-vscan plugin we do no distribute but some compile afterwards. That's why testparm ignores them and just warn on unknown "conventional" options. Simo.
I'm building system-config-samba-1.2.48 right now for Rawhide which should be able to gracefully handle unknown configuration directives. I'll wait with building a package for F7 to get the new strings translated.
system-config-samba-1.2.50-1.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report.
system-config-samba-1.2.51-1.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report.
system-config-samba-1.2.52-1.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.