diff options
author | nia <nia@pkgsrc.org> | 2019-05-04 10:50:04 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2019-05-04 10:50:04 +0000 |
commit | 41cc8f0933669dfd731d0c153de3fcc8d2bc2f0e (patch) | |
tree | 561a00da65bfb4f38e5ace752f2a11f663cd6da9 /chat | |
parent | 9fc6f2b06bb96f6e6eadfd699c8c65d170097d6c (diff) | |
download | pkgsrc-41cc8f0933669dfd731d0c153de3fcc8d2bc2f0e.tar.gz |
chat/inspircd3: Create config dirs with OWN_DIRS and set permissions on
config files to be only readable to the inspircd user. Many of these files
contain sensitive information after configuration, e.g. keys and passwords.
Diffstat (limited to 'chat')
-rw-r--r-- | chat/inspircd3/Makefile | 60 | ||||
-rw-r--r-- | chat/inspircd3/PLIST | 3 |
2 files changed, 35 insertions, 28 deletions
diff --git a/chat/inspircd3/Makefile b/chat/inspircd3/Makefile index 30dfd0b7d36..22ac20a41c4 100644 --- a/chat/inspircd3/Makefile +++ b/chat/inspircd3/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.2 2019/05/03 19:03:02 nia Exp $ +# $NetBSD: Makefile,v 1.3 2019/05/04 10:50:04 nia Exp $ DISTNAME= inspircd-3.0.0 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= chat MASTER_SITES= ${MASTER_SITE_GITHUB:=inspircd/} GITHUB_TAG= v${PKGVERSION_NOREV} @@ -19,10 +19,12 @@ MAKE_FILE= GNUmakefile BUILD_DEFS+= PKG_SYSCONFDIR +PKG_SYSCONFSUBDIR= inspircd + CONFIGURE_ARGS+= --prefix=${PREFIX} CONFIGURE_ARGS+= --manual-dir=${PREFIX}/${PKGMANDIR}/man1 CONFIGURE_ARGS+= --module-dir=${PREFIX}/lib/inspircd/modules -CONFIGURE_ARGS+= --config-dir=${PKG_SYSCONFDIR}/inspircd +CONFIGURE_ARGS+= --config-dir=${PKG_SYSCONFDIR} CONFIGURE_ARGS+= --data-dir=${PREFIX}/inspircd/data CONFIGURE_ARGS+= --log-dir=${PREFIX}/inspircd/logs CONFIG_SHELL= ${PERL5} @@ -31,26 +33,6 @@ REPLACE_PERL+= tools/genssl .include "../../mk/bsd.prefs.mk" -CONF_FILES+= ${EGDIR}/motd.txt.example ${PKG_SYSCONFDIR}/inspircd/motd.txt -CONF_FILES+= ${EGDIR}/inspircd.conf.example ${PKG_SYSCONFDIR}/inspircd/inspircd.conf -CONF_FILES+= ${EGDIR}/links.conf.example ${PKG_SYSCONFDIR}/inspircd/links.conf -CONF_FILES+= ${EGDIR}/modules.conf.example ${PKG_SYSCONFDIR}/inspircd/modules.conf -CONF_FILES+= ${EGDIR}/opers.conf.example ${PKG_SYSCONFDIR}/inspircd/opers.conf -CONF_FILES+= ${EGDIR}/motd.txt.example ${PKG_SYSCONFDIR}/inspircd/motd.txt - -CONF_FILES+= ${EGDIR}/filter.conf.example ${PKG_SYSCONFDIR}/inspircd/filter.conf -CONF_FILES+= ${EGDIR}/helpop.conf.example ${PKG_SYSCONFDIR}/inspircd/helpop.conf -CONF_FILES+= ${EGDIR}/inspircd.conf.example ${PKG_SYSCONFDIR}/inspircd/inspircd.conf -CONF_FILES+= ${EGDIR}/links.conf.example ${PKG_SYSCONFDIR}/inspircd/links.conf -CONF_FILES+= ${EGDIR}/modules.conf.example ${PKG_SYSCONFDIR}/inspircd/modules.conf -CONF_FILES+= ${EGDIR}/motd.txt.example ${PKG_SYSCONFDIR}/inspircd/motd.txt -CONF_FILES+= ${EGDIR}/opermotd.txt.example ${PKG_SYSCONFDIR}/inspircd/opermotd.txt -CONF_FILES+= ${EGDIR}/opers.conf.example ${PKG_SYSCONFDIR}/inspircd/opers.conf -CONF_FILES+= ${EGDIR}/quotes.txt.example ${PKG_SYSCONFDIR}/inspircd/quotes.txt -CONF_FILES+= ${EGDIR}/services/anope.conf.example ${PKG_SYSCONFDIR}/inspircd/services/anope.conf -CONF_FILES+= ${EGDIR}/services/atheme.conf.example ${PKG_SYSCONFDIR}/inspircd/services/atheme.conf -CONF_FILES+= ${EGDIR}/services/generic.conf.example ${PKG_SYSCONFDIR}/inspircd/services/generic.conf - INSPIRCD_USER?= inspircd INSPIRCD_GROUP?= inspircd PKG_GROUPS= ${INSPIRCD_GROUP} @@ -61,14 +43,41 @@ PKG_USERS_VARS= INSPIRCD_GROUP FILES_SUBST+= INSPIRCD_GROUP=${INSPIRCD_GROUP:Q} FILES_SUBST+= INSPIRCD_USER=${INSPIRCD_USER:Q} +EGDIR= ${PREFIX}/share/examples/inspircd + +CONF_FILES_PERMS+= ${EGDIR}/inspircd.conf.example ${PKG_SYSCONFDIR}/inspircd.conf \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600 +CONF_FILES_PERMS+= ${EGDIR}/links.conf.example ${PKG_SYSCONFDIR}/links.conf \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600 +CONF_FILES_PERMS+= ${EGDIR}/modules.conf.example ${PKG_SYSCONFDIR}/modules.conf \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600 +CONF_FILES_PERMS+= ${EGDIR}/opers.conf.example ${PKG_SYSCONFDIR}/opers.conf \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600 +CONF_FILES_PERMS+= ${EGDIR}/filter.conf.example ${PKG_SYSCONFDIR}/filter.conf \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600 +CONF_FILES_PERMS+= ${EGDIR}/helpop.conf.example ${PKG_SYSCONFDIR}/helpop.conf \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600 +CONF_FILES_PERMS+= ${EGDIR}/motd.txt.example ${PKG_SYSCONFDIR}/motd.txt \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0644 +CONF_FILES_PERMS+= ${EGDIR}/opermotd.txt.example ${PKG_SYSCONFDIR}/opermotd.txt \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600 +CONF_FILES_PERMS+= ${EGDIR}/quotes.txt.example ${PKG_SYSCONFDIR}/quotes.txt \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0644 +CONF_FILES_PERMS+= ${EGDIR}/services/anope.conf.example ${PKG_SYSCONFDIR}/services/anope.conf \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600 +CONF_FILES_PERMS+= ${EGDIR}/services/atheme.conf.example ${PKG_SYSCONFDIR}/services/atheme.conf \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600 +CONF_FILES_PERMS+= ${EGDIR}/services/generic.conf.example ${PKG_SYSCONFDIR}/services/generic.conf \ + ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600 + OWN_DIRS_PERMS+= ${PREFIX}/inspircd ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755 OWN_DIRS_PERMS+= ${PREFIX}/inspircd/data ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755 OWN_DIRS_PERMS+= ${PREFIX}/inspircd/logs ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755 +OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR} ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755 +OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/services ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755 RCD_SCRIPTS= inspircd -EGDIR= ${PREFIX}/share/examples/inspircd - SUBST_CLASSES+= conf SUBST_STAGE.conf= pre-configure SUBST_MESSAGE.conf= Set variables in configuration file. @@ -78,7 +87,6 @@ SUBST_VARS.conf+= PREFIX INSTALLATION_DIRS+= ${EGDIR} INSTALLATION_DIRS+= ${EGDIR}/sql INSTALLATION_DIRS+= ${EGDIR}/services -INSTALLATION_DIRS+= ${PKG_SYSCONFDIR}/inspircd/services INSPIRCD_EXTRAS_OFF+= m_regex_re2.cpp INSPIRCD_EXTRAS_OFF+= m_regex_tre.cpp diff --git a/chat/inspircd3/PLIST b/chat/inspircd3/PLIST index 49ee061bb6b..c050324733e 100644 --- a/chat/inspircd3/PLIST +++ b/chat/inspircd3/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.1 2019/05/03 17:14:27 nia Exp $ +@comment $NetBSD: PLIST,v 1.2 2019/05/04 10:50:04 nia Exp $ bin/inspircd bin/inspircd-genssl lib/inspircd/modules/core_channel.so @@ -218,4 +218,3 @@ share/examples/inspircd/sql/sqloper.pgsql.sql share/examples/inspircd/sql/sqloper.sqlite3.sql @pkgdir inspircd/logs @pkgdir inspircd/data -@pkgdir etc/inspircd/services |