diff options
author | Renato Botelho <garga@FreeBSD.org> | 2006-03-15 10:16:57 +0000 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2006-03-15 10:16:57 +0000 |
commit | 0a874bc5f91096147fea226c540200ac3c607949 (patch) | |
tree | 95caf137ea323e39fc6b6e3fb2b46f66e692dfdd /security | |
parent | 98e205d9ade512a046b102e5b2439f2a2deb2a0e (diff) | |
download | ports-0a874bc5f91096147fea226c540200ac3c607949.tar.gz ports-0a874bc5f91096147fea226c540200ac3c607949.zip |
Notes
Diffstat (limited to 'security')
-rw-r--r-- | security/pfw/Makefile | 30 | ||||
-rw-r--r-- | security/pfw/distinfo | 6 | ||||
-rw-r--r-- | security/pfw/files/pkg-message.in | 21 | ||||
-rw-r--r-- | security/pfw/pkg-plist | 131 |
4 files changed, 120 insertions, 68 deletions
diff --git a/security/pfw/Makefile b/security/pfw/Makefile index 301b609adcb9..dc9b6952fb4d 100644 --- a/security/pfw/Makefile +++ b/security/pfw/Makefile @@ -6,7 +6,7 @@ # PORTNAME= pfw -PORTVERSION= 0.6.2 +PORTVERSION= 0.7.1 CATEGORIES= security www MASTER_SITES= http://www.allard.nu/pfw/download/ EXTRACT_SUFX= .tgz @@ -18,14 +18,20 @@ RUN_DEPENDS= sudo:${PORTSDIR}/security/sudo WRKSRC= ${WRKDIR}/${PORTNAME} -USE_PHP= session pcre +USE_PHP= session pcre sqlite WANT_PHP_WEB= yes +DEFAULT_PHP_VER=5 +BROKEN_WITH_PHP=4 NO_BUILD= yes PFW_PREFIX?= ${PREFIX}/www/pfw SUB_FILES= pkg-message SUB_LIST= PFW_PREFIX=${PFW_PREFIX} +BINFILES= commandwrapper.sh packetfilter.sh +CPDIRS= lib web include test +PORTDOCS= INSTALL README README_TEST + .include <bsd.port.pre.mk> .if ${OSVERSION} < 502105 @@ -33,14 +39,26 @@ IGNORE= pf is only in 5.x and newer .endif do-install: -.for dir in lib web + ${MKDIR} ${PFW_PREFIX} + ${INSTALL_DATA} ${WRKSRC}/include.inc.php ${PFW_PREFIX} +.for dir in ${CPDIRS} @${MKDIR} ${PFW_PREFIX}/${dir} @${CP} -Rv ${WRKSRC}/${dir}/* ${PFW_PREFIX}/${dir} .endfor - @${CP} -v ${WRKSRC}/INSTALL ${WRKSRC}/README ${PFW_PREFIX} @${MKDIR} ${PFW_PREFIX}/bin - ${INSTALL_SCRIPT} ${WRKSRC}/bin/pfctlwrapper.sh.remote ${PFW_PREFIX}/bin - ${INSTALL_SCRIPT} ${WRKSRC}/bin/pfctlwrapper.sh ${PFW_PREFIX}/bin +.for f in ${BINFILES} + ${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} ${PFW_PREFIX}/bin +.endfor + @${MKDIR} ${DATADIR} + ${CP} ${WRKSRC}/docs/sql/sqlite.sql ${DATADIR} +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} +. for f in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/docs/${f} ${DOCSDIR} +. endfor +.endif + ${MKDIR} ${PFW_PREFIX}/conf + ${CHOWN} www:www ${PFW_PREFIX}/conf post-install: @${CAT} ${PKGMESSAGE} diff --git a/security/pfw/distinfo b/security/pfw/distinfo index b367ab2e97bb..19798bbe2aca 100644 --- a/security/pfw/distinfo +++ b/security/pfw/distinfo @@ -1,3 +1,3 @@ -MD5 (pfw-0.6.2.tgz) = 4a0572e067fc9895ec3cbbbc98fbf01e -SHA256 (pfw-0.6.2.tgz) = b8f7dffe18cbb2a2aebf316f3e2abe6e317fd104d70be9d03b34625d55399f10 -SIZE (pfw-0.6.2.tgz) = 66435 +MD5 (pfw-0.7.1.tgz) = 7dde52a7b9dfdf5d7f8cf21ba9ea579c +SHA256 (pfw-0.7.1.tgz) = 201cd9a5ab5dfaac6d0ac906ea8c370be0c10e0d739ad4a26ac6c6b8918240f3 +SIZE (pfw-0.7.1.tgz) = 79326 diff --git a/security/pfw/files/pkg-message.in b/security/pfw/files/pkg-message.in index 2f03fd25506b..f26dd2fd0b1d 100644 --- a/security/pfw/files/pkg-message.in +++ b/security/pfw/files/pkg-message.in @@ -1,29 +1,36 @@ ATTENTION: -1) pfw needs Apache to run in non-chrooted mode (otherwise, we can't +1) Create database to store configurations: +sqlite %%PFW_PREFIX%%/conf/config.db < %%DATADIR%%/sqlite.sql + +3) pfw needs Apache to run in non-chrooted mode (otherwise, we can't access /etc/pf.conf). -2) pfw relies on sudo to perform privileged operations and sudo needs to +3) pfw relies on sudo to perform privileged operations and sudo needs to be configured for this. You need to add a line like this: + www ALL = NOPASSWD: %%PFW_PREFIX%%/bin/* + to your %%LOCALBASE%%/etc/sudoers file (edit with visudo). Feel free to verify the scripts in the bin directory to see that they don't do anything nasty before doing this :-) -3) There is currently no builtin authentication in pfw so please read +4) There is currently no builtin authentication in pfw so please read http://httpd.apache.org/docs/howto/auth.html and add authentication accordingly. -4) Add the following line to your httpd.conf: +5) Add the following line to your httpd.conf: Alias /pfw/ "%%PFW_PREFIX%%/web/" +<Directory "%%PFW_PREFIX%%/web"> + AllowOverride None + Order allow,deny + Allow from 127.0.0.1 +</Directory> Restart apache and access pfw as http://localhost/pfw/ -5) If you want to use pfw to update a remote pfw, please read the -documentation in %%PFW_PREFIX%%/bin/pfwctlwrapper.sh.remote. - That's it. Pfw is now installed and ready to be used. Enjoy! diff --git a/security/pfw/pkg-plist b/security/pfw/pkg-plist index 50ad0f99b537..39fa9e783849 100644 --- a/security/pfw/pkg-plist +++ b/security/pfw/pkg-plist @@ -1,58 +1,85 @@ @comment $FreeBSD$ -www/pfw/INSTALL -www/pfw/README -www/pfw/bin/pfctlwrapper.sh -www/pfw/bin/pfctlwrapper.sh.remote -www/pfw/lib/altq.class.php -www/pfw/lib/anchor.class.php -www/pfw/lib/filter.class.php -www/pfw/lib/macro.class.php -www/pfw/lib/nat.class.php -www/pfw/lib/options.class.php -www/pfw/lib/pf.class.php -www/pfw/lib/queue.class.php -www/pfw/lib/rules.class.php -www/pfw/lib/scrub.class.php -www/pfw/lib/table.class.php -www/pfw/web/altq.php -www/pfw/web/altqedit.php -www/pfw/web/anchor.php -www/pfw/web/anchoredit.php -www/pfw/web/anchorloadedit.php -www/pfw/web/commentedit.php -www/pfw/web/config.php -www/pfw/web/filter.php -www/pfw/web/filteredit.php -www/pfw/web/include.inc.php +www/pfw/include.inc.php +www/pfw/bin/commandwrapper.sh +www/pfw/bin/packetfilter.sh +www/pfw/include/packetfilter.inc.php +www/pfw/lib/packetfilter/altq.class.php +www/pfw/lib/packetfilter/anchor.class.php +www/pfw/lib/packetfilter/filter.class.php +www/pfw/lib/packetfilter/macro.class.php +www/pfw/lib/packetfilter/nat.class.php +www/pfw/lib/packetfilter/options.class.php +www/pfw/lib/packetfilter/pf.class.php +www/pfw/lib/packetfilter/queue.class.php +www/pfw/lib/packetfilter/rules.class.php +www/pfw/lib/packetfilter/scrub.class.php +www/pfw/lib/packetfilter/table.class.php +www/pfw/test/packetfilter/unit/FilterTest.php +www/pfw/test/packetfilter/unit/NatTest.php +www/pfw/web/global_config/index.php +www/pfw/web/global_config/pfhosts.php +www/pfw/web/global_config/pfhostsedit.php www/pfw/web/index.php -www/pfw/web/install.php -www/pfw/web/macro.php -www/pfw/web/macroedit.php -www/pfw/web/manual/altq.php -www/pfw/web/manual/anchor.php -www/pfw/web/manual/filter.php -www/pfw/web/manual/macro.php -www/pfw/web/manual/nat.php -www/pfw/web/manual/options.php -www/pfw/web/manual/queue.php -www/pfw/web/manual/scrub.php -www/pfw/web/manual/table.php +www/pfw/web/log/index.php +www/pfw/web/log/realtime.php www/pfw/web/menu.php -www/pfw/web/nat.php -www/pfw/web/natedit.php -www/pfw/web/options.php -www/pfw/web/print.css -www/pfw/web/queue.php -www/pfw/web/queueedit.php -www/pfw/web/screen.css -www/pfw/web/scrub.php -www/pfw/web/scrubedit.php -www/pfw/web/table.php -www/pfw/web/tableedit.php -www/pfw/web/test.php -www/pfw/web/write.php +www/pfw/web/packetfilter/altq.php +www/pfw/web/packetfilter/altqedit.php +www/pfw/web/packetfilter/anchor.php +www/pfw/web/packetfilter/anchoredit.php +www/pfw/web/packetfilter/anchorloadedit.php +www/pfw/web/packetfilter/commentedit.php +www/pfw/web/packetfilter/files.php +www/pfw/web/packetfilter/filter.php +www/pfw/web/packetfilter/filteredit.php +www/pfw/web/packetfilter/index.php +www/pfw/web/packetfilter/install.php +www/pfw/web/packetfilter/macro.php +www/pfw/web/packetfilter/macroedit.php +www/pfw/web/packetfilter/manual/altq.php +www/pfw/web/packetfilter/manual/anchor.php +www/pfw/web/packetfilter/manual/filter.php +www/pfw/web/packetfilter/manual/macro.php +www/pfw/web/packetfilter/manual/nat.php +www/pfw/web/packetfilter/manual/options.php +www/pfw/web/packetfilter/manual/queue.php +www/pfw/web/packetfilter/manual/scrub.php +www/pfw/web/packetfilter/manual/table.php +www/pfw/web/packetfilter/nat.php +www/pfw/web/packetfilter/natedit.php +www/pfw/web/packetfilter/options.php +www/pfw/web/packetfilter/queue.php +www/pfw/web/packetfilter/queueedit.php +www/pfw/web/packetfilter/screen.css +www/pfw/web/packetfilter/scrub.php +www/pfw/web/packetfilter/scrubedit.php +www/pfw/web/packetfilter/submenu.inc.php +www/pfw/web/packetfilter/table.php +www/pfw/web/packetfilter/tableedit.php +www/pfw/web/packetfilter/test.php +www/pfw/web/packetfilter/write.php +www/pfw/web/status/index.php +www/pfw/web/status/queues.php +www/pfw/web/status/states.php +www/pfw/web/status/submenu.inc.php +www/pfw/web/status/systemstatus.php +www/pfw/web/stylesheet/print.css +www/pfw/web/stylesheet/screen.css +%%DATADIR%%/sqlite.sql +@dirrm %%DATADIR%% @dirrm www/pfw/bin +@dirrmtry www/pfw/conf +@dirrm www/pfw/include +@dirrm www/pfw/lib/packetfilter @dirrm www/pfw/lib -@dirrm www/pfw/web/manual +@dirrm www/pfw/test/packetfilter/unit +@dirrm www/pfw/test/packetfilter +@dirrm www/pfw/test +@dirrm www/pfw/web/global_config +@dirrm www/pfw/web/log +@dirrm www/pfw/web/packetfilter/manual +@dirrm www/pfw/web/packetfilter +@dirrm www/pfw/web/status +@dirrm www/pfw/web/stylesheet @dirrm www/pfw/web -@dirrm www/pfw +@dirrmtry www/pfw |