From owner-svn-ports-head@FreeBSD.ORG Mon Apr 27 02:57:10 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0720B449; Mon, 27 Apr 2015 02:57:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 E8E081149; Mon, 27 Apr 2015 02:57:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R2v9iY038410; Mon, 27 Apr 2015 02:57:09 GMT (envelope-from adamw@FreeBSD.org) Received: (from adamw@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R2v8FX038403; Mon, 27 Apr 2015 02:57:08 GMT (envelope-from adamw@FreeBSD.org) Message-Id: <201504270257.t3R2v8FX038403@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adamw set sender to adamw@FreeBSD.org using -f From: Adam Weinberger Date: Mon, 27 Apr 2015 02:57:08 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r384811 - in head/www: . p5-Mojolicious-Plugin-SetUserGroup X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 02:57:10 -0000 Author: adamw Date: Mon Apr 27 02:57:08 2015 New Revision: 384811 URL: https://svnweb.freebsd.org/changeset/ports/384811 Log: Add www/p5-Mojolicious-Plugin-SetUserGroup, a plugin to set the user and group as which the Mojolicious daemon runs. Added: head/www/p5-Mojolicious-Plugin-SetUserGroup/ head/www/p5-Mojolicious-Plugin-SetUserGroup/Makefile (contents, props changed) head/www/p5-Mojolicious-Plugin-SetUserGroup/distinfo (contents, props changed) head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-descr (contents, props changed) head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-plist (contents, props changed) Modified: head/www/Makefile Modified: head/www/Makefile ============================================================================== --- head/www/Makefile Mon Apr 27 02:48:28 2015 (r384810) +++ head/www/Makefile Mon Apr 27 02:57:08 2015 (r384811) @@ -1056,6 +1056,7 @@ SUBDIR += p5-Mojolicious-Plugin-Authentication SUBDIR += p5-Mojolicious-Plugin-Database SUBDIR += p5-Mojolicious-Plugin-Mongodb + SUBDIR += p5-Mojolicious-Plugin-SetUserGroup SUBDIR += p5-Mojolicious-Plugin-TtRenderer SUBDIR += p5-Mojolicious-Plugin-YamlConfig SUBDIR += p5-Monoceros Added: head/www/p5-Mojolicious-Plugin-SetUserGroup/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Mojolicious-Plugin-SetUserGroup/Makefile Mon Apr 27 02:57:08 2015 (r384811) @@ -0,0 +1,30 @@ +# Created by: Adam Weinberger +# $FreeBSD$ + +PORTNAME= Mojolicious-Plugin-SetUserGroup +PORTVERSION= 0.001 +CATEGORIES= www perl5 +MASTER_SITES= CPAN +MASTER_SITE_SUBDIR= CPAN:DBOOK +PKGNAMEPREFIX= p5- + +MAINTAINER= perl@FreeBSD.org +COMMENT= Mojolicious plugin to set unprivileged credentials + +LICENSE= ART20 + +BUILD_DEPENDS= p5-Mojolicious>=6.0:${PORTSDIR}/www/p5-Mojolicious \ + p5-Unix-Groups>=0:${PORTSDIR}/devel/p5-Unix-Groups +RUN_DEPENDS:= ${BUILD_DEPENDS} + +USES= perl5 +USE_PERL5= configure + +.include + +.if ${PERL_LEVEL} < 501905 +BUILD_DEPENDS+= p5-Scalar-List-Utils>=1.33:${PORTSDIR}/lang/p5-Scalar-List-Utils +RUN_DEPENDS+= p5-Scalar-List-Utils>=1.33:${PORTSDIR}/lang/p5-Scalar-List-Utils +.endif + +.include Added: head/www/p5-Mojolicious-Plugin-SetUserGroup/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Mojolicious-Plugin-SetUserGroup/distinfo Mon Apr 27 02:57:08 2015 (r384811) @@ -0,0 +1,2 @@ +SHA256 (Mojolicious-Plugin-SetUserGroup-0.001.tar.gz) = 62ba9db779b44cfae3672898d866ece1e55ecd6bd644d6f5453f6099e2e7945f +SIZE (Mojolicious-Plugin-SetUserGroup-0.001.tar.gz) = 8070 Added: head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-descr Mon Apr 27 02:57:08 2015 (r384811) @@ -0,0 +1,12 @@ +This plugin is intended to replace the setuidgid functionality of Mojo::Server. +It should be loaded in application startup and it will change the user and +group credentials of the process when Mojo::IOLoop is started, which occurs in +each worker process of a Mojo::Server::Prefork daemon like hypnotoad. + +This allows an application to be started as root so it can bind to privileged +ports such as port 80 or 443, but run worker processes as unprivileged users. +However, if the application is not started as root, it will most likely fail to +change credentials. So, you should only set the user/group when the application +is started as root. + +https://metacpan.org/pod/Mojolicious::Plugin::SetUserGroup Added: head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-plist Mon Apr 27 02:57:08 2015 (r384811) @@ -0,0 +1,2 @@ +%%SITE_PERL%%/Mojolicious/Plugin/SetUserGroup.pm +%%PERL5_MAN3%%/Mojolicious::Plugin::SetUserGroup.3.gz