diff options
author | adamw <adamw@FreeBSD.org> | 2015-04-27 10:57:08 +0800 |
---|---|---|
committer | adamw <adamw@FreeBSD.org> | 2015-04-27 10:57:08 +0800 |
commit | efe604a47fd45f2a4f98613a9da0d0b0a64a32b7 (patch) | |
tree | 8c1b9d7726e992bc8385329af2239efd0095d533 | |
parent | 5cb047928d278de731d4a4ce40a9e4259ce8b872 (diff) | |
download | freebsd-ports-gnome-efe604a47fd45f2a4f98613a9da0d0b0a64a32b7.tar.gz freebsd-ports-gnome-efe604a47fd45f2a4f98613a9da0d0b0a64a32b7.tar.zst freebsd-ports-gnome-efe604a47fd45f2a4f98613a9da0d0b0a64a32b7.zip |
Add www/p5-Mojolicious-Plugin-SetUserGroup, a plugin to set the
user and group as which the Mojolicious daemon runs.
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/p5-Mojolicious-Plugin-SetUserGroup/Makefile | 30 | ||||
-rw-r--r-- | www/p5-Mojolicious-Plugin-SetUserGroup/distinfo | 2 | ||||
-rw-r--r-- | www/p5-Mojolicious-Plugin-SetUserGroup/pkg-descr | 12 | ||||
-rw-r--r-- | www/p5-Mojolicious-Plugin-SetUserGroup/pkg-plist | 2 |
5 files changed, 47 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index e8bbaf239c90..1fd55b1be4f4 100644 --- a/www/Makefile +++ b/www/Makefile @@ -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 diff --git a/www/p5-Mojolicious-Plugin-SetUserGroup/Makefile b/www/p5-Mojolicious-Plugin-SetUserGroup/Makefile new file mode 100644 index 000000000000..ec015cfbca55 --- /dev/null +++ b/www/p5-Mojolicious-Plugin-SetUserGroup/Makefile @@ -0,0 +1,30 @@ +# Created by: Adam Weinberger <adamw@FreeBSD.org> +# $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 <bsd.port.pre.mk> + +.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 <bsd.port.post.mk> diff --git a/www/p5-Mojolicious-Plugin-SetUserGroup/distinfo b/www/p5-Mojolicious-Plugin-SetUserGroup/distinfo new file mode 100644 index 000000000000..8d6f68e7d466 --- /dev/null +++ b/www/p5-Mojolicious-Plugin-SetUserGroup/distinfo @@ -0,0 +1,2 @@ +SHA256 (Mojolicious-Plugin-SetUserGroup-0.001.tar.gz) = 62ba9db779b44cfae3672898d866ece1e55ecd6bd644d6f5453f6099e2e7945f +SIZE (Mojolicious-Plugin-SetUserGroup-0.001.tar.gz) = 8070 diff --git a/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-descr b/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-descr new file mode 100644 index 000000000000..f1e3c54033e0 --- /dev/null +++ b/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-descr @@ -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 diff --git a/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-plist b/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-plist new file mode 100644 index 000000000000..c27bdd7277da --- /dev/null +++ b/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-plist @@ -0,0 +1,2 @@ +%%SITE_PERL%%/Mojolicious/Plugin/SetUserGroup.pm +%%PERL5_MAN3%%/Mojolicious::Plugin::SetUserGroup.3.gz |