Bug 247541 - system-config-samba crashes when invoked from the command line
system-config-samba crashes when invoked from the command line
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: system-config-samba (Show other bugs)
7
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Nils Philippsen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-09 16:12 EDT by Joshua Rosen
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version: 1.2.52-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-17 23:24:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joshua Rosen 2007-07-09 16:12:28 EDT
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')
Comment 1 Thomas Canniot 2007-08-18 12:49:28 EDT
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'
Comment 2 Nils Philippsen 2007-08-27 04:31:55 EDT
(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.
Comment 3 Nils Philippsen 2007-08-27 04:35:56 EDT
(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)?
Comment 4 Simo Sorce 2007-08-27 09:18:37 EDT
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.
Comment 5 Nils Philippsen 2007-08-27 09:49:31 EDT
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?
Comment 6 Simo Sorce 2007-08-27 11:08:26 EDT
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.
Comment 7 Nils Philippsen 2007-08-28 04:57:34 EDT
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.
Comment 8 Fedora Update System 2007-09-07 13:16:44 EDT
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.
Comment 9 Fedora Update System 2007-09-10 12:52:18 EDT
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.
Comment 10 Fedora Update System 2007-09-17 23:24:09 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.