Bug 4452 - nmbd -s smb.conf must be specified with a path
Summary: nmbd -s smb.conf must be specified with a path
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: nmbd (show other bugs)
Version: 3.0.9
Hardware: Other Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-15 10:43 UTC by Matt Krystof
Modified: 2007-04-07 08:14 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Krystof 2007-03-15 10:43:51 UTC
From command prompt if I run:
# nmbd -s smb.conf
results in nmbd aborting.
However,
# nmbd -s <some path>/smb.conf will not abort.
The problem appears to be in lib/pidfile.c, function pidfile_create() in lines:

short_configfile = strrchr( dyn_CONFIGFILE, '/');
slprintf( name, sizeof( name)-1, "%s-%s", program_name, short_configfile+1);

since there is no forward slash in dyn_CONFIGFILE, short_configfile = 0, which causes the subsequent call to slprintf to fail since address of second %s is 1.
Comment 1 Gerald (Jerry) Carter (dead mail address) 2007-04-07 08:14:38 UTC
Patch from Steven Danneman <steven.danneman@isilon.com> committed
in svn r22113.