Date: Sun, 7 May 2006 16:23:16 +0200 From: clemens fischer <ino-qc@spotteswoode.de.eu.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/96918: sysutils/fcron: fcrondyn completely broken Message-ID: <20060507142316.GA558@spotteswoode.de.eu.org> Resent-Message-ID: <200605071430.k47EUMxw065458@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 96918 >Category: ports >Synopsis: sysutils/fcron: fcrondyn completely broken >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: Sun May 07 14:30:22 GMT 2006 >Closed-Date: >Last-Modified: >Originator: clemens fischer <ino-qc@spotteswoode.dnsalias.org> >Release: FreeBSD 6.1-RC i386 >Organization: <organization of PR author (multiple lines)> >Environment: System: FreeBSD spotteswoode.dnsalias.org 6.1-RC FreeBSD 6.1-RC #5: Mon May 1 22:23:07 CEST 2006 root@spotteswoode.dnsalias.org:/usr/obj/usr/src/sys/spott i386 >Description: ports/sysutils/fcron comes with a utility called "fcrondyn", which allows display and modification of internal tables such as scheduled run times of any pending jobs. for this to work securely, the fcron system of programs runs privilege separated communicating over unix domain sockets. fcrondyn cannot connect to "var/run/fcron.fifo". the error message is always the same: 1 # fcrondyn -c /l/etc/fcron.conf -d 14:22:10 fcronconf=/l/etc/fcron.conf 14:22:10 Cannot connect() to fcron (check if fcron is running): No such file or directory i've investigated as far as i could, but could not find anything relevant. the error message comes from int connect_fcron(void) in file ./fcrondyn.c, which is simple enough. the point of error is in the middle of the 20 line function: ... if ( connect(fd, (struct sockaddr *) &addr, sizeof(addr.sun_family) + len) < 0 ) die_e("Cannot connect() to fcron %s", fifofile ); ... i put in the "%s, fifofile" part to see where fcrondyn is looking for the socket, but the output points correctly to: srw-rw-rw- 1 root wheel 0B May 7 14:55 /var/run/fcron.fifo since fcron itself is running and listening: 0 # lsof -a -U -c /fcron/ COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME fcron 2381 root 4u unix 0xc2be22c8 0t0 ->0xc282142c fcron 2381 root 5u unix 0xc2934590 0t0 /var/run/fcron.fifo i don't know what to do next. a gdb(1) session around this point gives: (gdb) p addr.sun_path $11 = "/var/run/fcron.fifo", '\0' <repeats 84 times>, "0" (gdb) s 412 if ( connect(fd, (struct sockaddr *) &addr, sizeof(addr.sun_family) + len) < 0 ) (gdb) info locals fd = 7 addr = {sun_len = 32 ' ', sun_family = 1 '\001', sun_path = "/var/run/fcron.fifo", '\0' <repeats 84 times>} len = 19 (gdb) s 413 die_e("Cannot connect() to fcron %s", fifofile ); (gdb) info locals fd = 7 addr = {sun_len = 32 ' ', sun_family = 1 '\001', sun_path = "/var/run/fcron.fifo", '\0' <repeats 84 times>} len = 19 (gdb) doesn't this look correct? >How-To-Repeat: after installing fcron, just try "fcrondyn" from any user account. >Fix: none known so far. clemens fischer >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060507142316.GA558>