ports/62617: qpage port runs as wrong user by default
Mike Andrews
mandrews at bit0.com
Tue Feb 10 06:20:14 UTC 2004
>Number: 62617
>Category: ports
>Synopsis: qpage port runs as wrong user by default
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Feb 09 22:20:10 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Mike Andrews
>Release: FreeBSD 5.2-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD mindcrime.bit0.com 5.2-RELEASE-p2 FreeBSD 5.2-RELEASE-p2 #1: Sat Feb 7 14:28:53 EST 2004 mandrews at mindcrime.bit0.com:/usr/obj/usr/src/sys/GENERIC i386
qpage 3.3 port, FreeBSD 4.9-RELEASE-p2 or 5.2-RELEASE-p2
>Description:
qpage has a compiled-in userid to switch to when it drops root privs.
Out of the box, this is 'daemon', which doesn't have privs to open any
/dev/cuaa* devices, which makes it hard to send pages via modem.
qpage can also act as an SNPP client without talking directly to a
modem, though, in which case 'daemon' is fine. Still, there's no
compile-time knob to change this easily, which makes 'portupgrade'
a bit of a pain. :)
>How-To-Repeat:
1) cd /usr/ports/comms/qpage; make install
2) set up /usr/local/etc/qpage.cf to use a modem, for example:
modem=modem device=/dev/cuaa1
service=foobarpagerco
device=modem
baudrate=1200
parity=even
allowpid=yes
maxtries=6
phone=5551212
maxmsgsize=230
maxpages=5
pager=pagerone
pagerid=5552121
service=foobarpagerco
3) /usr/local/etc/rc.d/qpage.sh start
Opening the modem device will fail and the daemon won't start.
>Fix:
Since some people probably use this as only an SNPP client instead
of talking to a modem directly, in which case 'daemon' is OK...
maybe a QPAGE_USER knob that could be set in /etc/make.conf?
Otherwise, extend /usr/ports/comms/qpage/files/patch-config.h.in to
change 'daemon' to 'uucp' on line 26 of the original file.
--- patch-config.h.in Sat Jan 10 03:48:29 2004
+++ /tmp/qpage-patch-patch Tue Feb 10 01:09:56 2004
@@ -1,6 +1,6 @@
---- config.h.in.orig Sat Jan 10 00:42:55 2004
-+++ config.h.in Sat Jan 10 00:43:14 2004
-@@ -17,7 +17,7 @@
+--- config.h.in.orig Sun Jul 26 15:38:35 1998
++++ config.h.in Tue Feb 10 01:07:25 2004
+@@ -17,13 +17,13 @@
#undef SNPP_SERVER_FILE
/* Define as the location of the qpage configuration file. */
@@ -9,3 +9,10 @@
/* Define as the location of the lock directory. */
#undef DEFAULT_LOCKDIR
+
+ /* Define as the user the qpage daemon runs as. */
+-#define DAEMON_USER "daemon"
++#define DAEMON_USER "uucp"
+
+ /* Define as the syslog facility used to log messages (i.e. LOG_DAEMON). */
+ #define SYSLOG_FACILITY LOG_DAEMON
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list