Bug 6531 - Strange pid file names when starting with -s option
Summary: Strange pid file names when starting with -s option
Alias: None
Product: Samba 3.4
Classification: Unclassified
Component: Config Files (show other bugs)
Version: 3.4.0rc1
Hardware: Other Linux
: P3 regression
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2009-07-03 03:31 UTC by Karolin Seeger
Modified: 2012-05-23 20:04 UTC (History)
0 users

See Also:

patch with a fix for 3.4 (1.61 KB, patch)
2009-07-03 05:46 UTC, Michael Adam
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karolin Seeger 2009-07-03 03:31:01 UTC
The following was posted to samba-technical by Günter Kukkukk <linux@kukkukk.com>:

during samba3.3.x and samba3.4.x testings i noticed the following
different behaviour between 3.3.x and 3.4.x:

opensuse rc scripts (10.3 ... 11.0) like "rcsmb" or "/etc/init.d/smb" use
the start option like
    "startproc -p ${PID_FILE} ${SMBD_BIN} -D -s ${SMB_CONF}"

The problematic part seems to be the '-s'option

When using 3.3.x inside a root console:
     a) /usr/sbin/smbd -i
     b) /usr/sbin/smbd -i -s /etc/samba/smb.conf

I _always_ get the following pid file:
    a) or b) /var/run/samba/smbd.pid

This behaviour has changed (dramatically) when using 3.4.x:
    a) /usr/sbin/smbd -i
    b) /usr/sbin/smbd -i -s /etc/samba/smb.conf

Now i get _two_ different pid files:
    a) /var/run/samba/smbd.pid
    b) /var/run/samba/smbd-smb.conf.pid

AFAIK - opensuse always uses the '-s' start option - and always
expects that the pid file is named "smbd.pid".

"smbd-smb.conf.pid" now breaks all suse rc scripts - don't know
how other distros are involved.
Comment 1 Michael Adam 2009-07-03 05:46:25 UTC
Created attachment 4397 [details]
patch with a fix for 3.4

I have pushed the corresponding fix to master.

As stated in the commit message, I would actually have liked to change the
behaviour of the is_default_dyn_XYZ() macros a bit, but given possible unwanted side effects, I have only done the minimal change necessary to re-establish
old behaviour regarding specifying the default config file via "-s ..." on the
command line.

Comment 2 Karolin Seeger 2009-07-03 06:20:21 UTC
Patch fixes the problem for me.
Picked for 3.4.0.

Closing out bug report.