From nobody Wed Aug 09 13:04:48 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RLVdX56ntz4px7r; Wed, 9 Aug 2023 13:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RLVdX2hy1z4Fql; Wed, 9 Aug 2023 13:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691586288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uibEPP52ejMqysezNOF5ecOmEHv3AyQ5bqajrgq278w=; b=oxNOtNm37AsiW69VMKfNW1WcxzNqRwsi24Mwj4UI7JMis/4iM8j4MeIv3j+EYhcSXvWQgr d8c4z7HZyYDHgJmF0HZPZBuomNPcpD+X/tP1qrdu/lffHF8tlFvYk/gMYZm8WKOfH1g0NL RW4tLX9uyyox/r7EhtgQkQVNfxiCQz3ROJP5Z7lerS2deA2XNtcvNNVGwZSQBMDhDv2FN5 OBIC3iKlNlBDqT56k5uBSIxBxYB7P5waWPRDeGiTJEcjSuxbqilMNchcCDFzK5B9MOfQPS 4CdUVutvmi6GJPqmgoDOgFTrNKLxPbbI86SqW12S0m507V4g02DoFiX2lSzx2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691586288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uibEPP52ejMqysezNOF5ecOmEHv3AyQ5bqajrgq278w=; b=jG28VF8kWEBOPuxe7RFRtQIQthW1OkE9Omw+iYv5kQuV6b0w1q56HnQkqP69K1SiEkzOpA QOe5M7+kSYWQE4nVn490zR/M9I8UBv886v7uj26AhFdcFFxYn37K2lF7Br/EzoGEco8F7x XO58Yqwi4UolGAp1GFswu9fVJ/GsafU761LLauZG0l1LNb55hNwxyn5fAGVWyTcFq/xyb3 YtfSlBetSx3NPcki393yuw1/CFWQ/Ds1J+jsBa2J+LnjU0Z9ux2vw9SxOthypQ4yZoGpAr UH1Cn5o8gQ00Md64LAuBCijEUUjqAsdl5EntL+yI52lNAYNfurIJ0fZwnveL+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691586288; a=rsa-sha256; cv=none; b=URqXNNEyRUVCbTHVWiWLbvoOrwMZp/gS3I1OqwfIC/4v5jalotPY29bkFjVvOPrtJWcqqT Bu+6ARCMdSnkCAoaL8eJa2lXAnBqcFzD7i2qRZFSTd1NI5tVVEExdr514+Ad9GGOEqelk7 VGxwNUhPYMllop1yOIUGr4n+Ok3MCtt/Wkap/TvycMJ1yliMnTvDL0sEvSw+YvNr6zS+Hd wE6cBwp3Gxv6eN0hY6k1vbUKxIU8DxZsD8W7kTZV2+X/wSOtB3J0YbXt1qDBrWCdZhTrXB NstKGnb8rv5lkb8hHcetDHQQwsp1M4QwkSmPwHczIuq4KXHND1Sx2D7NUGHUBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RLVdX1mdyz2VR; Wed, 9 Aug 2023 13:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 379D4mV3090633; Wed, 9 Aug 2023 13:04:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 379D4m5t090630; Wed, 9 Aug 2023 13:04:48 GMT (envelope-from git) Date: Wed, 9 Aug 2023 13:04:48 GMT Message-Id: <202308091304.379D4m5t090630@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 4ec063fe52d8 - main - security/su-exec: New port: Switch user and group id and exec List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ec063fe52d807eda49f54beb910ca5b3d434d2e Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=4ec063fe52d807eda49f54beb910ca5b3d434d2e commit 4ec063fe52d807eda49f54beb910ca5b3d434d2e Author: Jesús Daniel Colmenares Oviedo AuthorDate: 2023-08-08 08:32:44 +0000 Commit: Robert Clausecker CommitDate: 2023-08-09 13:01:35 +0000 security/su-exec: New port: Switch user and group id and exec su-exec is a simple tool that will simply execute a program with different privileges. The program will be executed directly and not run as a child, like su and sudo does, which avoids TTY and signal issues. WWW: https://github.com/ncopa/su-exec PR: 272867 --- security/Makefile | 1 + security/su-exec/Makefile | 33 +++++++++++++++++++++++++++++++++ security/su-exec/distinfo | 3 +++ security/su-exec/pkg-descr | 4 ++++ 4 files changed, 41 insertions(+) diff --git a/security/Makefile b/security/Makefile index 494ad774b480..cda821d223e4 100644 --- a/security/Makefile +++ b/security/Makefile @@ -1285,6 +1285,7 @@ SUBDIR += sudo SUBDIR += sudoscript SUBDIR += super + SUBDIR += su-exec SUBDIR += suricata SUBDIR += swatchdog SUBDIR += tailscale diff --git a/security/su-exec/Makefile b/security/su-exec/Makefile new file mode 100644 index 000000000000..02a4a5c4ab5b --- /dev/null +++ b/security/su-exec/Makefile @@ -0,0 +1,33 @@ +PORTNAME= su-exec +DISTVERSIONPREFIX= v +DISTVERSION= 0.2 +CATEGORIES= security + +MAINTAINER= DtxdF@disroot.org +COMMENT= Switch user and group id and exec +WWW= https://github.com/ncopa/su-exec + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +FLAVORS= default static +default_CONFLICTS_INSTALL= su-exec-static +static_PKGNAMESUFFIX= -static +static_CONFLICTS_INSTALL= su-exec + +USE_GITHUB= yes +GH_ACCOUNT= ncopa + +.if ${FLAVOR:U} == static +LDFLAGS+= -static +.endif + +PLIST_FILES= bin/su-exec + +do-build: + cd ${WRKSRC} && ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o su-exec su-exec.c + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/su-exec ${STAGEDIR}${PREFIX}/bin + +.include diff --git a/security/su-exec/distinfo b/security/su-exec/distinfo new file mode 100644 index 000000000000..bb9ae6f6cb03 --- /dev/null +++ b/security/su-exec/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1690896135 +SHA256 (ncopa-su-exec-v0.2_GH0.tar.gz) = ec4acbd8cde6ceeb2be67eda1f46c709758af6db35cacbcde41baac349855e25 +SIZE (ncopa-su-exec-v0.2_GH0.tar.gz) = 2426 diff --git a/security/su-exec/pkg-descr b/security/su-exec/pkg-descr new file mode 100644 index 000000000000..d9eb12dd208a --- /dev/null +++ b/security/su-exec/pkg-descr @@ -0,0 +1,4 @@ +su-exec is a simple tool that will simply execute a program with +different privileges. The program will be executed directly and not +run as a child, like su and sudo does, which avoids TTY and signal +issues.