From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Feb 9 22:20:14 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 596F816A4DB for ; Mon, 9 Feb 2004 22:20:14 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D586543D46 for ; Mon, 9 Feb 2004 22:20:10 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i1A6KAbv085253 for ; Mon, 9 Feb 2004 22:20:10 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i1A6KALG085252; Mon, 9 Feb 2004 22:20:10 -0800 (PST) (envelope-from gnats) Resent-Date: Mon, 9 Feb 2004 22:20:10 -0800 (PST) Resent-Message-Id: <200402100620.i1A6KALG085252@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mike Andrews Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36C5816A4CE for ; Mon, 9 Feb 2004 22:15:15 -0800 (PST) Received: from bit0.com (bit0.com [216.24.42.194]) by mx1.FreeBSD.org (Postfix) with SMTP id 421C443D1D for ; Mon, 9 Feb 2004 22:15:14 -0800 (PST) (envelope-from mandrews@bit0.com) Received: by bit0.com (Postfix, from userid 1000) id 0A6A134DA1; Tue, 10 Feb 2004 01:15:20 -0500 (EST) Message-Id: <20040210061520.0A6A134DA1@bit0.com> Date: Tue, 10 Feb 2004 01:15:20 -0500 (EST) From: Mike Andrews To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/62617: qpage port runs as wrong user by default X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mike Andrews List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 06:20:14 -0000 >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@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: