From 9d91353c51d26e3d75ce069ea76063de2a117eab Mon Sep 17 00:00:00 2001 From: DPorts Builder Date: Wed, 15 Feb 2017 07:43:19 -0800 Subject: [PATCH] Import security/doas version 5.9p7 --- security/doas/Makefile | 32 +++++++++++++++++++++++++++++ security/doas/distinfo | 3 +++ security/doas/dragonfly/patch-env.c | 12 +++++++++++ security/doas/files/pkg-message.in | 9 ++++++++ security/doas/pkg-descr | 6 ++++++ 5 files changed, 62 insertions(+) create mode 100644 security/doas/Makefile create mode 100644 security/doas/distinfo create mode 100644 security/doas/dragonfly/patch-env.c create mode 100644 security/doas/files/pkg-message.in create mode 100644 security/doas/pkg-descr diff --git a/security/doas/Makefile b/security/doas/Makefile new file mode 100644 index 00000000000..6bd8d6a12ab --- /dev/null +++ b/security/doas/Makefile @@ -0,0 +1,32 @@ +# $FreeBSD$ + +PORTNAME= doas +PORTVERSION= 5.9p7 +CATEGORIES= security + +MAINTAINER= jsmith@resonatingmedia.com +COMMENT= Simple sudo alternative to run commands as another user + +LICENSE= ISCL + +USE_GITHUB= yes +GH_ACCOUNT= slicer69 +GH_PROJECT= doas +GH_TAGNAME= a15e6ed + +USES= gmake + +BINMODE= 4755 +ETCDIR= ${PREFIX}/etc + +SUB_FILES= pkg-message +PLIST_FILES= bin/doas \ + man/man5/doas.conf.5.gz \ + man/man1/doas.1.gz + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/doas.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 + ${INSTALL_MAN} ${WRKSRC}/doas.conf.5 ${STAGEDIR}${MAN5PREFIX}/man/man5 + +.include diff --git a/security/doas/distinfo b/security/doas/distinfo new file mode 100644 index 00000000000..570bd28ff41 --- /dev/null +++ b/security/doas/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1481094025 +SHA256 (slicer69-doas-5.9p7-a15e6ed_GH0.tar.gz) = dbc6da18619acb168e2951751e1431971d0ec11db1cd6bbfaed7c7f9e1f2557d +SIZE (slicer69-doas-5.9p7-a15e6ed_GH0.tar.gz) = 15573 diff --git a/security/doas/dragonfly/patch-env.c b/security/doas/dragonfly/patch-env.c new file mode 100644 index 00000000000..a3503f5f2d7 --- /dev/null +++ b/security/doas/dragonfly/patch-env.c @@ -0,0 +1,12 @@ +--- env.c.orig 2017-02-14 23:32:32.947014000 +0100 ++++ env.c 2017-02-14 23:33:45.766652000 +0100 +@@ -49,6 +49,9 @@ + { + return strcmp(a->key, b->key); + } ++#ifdef __DragonFly__ ++RB_PROTOTYPE_STATIC(envtree, envnode, node, envcmp); ++#endif + RB_GENERATE_STATIC(envtree, envnode, node, envcmp) + + struct env *createenv(char **); diff --git a/security/doas/files/pkg-message.in b/security/doas/files/pkg-message.in new file mode 100644 index 00000000000..53362267ea8 --- /dev/null +++ b/security/doas/files/pkg-message.in @@ -0,0 +1,9 @@ +============================================================ +To use doas, + +%%ETCDIR%%/doas.conf + +must be created. + +Refer to doas.conf(5). +============================================================ diff --git a/security/doas/pkg-descr b/security/doas/pkg-descr new file mode 100644 index 00000000000..b0c3977bd83 --- /dev/null +++ b/security/doas/pkg-descr @@ -0,0 +1,6 @@ +This is the FreeBSD port of the OpenBSD "doas" command. The doas program +allows a regular user to run commands as another user (usually root). The +doas command is a simplified (hopefully more secure) version of the "sudo" +command and offers an easier to read/modify configuration. + +WWW: https://github.com/slicer69/doas/ -- 2.41.0