Date: Thu, 27 Feb 2014 15:35:14 GMT From: Lukasz Wasikowski <lukasz@wasikowski.net> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/187110: comms/gammu can't drop privileges Message-ID: <201402271535.s1RFZEgk067782@cgiserv.freebsd.org> Resent-Message-ID: <201402271540.s1RFe010003115@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402271535.s1RFZEgk067782>