ports/155788: ports security/cfsd startup -- multiple problems
System Administrator
root at naboo.vindaloo.com
Tue Mar 22 17:00:02 UTC 2011
>Number: 155788
>Category: ports
>Synopsis: ports security/cfsd startup -- multiple problems
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Mar 22 17:00:01 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: System Administrator
>Release: FreeBSD 8.2-PRERELEASE-201101 i386
>Organization:
>Environment:
System: FreeBSD naboo.vindaloo.com 8.2-PRERELEASE-201101 FreeBSD 8.2-PRERELEASE-201101 #0: Tue Jan 4 17:34:49 UTC 2011 root at almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
machine: VMware emulated machine
os: FreeBSD 8.2-PRERELEASE-201101
target: i386
>Description:
The cfsd port's startup file: /usr/local/etc/rc.d/cfsd has two
problems:
-- [Serious] The mount command defaults to tcp mounts and tests
ipv6 even though the cfs daemon only listens on ipv4 and udp.
-- [Somewhat serious] It's missing the '# KEYWORD: shutdown'
which causes it to generate a spurious error at startup time.
-- [Minor] The startup script should allow the user to control
the location of the cfsd-bootstrap directory.
>How-To-Repeat:
Install the port, follow the "pkg_info -D -x cfsd" instructions and
try to start the daemon.
>Fix:
The following patch set addresses all three issues.
diff -c /usr/ports/security/cfs/files/cfsd.sh.in.orig /usr/ports/security/cfs/files/cfsd.sh.in
*** /usr/ports/security/cfs/files/cfsd.sh.in.orig Fri Mar 26 20:14:40 2010
--- /usr/ports/security/cfs/files/cfsd.sh.in Tue Mar 22 12:47:59 2011
***************
*** 5,10 ****
--- 5,11 ----
# PROVIDE: cfsd
# REQUIRE: mountd
+ # KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable cfsd:
***************
*** 15,20 ****
--- 16,22 ----
#
# cfsd_port="3049" # the port to listen to
# cfsd_mountpoint="/crypt" # the CFS mountpoint
+ # cfsd_bootstrap="%%CFSD_BOOTSTRAP%%"
#
. /etc/rc.subr
***************
*** 29,35 ****
cfsd_poststart()
{
if [ -n "$cfsd_mountpoint" ]; then
! mount -o port="$cfsd_port",nfsv2 localhost:%%CFSD_BOOTSTRAP%% "$cfsd_mountpoint"
fi
}
--- 31,37 ----
cfsd_poststart()
{
if [ -n "$cfsd_mountpoint" ]; then
! mount -o port="$cfsd_port",nfsv2,udp "127.0.0.1:$cfsd_bootstrap" "$cfsd_mountpoint"
fi
}
***************
*** 44,51 ****
: ${cfsd_enable="NO"}
: ${cfsd_port="3049"}
: ${cfsd_mountpoint="/crypt"}
command_args="$cfsd_port >/dev/null 2>&1"
! required_dirs="%%CFSD_BOOTSTRAP%% $cfsd_mountpoint"
run_rc_command "$1"
--- 46,54 ----
: ${cfsd_enable="NO"}
: ${cfsd_port="3049"}
: ${cfsd_mountpoint="/crypt"}
+ : ${cfsd_bootstrap="%%CFSD_BOOTSTRAP%%"}
command_args="$cfsd_port >/dev/null 2>&1"
! required_dirs="$cfsd_bootstrap $cfsd_mountpoint"
run_rc_command "$1"
Diff finished. Tue Mar 22 12:52:12 2011
diff -c /usr/ports/security/cfs/files/pkg-message.in.orig /usr/ports/security/cfs/files/pkg-message.in
*** /usr/ports/security/cfs/files/pkg-message.in.orig Wed Jun 8 07:11:08 2005
--- /usr/ports/security/cfs/files/pkg-message.in Tue Mar 22 12:40:53 2011
***************
*** 3,9 ****
- add the following entry to /etc/exports:
! %%CFSD_BOOTSTRAP%% localhost
- create the default CFS mountpoint (if you want to use a different
mountpoint, set the cfsd_mountpoint variable in /etc/rc.conf):
--- 3,9 ----
- add the following entry to /etc/exports:
! %%CFSD_BOOTSTRAP%% 127.0.0.1
- create the default CFS mountpoint (if you want to use a different
mountpoint, set the cfsd_mountpoint variable in /etc/rc.conf):
Diff finished. Tue Mar 22 12:41:35 2011
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list