Bug 124513

Summary: smbpasswd: blank lines
Product: [Fedora] Fedora Reporter: Ivan Gyurdiev <ivg231>
Component: system-config-sambaAssignee: Brent Fox <bfox>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2   
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-01 18:05:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix for this problem none

Description Ivan Gyurdiev 2004-05-27 04:10:39 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040518 Firefox/0.8

Description of problem:
This tool has never worked for me, so I got curious as to why. It was
because I had blank lines in smbpasswd, which I think the code should
be able to handle.

Apparently not:

[phantom@cobra phantom]$ system-config-samba
Traceback (most recent call last):
  File "/usr/share/system-config-samba/system-config-samba.py", line
38, in ?
    mainWindow.MainWindow(debug_flag)
  File "/usr/share/system-config-samba/mainWindow.py", line 82, in
__init__
    self.samba_user_data = sambaUserData.SambaUserData(self)
  File "/usr/share/system-config-samba/sambaUserData.py", line 40, in
__init__
    self.readSmbPasswdFile()
  File "/usr/share/system-config-samba/sambaUserData.py", line 53, in
readSmbPasswdFile
    if string.strip(line)[0] != "#":
IndexError: string index out of range

I got rid of blank lines, and it works now.



Version-Release number of selected component (if applicable):
system-config-samba-1.2.9-2

How reproducible:
Always

Steps to Reproduce:
1. Put blank lines in smbpasswd
2.
3.
    

Additional info:

Comment 1 Philip Van Hoof 2004-06-01 17:34:20 UTC
Created attachment 100754 [details]
Fix for this problem

The fix is easy: Ignore lines smaller than length = one (one means only a new
line character)

Comment 2 Ivan Gyurdiev 2004-06-01 18:05:47 UTC
Cool. Too bad now selinux is broken and the graphical auth utility
won't work at all - but that's a different story...