From: PPed72 Date: Fri, 23 Dec 2016 13:09:45 +0000 (+0100) Subject: sci-mathematics/gimps: Fix potential privilege escalation through hardlinks in config... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=5676e8711c2164af9ed300213e3acbabeb8d3700;p=gentoo.git sci-mathematics/gimps: Fix potential privilege escalation through hardlinks in configuration directory. Gentoo-bug: https://bugs.gentoo.org/show_bug.cgi?id=603408 Signed-off-by: Michael Orlitzky --- diff --git a/sci-mathematics/gimps/files/gimps-26.6-r1-init.d b/sci-mathematics/gimps/files/gimps-28.9-init.d similarity index 82% rename from sci-mathematics/gimps/files/gimps-26.6-r1-init.d rename to sci-mathematics/gimps/files/gimps-28.9-init.d index 73ef6a962ed9..00eca8268055 100644 --- a/sci-mathematics/gimps/files/gimps-26.6-r1-init.d +++ b/sci-mathematics/gimps/files/gimps-28.9-init.d @@ -7,12 +7,7 @@ depend() { } checkconfig() { - if [ ! -e "${GIMPS_DIR}" ]; then - einfo "Creating ${GIMPS_DIR}" - /bin/mkdir "${GIMPS_DIR}" - fi - - /bin/chown -R ${USER}:${GROUP} ${GIMPS_DIR} + checkpath -d -o ${USER}:${GROUP} ${GIMPS_DIR} if [ ! -e "${GIMPS_DIR}/local.txt" ]; then eerror "GIMPS has not been configured. Please configure it manually before" diff --git a/sci-mathematics/gimps/gimps-28.10.ebuild b/sci-mathematics/gimps/gimps-28.10.ebuild index d92f5fbab038..34a48f2091c0 100644 --- a/sci-mathematics/gimps/gimps-28.10.ebuild +++ b/sci-mathematics/gimps/gimps-28.10.ebuild @@ -40,7 +40,7 @@ src_install() { einstalldocs - newinitd "${FILESDIR}/${PN}-26.6-r1-init.d" gimps + newinitd "${FILESDIR}/${PN}-28.9-init.d" gimps newconfd "${FILESDIR}/${PN}-25.6-conf.d" gimps systemd_dounit "${FILESDIR}/${PN}.service" diff --git a/sci-mathematics/gimps/gimps-28.9.ebuild b/sci-mathematics/gimps/gimps-28.9.ebuild index 6e0d02e2586c..d4773204c25f 100644 --- a/sci-mathematics/gimps/gimps-28.9.ebuild +++ b/sci-mathematics/gimps/gimps-28.9.ebuild @@ -40,7 +40,7 @@ src_install() { einstalldocs - newinitd "${FILESDIR}/${PN}-26.6-r1-init.d" gimps + newinitd "${FILESDIR}/${PN}-28.9-init.d" gimps newconfd "${FILESDIR}/${PN}-25.6-conf.d" gimps systemd_dounit "${FILESDIR}/${PN}.service"