Bug 124513 - smbpasswd: blank lines
Summary: smbpasswd: blank lines
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-samba   
(Show other bugs)
Version: 2
Hardware: athlon
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Brent Fox
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-27 04:10 UTC by Ivan Gyurdiev
Modified: 2007-11-30 22:10 UTC (History)
0 users

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: ---


Attachments (Terms of Use)
Fix for this problem (768 bytes, patch)
2004-06-01 17:34 UTC, Philip Van Hoof
no flags Details | Diff

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...




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