Bug 272867 - [NEW PORT] security/su-exec: Switch user and group id and exec
Summary: [NEW PORT] security/su-exec: Switch user and group id and exec
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL: https://github.com/ncopa/su-exec/
Keywords:
Depends on:
Blocks: 272868
  Show dependency treegraph
 
Reported: 2023-08-01 14:27 UTC by Jesús Daniel Colmenares Oviedo
Modified: 2023-09-17 05:32 UTC (History)
1 user (show)

See Also:


Attachments
su-exec-0.2.patch (2.37 KB, patch)
2023-08-01 14:27 UTC, Jesús Daniel Colmenares Oviedo
DtxdF: maintainer-approval+
Details | Diff
su-exec-0.2.patch (2.42 KB, patch)
2023-08-08 08:36 UTC, Jesús Daniel Colmenares Oviedo
DtxdF: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesús Daniel Colmenares Oviedo 2023-08-01 14:27:02 UTC
Created attachment 243768 [details]
su-exec-0.2.patch

Description:

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/

QA:

* portlint: OK (looks fine.)
* testport: OK (poudriere: 13.2-RELEASE, amd64)
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-08-05 10:10:45 UTC
Thank you for your submission.  Here are some notes:

 - check if you can make the slave port a flavor instead of a slave port.
 - for your build commands, you're missing some variables.  The correct order is:

    ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o su-exec su-exec.c ${LIBS}

   Though you can leave out LIBS as this one doesn't link any libraries.
 - for the static build, I recommend just adding STATIC_LDFLAGS=-static instead
   of defining a whole new target

Port looks ok otherwise.  Please check and resubmit, I can then commit it.
Comment 2 Jesús Daniel Colmenares Oviedo 2023-08-08 08:36:12 UTC
Created attachment 243955 [details]
su-exec-0.2.patch

Description:

* Remove trailing slash in WWW.
* Use flavors instead of a slave port.

QA:

* portlint: OK (looks fine.)
* testport: OK (poudriere: 13.2-RELEASE, amd64)

Notes:

* Bug 272868 is not needed.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-08-09 13:05:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4ec063fe52d807eda49f54beb910ca5b3d434d2e

commit 4ec063fe52d807eda49f54beb910ca5b3d434d2e
Author:     Jesús Daniel Colmenares Oviedo <DtxdF@disroot.org>
AuthorDate: 2023-08-08 08:32:44 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
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 (new)  | 33 +++++++++++++++++++++++++++++++++
 security/su-exec/distinfo (new)  |  3 +++
 security/su-exec/pkg-descr (new) |  4 ++++
 4 files changed, 41 insertions(+)
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2023-08-09 13:17:11 UTC
Thank you for your contribution.
Please also ensure that you keep your ports up to date.  You can check e.g. repology:

    https://repology.org/maintainer/DtxdF@disroot.org
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-09-17 05:30:29 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=152d92bf575e1c2f2efd4b06372898aa8b653db0

commit 152d92bf575e1c2f2efd4b06372898aa8b653db0
Author:     Michael Osipov <michael.osipov@siemens.com>
AuthorDate: 2023-09-16 20:15:57 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2023-09-17 05:30:09 +0000

    */*: Use only HTTPS to fetch ports from Maven Central

    Maven Central supports HTTPS only for quite some time now and responds
    with "Not Implemented" over HTTP.

    Source: https://blog.sonatype.com/central-repository-moving-to-https

    PR:             272867

 java/hamcrest/Makefile            | 2 +-
 java/junit/Makefile               | 2 +-
 lang/jython/Makefile              | 3 +--
 math/apache-commons-math/Makefile | 2 +-
 www/servlet-api/Makefile          | 3 +--
 5 files changed, 5 insertions(+), 7 deletions(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-09-17 05:32:30 UTC
A commit in branch 2023Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5ff7f36fb2c103f8b44e237eaf6428cd0d639b1e

commit 5ff7f36fb2c103f8b44e237eaf6428cd0d639b1e
Author:     Michael Osipov <michael.osipov@siemens.com>
AuthorDate: 2023-09-16 20:15:57 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2023-09-17 05:31:11 +0000

    */*: Use only HTTPS to fetch ports from Maven Central

    Maven Central supports HTTPS only for quite some time now and responds
    with "Not Implemented" over HTTP.

    Source: https://blog.sonatype.com/central-repository-moving-to-https

    PR:             272867
    (cherry picked from commit 152d92bf575e1c2f2efd4b06372898aa8b653db0)

 java/hamcrest/Makefile            | 2 +-
 java/junit/Makefile               | 2 +-
 lang/jython/Makefile              | 3 +--
 math/apache-commons-math/Makefile | 2 +-
 www/servlet-api/Makefile          | 3 +--
 5 files changed, 5 insertions(+), 7 deletions(-)