Bug 4452 - nmbd -s smb.conf must be specified with a path
nmbd -s smb.conf must be specified with a path
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: nmbd
3.0.9
Other Linux
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
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 2007-04-07 08:14:38 UTC
Patch from Steven Danneman <steven.danneman@isilon.com> committed
in svn r22113.