aboutsummaryrefslogtreecommitdiffstats
path: root/net/samba3
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2007-02-07 16:40:44 +0800
committersem <sem@FreeBSD.org>2007-02-07 16:40:44 +0800
commitd1d0b0723edb062a7a54aa83e07c10ddb00dabc6 (patch)
tree1f5b2e7a001128df6931ead819d878468da58804 /net/samba3
parenta5ab6108d359e95949822f87ade004d811303c61 (diff)
downloadfreebsd-ports-gnome-d1d0b0723edb062a7a54aa83e07c10ddb00dabc6.tar.gz
freebsd-ports-gnome-d1d0b0723edb062a7a54aa83e07c10ddb00dabc6.tar.zst
freebsd-ports-gnome-d1d0b0723edb062a7a54aa83e07c10ddb00dabc6.zip
- Update to 3.0.24
This release contains fixes for the following security advisories: o CVE-2007-0452 (Potential Denial of Service bug in smbd) o CVE-2007-0453 (Buffer overrun in NSS host lookup Winbind NSS library on Solaris) o CVE-2007-0454 (Format string bug in afsacl.so VFS plugin) - Improve RC-file. PR: ports/108803 Submitted by: maintainer
Diffstat (limited to 'net/samba3')
-rw-r--r--net/samba3/Makefile116
-rw-r--r--net/samba3/distinfo6
-rw-r--r--net/samba3/files/samba.in62
3 files changed, 95 insertions, 89 deletions
diff --git a/net/samba3/Makefile b/net/samba3/Makefile
index e81bc2d0d6a0..e117e91ad7b6 100644
--- a/net/samba3/Makefile
+++ b/net/samba3/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= samba
-PORTVERSION?= 3.0.23d
+PORTVERSION?= 3.0.24
PORTREVISION?= 0
PORTEPOCH?= 1
CATEGORIES?= net
@@ -42,20 +42,20 @@ SAMBA_LIB= lib
SAMBA_LIBDIR= ${PREFIX}/${SAMBA_LIB}
SAMBA_MODULEDIR= ${SAMBA_LIBDIR}/samba
-CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_TARGET= --build="${MACHINE_ARCH}-portbld-freebsd${OSREL}"
-CONFIGURE_ARGS+= --exec-prefix=${PREFIX} \
- --localstatedir=${VARDIR} \
- --with-configdir=${SAMBA_CONFDIR} \
- --with-pammodulesdir=${SAMBA_LIBDIR} \
- --with-libdir=${SAMBA_MODULEDIR} \
- --with-swatdir=${SAMBA_SWATDIR} \
- --with-piddir=${SAMBA_RUNDIR} \
- --with-lockdir=${SAMBA_LOCKDIR} \
- --with-privatedir=${SAMBA_PRIVATEDIR} \
- --with-logfilebase=${SAMBA_LOGDIR}
+CONFIGURE_ARGS+= --exec-prefix="${PREFIX}" \
+ --localstatedir="${VARDIR}" \
+ --with-configdir="${SAMBA_CONFDIR}" \
+ --with-pammodulesdir="${SAMBA_LIBDIR}" \
+ --with-libdir="${SAMBA_MODULEDIR}" \
+ --with-swatdir="${SAMBA_SWATDIR}" \
+ --with-piddir="${SAMBA_RUNDIR}" \
+ --with-lockdir="${SAMBA_LOCKDIR}" \
+ --with-privatedir="${SAMBA_PRIVATEDIR}" \
+ --with-logfilebase="${SAMBA_LOGDIR}"
-CONFIGURE_ARGS+= --with-libiconv=${LOCALBASE}
+CONFIGURE_ARGS+= --with-libiconv="${LOCALBASE}"
.if !defined(SAMBA_SUBPORT)
# Samba server itself
@@ -115,8 +115,8 @@ SUB_LIST+= CUPSD="@comment "
.if defined(WITH_MAX_DEBUG)
LIB_DEPENDS+= dmalloc.1:${PORTSDIR}/devel/dmalloc
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
+CPPFLAGS+= "-I${LOCALBASE}/include"
+LDFLAGS+= "-L${LOCALBASE}/lib"
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS+= --enable-debug --enable-developer --enable-krb5developer --enable-dmalloc --with-profiling-data
.else
@@ -178,7 +178,7 @@ WANT_EXP_MODULES+= rpc_echo
. endif
. endif
WANT_EXP_MODULES!= ${ECHO_CMD} ${WANT_EXP_MODULES} | ${SED} -E 's/ +/,/g'
-CONFIGURE_ARGS+= --with-shared-modules=${WANT_EXP_MODULES}
+CONFIGURE_ARGS+= --with-shared-modules="${WANT_EXP_MODULES}"
.endif
.if defined(WITH_PAM_SMBPASS)
@@ -252,14 +252,14 @@ CONFIGURE_ARGS+= --without-ads
# Kerberos5 is necessary for ADS
.if defined(SAMBA_WANT_KRB5)
.if defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libgssapi_krb5.so)
-CONFIGURE_ARGS+= --with-krb5=${KRB5_HOME}
+CONFIGURE_ARGS+= --with-krb5="${KRB5_HOME}"
.elif defined(HEIMDAL_HOME) && exists(${HEIMDAL_HOME}/lib/libgssapi.so)
-CONFIGURE_ARGS+= --with-krb5=${HEIMDAL_HOME}
+CONFIGURE_ARGS+= --with-krb5="${HEIMDAL_HOME}"
.elif exists(${DESTDIR}/usr/lib/libkrb5.so) && exists(${DESTDIR}/usr/bin/krb5-config)
-CONFIGURE_ARGS+= --with-krb5=${DESTDIR}/usr
+CONFIGURE_ARGS+= --with-krb5="${DESTDIR}/usr"
.else
LIB_DEPENDS+= krb5:${PORTSDIR}/security/heimdal
-CONFIGURE_ARGS+= --with-krb5=${LOCALBASE}
+CONFIGURE_ARGS+= --with-krb5="${LOCALBASE}"
.endif
.else
CONFIGURE_ARGS+= --without-krb5
@@ -290,30 +290,30 @@ MAN7+= pam_winbind.7
MAN8+= winbindd.8
.endif
-PLIST_SUB+= SAMBA_LOGDIR=${SAMBA_LOGDIR} \
- SAMBA_LOCKDIR=${SAMBA_LOCKDIR} \
- SAMBA_CONFDIR=${SAMBA_CONFDIR} \
- SAMBA_CONFIG=${SAMBA_CONFIG} \
- SAMBA_RUNDIR=${SAMBA_RUNDIR} \
- SAMBA_SWATDIR=${SAMBA_SWATDIR} \
- SAMBA_SPOOL=${SAMBA_SPOOL} \
- SAMBA_PRIVATEDIR=${SAMBA_PRIVATEDIR}
-
-SUB_LIST+= SAMBA_LOGDIR=${SAMBA_LOGDIR} \
- SAMBA_LOCKDIR=${SAMBA_LOCKDIR} \
- SAMBA_CONFDIR=${SAMBA_CONFDIR} \
- SAMBA_CONFIG=${SAMBA_CONFIG} \
- SAMBA_RUNDIR=${SAMBA_RUNDIR} \
- SAMBA_SWATDIR=${SAMBA_SWATDIR} \
- SAMBA_SPOOL=${SAMBA_SPOOL} \
- SAMBA_PRIVATEDIR=${SAMBA_PRIVATEDIR} \
- SAMBA_PRIVATE=${SAMBA_PRIVATE}
+PLIST_SUB+= SAMBA_LOGDIR="${SAMBA_LOGDIR}" \
+ SAMBA_LOCKDIR="${SAMBA_LOCKDIR}" \
+ SAMBA_CONFDIR="${SAMBA_CONFDIR}" \
+ SAMBA_CONFIG="${SAMBA_CONFIG}" \
+ SAMBA_RUNDIR="${SAMBA_RUNDIR}" \
+ SAMBA_SWATDIR="${SAMBA_SWATDIR}" \
+ SAMBA_SPOOL="${SAMBA_SPOOL}" \
+ SAMBA_PRIVATEDIR="${SAMBA_PRIVATEDIR}"
+
+SUB_LIST+= SAMBA_LOGDIR="${SAMBA_LOGDIR}" \
+ SAMBA_LOCKDIR="${SAMBA_LOCKDIR}" \
+ SAMBA_CONFDIR="${SAMBA_CONFDIR}" \
+ SAMBA_CONFIG="${SAMBA_CONFIG}" \
+ SAMBA_RUNDIR="${SAMBA_RUNDIR}" \
+ SAMBA_SWATDIR="${SAMBA_SWATDIR}" \
+ SAMBA_SPOOL="${SAMBA_SPOOL}" \
+ SAMBA_PRIVATEDIR="${SAMBA_PRIVATEDIR}" \
+ SAMBA_PRIVATE="${SAMBA_PRIVATE}"
pre-everything::
@${ECHO_CMD} "===> NOTICE: This version of port has changed location of Samba password"
@${ECHO_CMD} "===> NOTICE: (smbpasswd) directory. Files in '${SAMBA_PRIVATE}'"
@${ECHO_CMD} "===> NOTICE: have moved to '${SAMBA_PRIVATEDIR}'."
- @if [ -d ${SAMBA_PRIVATE} -a -n "`${LS} ${SAMBA_PRIVATE}/*.tdb 2>/dev/null`" ]; then \
+ @if [ -d "${SAMBA_PRIVATE}" -a -n "`${LS} ${SAMBA_PRIVATE}/*.tdb 2>/dev/null`" ]; then \
${ECHO_CMD} ""; \
${ECHO_CMD} "===> The directory '${SAMBA_PRIVATE}' is not empty. You possibly need"; \
${ECHO_CMD} "===> to move its files to '${SAMBA_PRIVATEDIR}' and remove directory."; \
@@ -336,7 +336,7 @@ post-patch:
@${FIND} ${WRKDIR}/${DISTNAME} -type f | ${XARGS} ${CHMOD} u+w,a+r
pre-install:
- -@${FIND} ${SAMBA_MODULEDIR} -type f 2>/dev/null | ${SORT} | ${SED} -E 's|^${PREFIX}/?||;' >> ${WRKDIR}/.PLIST.exclude
+ -@${FIND} "${SAMBA_MODULEDIR}" -type f 2>/dev/null | ${SORT} | ${SED} -E 's|^${PREFIX}/?||;' >> ${WRKDIR}/.PLIST.exclude
@${CAT} ${PKGDIR}/pkg-plist > ${PLIST}
@${CAT} ${PKGDIR}/pkg-plist.swat >> ${PLIST}
@@ -344,54 +344,54 @@ post-install:
.for sect in 1 5 7 8
@${MKDIR} ${MAN${sect}PREFIX}/man/man${sect}
. for man in ${MAN${sect}}
- @${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/docs/manpages/${man} ${MAN${sect}PREFIX}/man/man${sect}
+ @${INSTALL_MAN} "${WRKDIR}/${DISTNAME}/docs/manpages/${man}" "${MAN${sect}PREFIX}/man/man${sect}"
. endfor
.endfor
# Put examples in place
@${MKDIR} ${EXAMPLESDIR}
- @${CP} -Rp ${WRKDIR}/${DISTNAME}/examples/* ${EXAMPLESDIR}
+ @${CP} -Rp ${WRKDIR}/${DISTNAME}/examples/* "${EXAMPLESDIR}"
.if defined(WITH_PAM_SMBPASS)
@${MKDIR} ${EXAMPLESDIR}/pam_smbpass
- @${CP} -Rp ${WRKSRC}/pam_smbpass/samples/* ${EXAMPLESDIR}/pam_smbpass
+ @${CP} -Rp ${WRKSRC}/pam_smbpass/samples/* "${EXAMPLESDIR}/pam_smbpass"
.endif
- ${CP} -p ${WRKDIR}/${SAMBA_CONFIG}.sample ${EXAMPLESDIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh ${PREFIX}/bin/make_smbpasswd
+ ${CP} -p "${WRKDIR}/${SAMBA_CONFIG}.sample" "${EXAMPLESDIR}"
+ ${INSTALL_SCRIPT} "${WRKSRC}/script/mksmbpasswd.sh" "${PREFIX}/bin/make_smbpasswd"
# Winbind
.if !defined(WITHOUT_WINBIND)
. if defined(WITH_WINBIND_NSS)
- ${INSTALL_PROGRAM} ${WRKSRC}/nsswitch/nss_winbind.so ${SAMBA_LIBDIR}/nss_winbind.so.1
- ${INSTALL_PROGRAM} ${WRKSRC}/nsswitch/nss_wins.so ${SAMBA_LIBDIR}/nss_wins.so.1
+ ${INSTALL_PROGRAM} "${WRKSRC}/nsswitch/nss_winbind.so" "${SAMBA_LIBDIR}/nss_winbind.so.1"
+ ${INSTALL_PROGRAM} "${WRKSRC}/nsswitch/nss_wins.so" "${SAMBA_LIBDIR}/nss_wins.so.1"
@${ECHO_CMD} "${SAMBA_LIB}/nss_winbind.so.1" >> ${TMPPLIST};
@${ECHO_CMD} "${SAMBA_LIB}/nss_wins.so.1" >> ${TMPPLIST};
. endif
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/pam_winbind.so ${SAMBA_LIBDIR}
+ ${INSTALL_PROGRAM} "${WRKSRC}/bin/pam_winbind.so" "${SAMBA_LIBDIR}"
@${ECHO_CMD} "${SAMBA_LIB}/pam_winbind.so" >> ${TMPPLIST};
.endif
.if defined(WITH_PAM_SMBPASS)
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/pam_smbpass.so ${SAMBA_LIBDIR}
+ ${INSTALL_PROGRAM} "${WRKSRC}/bin/pam_smbpass.so" "${SAMBA_LIBDIR}"
@${ECHO_CMD} "${SAMBA_LIB}/pam_smbpass.so" >> ${TMPPLIST};
.endif
# smbwrapper.so
.if defined(WITH_SMBSH)
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/smbsh ${PREFIX}/bin
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/smbwrapper.so ${SAMBA_MODULEDIR}
+ ${INSTALL_PROGRAM} "${WRKSRC}/bin/smbsh" "${PREFIX}/bin"
+ ${INSTALL_PROGRAM} "${WRKSRC}/bin/smbwrapper.so" "${SAMBA_MODULEDIR}"
.endif
# Lib
- @${FIND} ${SAMBA_MODULEDIR} -type f | ${SED} -E 's|^${PREFIX}/?||;' | ${EGREP} -F -v -f ${WRKDIR}/.PLIST.exclude | ${SORT} >> ${TMPPLIST}
- @for d in `${FIND} ${SAMBA_MODULEDIR} -type d | ${SORT} -r`; do \
- ${ECHO_CMD} "@unexec ${RMDIR} $$d 2>/dev/null || true" >> ${TMPPLIST}; \
+ @${FIND} "${SAMBA_MODULEDIR}" -type f | ${SED} -E 's|^${PREFIX}/?||;' | ${EGREP} -F -v -f ${WRKDIR}/.PLIST.exclude | ${SORT} >> ${TMPPLIST}
+ @for d in `${FIND} "${SAMBA_MODULEDIR}" -type d | ${SORT} -r`; do \
+ ${ECHO_CMD} "@unexec ${RMDIR} \"$$d\" 2>/dev/null || true" >> ${TMPPLIST}; \
done
# Documentation
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
- @${CP} -Rp ${WRKDIR}/${DISTNAME}/docs/registry ${DOCSDIR}
+ @${CP} -Rp "${WRKDIR}/${DISTNAME}/docs/registry" "${DOCSDIR}"
. for f in Samba3-ByExample.pdf Samba3-HOWTO.pdf Samba3-Developers-Guide.pdf
- @${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/docs/${f} ${DOCSDIR}
+ @${INSTALL_DATA} "${WRKDIR}/${DISTNAME}/docs/${f}" "${DOCSDIR}"
. endfor
- @${INSTALL_DATA} ${FILESDIR}/README.FreeBSD ${DOCSDIR}
+ @${INSTALL_DATA} "${FILESDIR}/README.FreeBSD" "${DOCSDIR}"
. for f in README COPYING Manifest Read-Manifest-Now Roadmap \
WHATSNEW.txt docs/THANKS docs/history
- @${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/${f} ${DOCSDIR}
+ @${INSTALL_DATA} "${WRKDIR}/${DISTNAME}/${f}" "${DOCSDIR}"
. endfor
# !NOPORTDOCS
.endif
diff --git a/net/samba3/distinfo b/net/samba3/distinfo
index c39e0e36ed85..764bd0e3cf74 100644
--- a/net/samba3/distinfo
+++ b/net/samba3/distinfo
@@ -1,3 +1,3 @@
-MD5 (samba-3.0.23d.tar.gz) = afe6923d05fed5b5ccab593c7a407cd1
-SHA256 (samba-3.0.23d.tar.gz) = 0af21d6cfeb8186987cc5b59e41034f663124859ce30b5b98f3abed501f2cd46
-SIZE (samba-3.0.23d.tar.gz) = 17704221
+MD5 (samba-3.0.24.tar.gz) = 89273f67a6d8067cbbecefaa13747153
+SHA256 (samba-3.0.24.tar.gz) = c4e8de3426fbbcee7f338f5cf09052cbdf9a36ae638aeeeca10498ef8d5343e2
+SIZE (samba-3.0.24.tar.gz) = 17708128
diff --git a/net/samba3/files/samba.in b/net/samba3/files/samba.in
index 4c89021dfa64..37725be15457 100644
--- a/net/samba3/files/samba.in
+++ b/net/samba3/files/samba.in
@@ -41,42 +41,47 @@ reload_precmd="samba_checkconfig"
reload_cmd="samba_reload_cmd"
rcvar_cmd="samba_rcvar_cmd"
# Defaults
-samba_enable=${samba_enable:="NO"}
-samba_config=${samba_config="%%SAMBA_CONFDIR%%/%%SAMBA_CONFIG%%"}
+samba_enable="${samba_enable:=NO}"
+samba_config_default="%%SAMBA_CONFDIR%%/%%SAMBA_CONFIG%%"
+samba_config="${samba_config=${samba_config_default}}"
+command_args="${samba_config:+-s "${samba_config}"}" #"
samba_daemons="nmbd smbd"
%%WINBIND%%samba_daemons="${samba_daemons} winbindd"
testparm_command="%%PREFIX%%/bin/testparm"
smbcontrol_command="%%PREFIX%%/bin/smbcontrol"
# Fetch parameters from configuration file
samba_parm="${testparm_command} -s -v --parameter-name"
-%%WINBIND%%samba_idmap=$(${samba_parm} 'idmap uid' ${samba_config} 2>/dev/null)
-samba_lockdir=$(${samba_parm} 'lock directory' ${samba_config} 2>/dev/null)
+%%WINBIND%%samba_idmap=$(${samba_parm} 'idmap uid' ${samba_config:+"${samba_config}"} 2>/dev/null)
+samba_lockdir=$(${samba_parm} 'lock directory' ${samba_config:+"${samba_config}"} 2>/dev/null)
# Setup dependent variables
-if [ -n "${rcvar}" ] && checkyesno ${rcvar}; then
- nmbd_enable=${nmbd_enable="YES"}
- smbd_enable=${smbd_enable="YES"}
+if [ -n "${rcvar}" ] && checkyesno "${rcvar}"; then
+ nmbd_enable="${nmbd_enable=YES}"
+ smbd_enable="${smbd_enable=YES}"
%%WINBIND%% # Check that winbindd is actually configured
%%WINBIND%% if [ -n "${samba_idmap}" ]; then
-%%WINBIND%% winbindd_enable=${winbindd_enable="YES"}
+%%WINBIND%% winbindd_enable="${winbindd_enable=YES}"
%%WINBIND%% fi
fi
+# Hack to work around name change of pid file with non-default config
+pid_extra=
+if [ -n "${samba_config}" -a "${samba_config}" != "${samba_config_default}" ]; then
+ pid_extra="-$(basename "${samba_config}")"
+fi
# Hack to enable check of dependent variables
-eval real_${rcvar}=\${${rcvar}:="NO"} ${rcvar}="YES"
+eval real_${rcvar}="\${${rcvar}:=NO}" ${rcvar}="YES"
# Defaults for dependent variables
-nmbd_enable=${nmbd_enable:="NO"}
-nmbd_flags=${nmbd_flags="-D"}
-smbd_enable=${smbd_enable:="NO"}
-smbd_flags=${smbd_flags="-D"}
-%%WINBIND%%winbindd_enable=${winbindd_enable:="NO"}
-%%WINBIND%%winbindd_flags=${winbindd_flags=""}
+nmbd_enable="${nmbd_enable:=NO}"
+nmbd_flags="${nmbd_flags=\"-D\"}"
+smbd_enable="${smbd_enable:=NO}"
+smbd_flags="${smbd_flags=\"-D\"}"
+%%WINBIND%%winbindd_enable="${winbindd_enable:=NO}"
+%%WINBIND%%winbindd_flags="${winbindd_flags=''}"
# Requirements
required_files="${samba_config}"
required_dirs="${samba_lockdir}"
-command_args="${samba_config:+"-s ${samba_config}"}"
-#"
samba_checkconfig() {
echo -n "Performing sanity check on Samba configuration: "
- if ${testparm_command} -s ${samba_config} >/dev/null 2>&1; then
+ if "${testparm_command}" -s ${samba_config:+"${samba_config}"} >/dev/null 2>&1; then
echo "OK"
else
echo "FAILED"
@@ -86,7 +91,7 @@ samba_checkconfig() {
samba_start_precmd() {
# XXX: Never delete winbindd_idmap, winbindd_cache and group_mapping
- if [ -d "${samba_lockdir}" ]; then
+ if [ -n "${samba_lockdir}" -a -d "${samba_lockdir}" ]; then
echo -n "Removing stale Samba tdb files: "
for file in brlock.tdb browse.dat connections.tdb gencache.tdb \
locking.tdb messages.tdb namelist.debug sessionid.tdb \
@@ -100,7 +105,7 @@ samba_start_precmd() {
samba_rcvar_cmd() {
# Prevent recursive calling
- unset ${rc_arg}_cmd ${rc_arg}_precmd ${rc_arg}_postcmd
+ unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
# Check master variable
echo "# ${name}"
if [ -n "${rcvar}" ]; then
@@ -116,29 +121,30 @@ samba_rcvar_cmd() {
}
samba_reload_cmd() {
- local name rcvar
+ local name rcvar command pidfile
# Prevent recursive calling
- unset ${rc_arg}_cmd ${rc_arg}_precmd ${rc_arg}_postcmd
+ unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
# Apply to all the daemons
for name in ${samba_daemons}; do
rcvar=$(set_rcvar)
command="%%PREFIX%%/sbin/${name}"
- pidfile="%%SAMBA_RUNDIR%%/${name}.pid"
+ pidfile="%%SAMBA_RUNDIR%%/${name}${pid_extra}.pid"
# Daemon should be enabled and running
- if [ -n "${rcvar}" ] && checkyesno ${rcvar}; then
+ if [ -n "${rcvar}" ] && checkyesno "${rcvar}"; then
if [ -n "$(check_pidfile "${pidfile}" "${command}")" ]; then
debug "reloading ${name} configuration"
echo "Reloading ${name}."
- ${smbcontrol_command} "${name}" 'reload-config' ${command_args}
+ # XXX: Hack with pid_extra
+ "${smbcontrol_command}" "${name}${pid_extra}" 'reload-config' ${command_args}
fi
fi
done
}
samba_cmd() {
- local name rcvar
+ local name rcvar command pidfile samba_daemons
# Prevent recursive calling
- unset ${rc_arg}_cmd ${rc_arg}_precmd ${rc_arg}_postcmd
+ unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
# Stop processes in the reverse to order
if [ "${rc_arg}" = "stop" ] ; then
samba_daemons=$(reverse_list ${samba_daemons})
@@ -147,7 +153,7 @@ samba_cmd() {
for name in ${samba_daemons}; do
rcvar=$(set_rcvar)
command="%%PREFIX%%/sbin/${name}"
- pidfile="%%SAMBA_RUNDIR%%/${name}.pid"
+ pidfile="%%SAMBA_RUNDIR%%/${name}${pid_extra}.pid"
run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args}
done