Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jun 2016 00:07:14 +0000 (UTC)
From:      Ollivier Robert <roberto@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r417407 - in head/security/doas: . files
Message-ID:  <201606240007.u5O07EWU013063@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: roberto
Date: Fri Jun 24 00:07:13 2016
New Revision: 417407
URL: https://svnweb.freebsd.org/changeset/ports/417407

Log:
  New port: security/doas
  
  The doas program allows users to run commands as another user (usually
  root). The doas program was written by the OpenBSD team to provide a
  lightweight, simplified (and more secure) alternative to the sudo command.
  
  Original upstream (OpenBSD) source:
  http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/doas/
  
  FreeBSD version: https://github.com/slicer69/doas
  
  NOTE: I added the two patch files to workaround issues mentioned in the PR
  about hardcoding of /usr/local.
  
  PR:		210473
  Submitted by:	jsmith@resonatingmedia.com
  Modified by:	jrm@ftfl.ca (see PR) and me (roberto)

Added:
  head/security/doas/
  head/security/doas/Makefile   (contents, props changed)
  head/security/doas/distinfo   (contents, props changed)
  head/security/doas/files/
  head/security/doas/files/patch-Makefile   (contents, props changed)
  head/security/doas/files/patch-doas.c   (contents, props changed)
  head/security/doas/files/pkg-message.in   (contents, props changed)
  head/security/doas/pkg-descr   (contents, props changed)

Added: head/security/doas/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/doas/Makefile	Fri Jun 24 00:07:13 2016	(r417407)
@@ -0,0 +1,29 @@
+# $FreeBSD$
+
+PORTNAME=	doas
+PORTVERSION=	5.9
+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=	e6f1456
+
+BINMODE=	4755
+
+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 <bsd.port.mk>

Added: head/security/doas/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/doas/distinfo	Fri Jun 24 00:07:13 2016	(r417407)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1466641283
+SHA256 (slicer69-doas-5.9-e6f1456_GH0.tar.gz) = 304008cfca04b8825393d3cf50b6085842b36c2668fda81d24bf16e56a042c49
+SIZE (slicer69-doas-5.9-e6f1456_GH0.tar.gz) = 10469

Added: head/security/doas/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/doas/files/patch-Makefile	Fri Jun 24 00:07:13 2016	(r417407)
@@ -0,0 +1,11 @@
+--- Makefile.orig	2016-06-22 22:59:03 UTC
++++ Makefile
+@@ -3,7 +3,7 @@ YC?=yacc
+ BIN=doas
+ PREFIX?=/usr/local
+ OBJECTS=doas.o env.o execvpe.o y.tab.o
+-CFLAG+= -DUSE_PAM
++CFLAG+= -DUSE_PAM -DDOAS_CONF=\"${PREFIX}/etc/doas.conf\"
+ LFLAG+= -lpam
+ 
+ all: $(OBJECTS)

Added: head/security/doas/files/patch-doas.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/doas/files/patch-doas.c	Fri Jun 24 00:07:13 2016	(r417407)
@@ -0,0 +1,11 @@
+--- doas.c.orig	2016-06-22 22:59:03 UTC
++++ doas.c
+@@ -324,7 +324,7 @@ main(int argc, char **argv)
+ 	int pam_silent = PAM_SILENT;
+ #endif
+ 
+-	parseconfig("/usr/local/etc/doas.conf", 1);
++	parseconfig(DOAS_CONF, 1);
+ 
+ 	/* cmdline is used only for logging, no need to abort on truncate */
+ 	(void) strlcpy(cmdline, argv[0], sizeof(cmdline));

Added: head/security/doas/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/doas/files/pkg-message.in	Fri Jun 24 00:07:13 2016	(r417407)
@@ -0,0 +1,9 @@
+============================================================
+To use doas,
+
+%%ETCDIR%%/doas.conf
+
+must be created.
+
+Refer to doas.conf(5).
+============================================================

Added: head/security/doas/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/doas/pkg-descr	Fri Jun 24 00:07:13 2016	(r417407)
@@ -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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606240007.u5O07EWU013063>