Bug 124513 - smbpasswd: blank lines
smbpasswd: blank lines
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: system-config-samba (Show other bugs)
2
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Brent Fox
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-27 00:10 EDT by Ivan Gyurdiev
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-01 14:05:47 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)
Fix for this problem (768 bytes, patch)
2004-06-01 13:34 EDT, Philip Van Hoof
no flags Details | Diff

  None (edit)
Description Ivan Gyurdiev 2004-05-27 00:10:39 EDT
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 13:34:20 EDT
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 14:05:47 EDT
Cool. Too bad now selinux is broken and the graphical auth utility
won't work at all - but that's a different story...


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