Date: Thu, 8 Dec 2005 17:33:18 +0100 (CET) From: "Walter C. Pelissero" <walter.pelissero@iesy.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/90107: cvsd imprisoned doesn't work with devfs Message-ID: <200512081633.jB8GXI3I011303@zaphod.home.loc> Resent-Message-ID: <200512081640.jB8Ge4eB055562@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 90107 >Category: ports >Synopsis: cvsd imprisoned doesn't work with devfs >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Dec 08 16:40:04 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Walter C. Pelissero >Release: FreeBSD 6.0-STABLE i386 >Organization: >Environment: System: FreeBSD zaphod.home.loc 6.0-STABLE FreeBSD 6.0-STABLE #0: Tue Nov 22 22:26:35 CET 2005 root@zaphod.home.loc:/usr/src/sys/i386/compile/TYAN-TIGER-MP i386 >Description: I've noticed that cvsd doesn't run with the new devfs infrastructure. This is due to the fact that cvsd-buildroot makes use of mknod to populate the dev directory, but device nodes created that way don't work any longer (at least on 6.0-STABLE). >How-To-Repeat: Install cvsd from ports. Configure (see cvsd.conf) to run in a chrooted jail. Try to do any operation with a remote cvs client; an error about the impossibility to open /dev/null should be reported. In fact: # cat /path/to/cvsd/jail/dev/null cat: null: Socket operation on non-socket Also note that: # mknod foo c 0 16 # cat foo cat: foo: Socket operation on non-socket >Fix: The workaround is fairly simple for cvsd. Here is a half-baked proposal: --- cvsd.sh.sample Sat Oct 1 12:50:44 2005 +++ cvsd.sh Thu Dec 8 17:09:37 2005 @@ -42,6 +42,10 @@ case "$1" in start) + mount -t devfs devfs $DEVDIR + devfs -m $DEVDIR rule apply hide + devfs -m $DEVDIR rule apply path null unhide + devfs -m $DEVDIR rule apply path zero unhide echo $ECHO_N "Starting $DESC: cvsd$ECHO_C" if [ -n "$PIDFILE" ] && [ -f "$PIDFILE" ] && \ kill -s 0 `cat $PIDFILE` > /dev/null 2>&1 @@ -72,6 +76,7 @@ echo " unable to stop, no PidFile!" exit 1 fi + umount $DEVDIR ;; restart|force-reload) $0 stop DEVDIR must be set somewhere else or guessed from cvsd.conf. cvsd-buildroot should be amended accordingly (it shouldn't do any mknod). >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512081633.jB8GXI3I011303>