From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Feb 27 15:40:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 880295AD for ; Thu, 27 Feb 2014 15:40:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 636C9117C for ; Thu, 27 Feb 2014 15:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1RFe0v0003116 for ; Thu, 27 Feb 2014 15:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1RFe010003115; Thu, 27 Feb 2014 15:40:00 GMT (envelope-from gnats) Resent-Date: Thu, 27 Feb 2014 15:40:00 GMT Resent-Message-Id: <201402271540.s1RFe010003115@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, Lukasz Wasikowski Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F229288 for ; Thu, 27 Feb 2014 15:35:15 +0000 (UTC) Received: from newred.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5251410EF for ; Thu, 27 Feb 2014 15:35:15 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by newred.freebsd.org (8.14.7/8.14.7) with ESMTP id s1RFZE16067798 for ; Thu, 27 Feb 2014 15:35:14 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.7/8.14.7/Submit) id s1RFZEgk067782; Thu, 27 Feb 2014 15:35:14 GMT (envelope-from nobody) Message-Id: <201402271535.s1RFZEgk067782@cgiserv.freebsd.org> Date: Thu, 27 Feb 2014 15:35:14 GMT From: Lukasz Wasikowski To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/187110: comms/gammu can't drop privileges X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 15:40:00 -0000 >Number: 187110 >Category: ports >Synopsis: comms/gammu can't drop privileges >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Feb 27 15:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Lukasz Wasikowski >Release: FreeBSD 9.2-RELEASE >Organization: >Environment: FreeBSD ashnazg.cadera.com.pl 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r256440: Wed Oct 16 12:01:38 CEST 2013 root@ashnazg.cadera.com.pl:/usr/obj/usr/src/sys/ASHNAZG amd64 >Description: gammu's configure on FreeBSD can't find initgroups(), which results in lack of privilege drop for gammu-smsd: # gammu-smsd -h usage: gammu-smsd [OPTION]... options: -h / --help - shows this help -v / --version - shows version information -c / --config CONFIG_FILE - defines path to config file -d / --daemon - daemonizes program after startup -p / --pid PID_FILE - defines path to pid file -f / --max-failures NUM - number of failures before terminating -X / --suicide SECONDS - kills itself after number of seconds -l / --use-log - use logging configuration from config file (default) -L / --no-use-log - do not use logging configuration from config file With attached patch use of --user and --group is possible: # gammu-smsd -h usage: gammu-smsd [OPTION]... options: -h / --help - shows this help -v / --version - shows version information -c / --config CONFIG_FILE - defines path to config file -d / --daemon - daemonizes program after startup -p / --pid PID_FILE - defines path to pid file -U / --user USER - run daemon as a user -G / --group GROUP - run daemon as a group -f / --max-failures NUM - number of failures before terminating -X / --suicide SECONDS - kills itself after number of seconds -l / --use-log - use logging configuration from config file (default) -L / --no-use-log - do not use logging configuration from config file >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN gammu.orig/files/patch-CMakeLists-initgroups.txt gammu/files/patch-CMakeLists-initgroups.txt --- gammu.orig/files/patch-CMakeLists-initgroups.txt 1970-01-01 01:00:00.000000000 +0100 +++ gammu/files/patch-CMakeLists-initgroups.txt 2014-02-27 16:12:24.769719439 +0100 @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2014-02-27 16:08:08.089719671 +0100 ++++ CMakeLists.txt 2014-02-27 16:08:22.673719568 +0100 +@@ -120,7 +120,7 @@ + check_symbol_exists (getgrnam "grp.h" HAVE_GETGRNAM) + check_symbol_exists (getpwuid "pwd.h" HAVE_GETPWUID) + check_symbol_exists (getuid "unistd.h" HAVE_GETUID) +-check_symbol_exists (initgroups "grp.h" HAVE_INITGROUPS) ++check_symbol_exists (initgroups "unistd.h" HAVE_INITGROUPS) + check_symbol_exists (setuid "unistd.h" HAVE_SETUID) + check_symbol_exists (setgid "unistd.h" HAVE_SETGID) + check_symbol_exists (SIGHUP "signal.h" HAVE_SIGHUP) >Release-Note: >Audit-Trail: >Unformatted: