From owner-svn-ports-all@freebsd.org Fri Jun 24 00:07:15 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A160CAC6B3E; Fri, 24 Jun 2016 00:07:15 +0000 (UTC) (envelope-from roberto@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 611E027C3; Fri, 24 Jun 2016 00:07:15 +0000 (UTC) (envelope-from roberto@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5O07EER013069; Fri, 24 Jun 2016 00:07:14 GMT (envelope-from roberto@FreeBSD.org) Received: (from roberto@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5O07EWU013063; Fri, 24 Jun 2016 00:07:14 GMT (envelope-from roberto@FreeBSD.org) Message-Id: <201606240007.u5O07EWU013063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: roberto set sender to roberto@FreeBSD.org using -f From: Ollivier Robert Date: Fri, 24 Jun 2016 00:07:14 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r417407 - in head/security/doas: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2016 00:07:15 -0000 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 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/