diff options
author | Wolfram Schlich <wschlich@gentoo.org> | 2012-03-11 12:02:27 +0000 |
---|---|---|
committer | Wolfram Schlich <wschlich@gentoo.org> | 2012-03-11 12:02:27 +0000 |
commit | fe785879862cc7565245b0ef9bfe4f4b9b3f82b0 (patch) | |
tree | 721fd73d65f36553efd510478c1ee18e48b42e56 /app-admin | |
parent | x86 stable wrt security bug #407755 (diff) | |
download | gentoo-2-fe785879862cc7565245b0ef9bfe4f4b9b3f82b0.tar.gz gentoo-2-fe785879862cc7565245b0ef9bfe4f4b9b3f82b0.tar.bz2 gentoo-2-fe785879862cc7565245b0ef9bfe4f4b9b3f82b0.zip |
respect LDFLAGS wrt bug #337351
(Portage version: 2.2.0_alpha90/cvs/Linux x86_64)
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/sysrqd/ChangeLog | 10 | ||||
-rw-r--r-- | app-admin/sysrqd/files/sysrqd-config.patch | 13 | ||||
-rw-r--r-- | app-admin/sysrqd/sysrqd-14.ebuild | 56 |
3 files changed, 77 insertions, 2 deletions
diff --git a/app-admin/sysrqd/ChangeLog b/app-admin/sysrqd/ChangeLog index bbb76a10102b..9c46d0c45255 100644 --- a/app-admin/sysrqd/ChangeLog +++ b/app-admin/sysrqd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-admin/sysrqd -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/sysrqd/ChangeLog,v 1.5 2009/11/16 10:00:26 wschlich Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/sysrqd/ChangeLog,v 1.6 2012/03/11 12:02:27 wschlich Exp $ + +*sysrqd-14 (11 Mar 2012) + + 11 Mar 2012; Wolfram Schlich <wschlich@gentoo.org> +sysrqd-14.ebuild, + +files/sysrqd-config.patch: + respect LDFLAGS wrt bug #337351 *sysrqd-12 (16 Nov 2009) diff --git a/app-admin/sysrqd/files/sysrqd-config.patch b/app-admin/sysrqd/files/sysrqd-config.patch new file mode 100644 index 000000000000..ce463814d1e3 --- /dev/null +++ b/app-admin/sysrqd/files/sysrqd-config.patch @@ -0,0 +1,13 @@ +--- sysrqd.c.orig 2009-11-05 14:58:21.644471772 +0100 ++++ sysrqd.c 2009-11-05 14:58:43.276472005 +0100 +@@ -40,8 +40,8 @@ + #define BIND_MAX_LEN 16 + #define PROMPT "sysrq> " + #define SYSRQ_TRIGGER_PATH "/proc/sysrq-trigger" +-#define AUTH_FILE "/etc/sysrqd.secret" +-#define BINDIP_FILE "/etc/sysrqd.bind" ++#define AUTH_FILE "/etc/sysrqd/sysrqd.secret" ++#define BINDIP_FILE "/etc/sysrqd/sysrqd.bind" + #define PID_FILE "/var/run/sysrqd.pid" + #define SYSRQD_PRIO -19 + #define SYSRQD_LISTEN_PORT 4094 diff --git a/app-admin/sysrqd/sysrqd-14.ebuild b/app-admin/sysrqd/sysrqd-14.ebuild new file mode 100644 index 000000000000..c41f663b1ae2 --- /dev/null +++ b/app-admin/sysrqd/sysrqd-14.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/sysrqd/sysrqd-14.ebuild,v 1.1 2012/03/11 12:02:27 wschlich Exp $ + +inherit eutils toolchain-funcs + +IUSE="" +DESCRIPTION="daemon providing access to the kernel sysrq functions via network" +HOMEPAGE="http://julien.danjou.info/sysrqd.html" +#SRC_URI="http://julien.danjou.info/${PN}/${P}.tar.gz" +SRC_URI="http://dev.gentoo.org/~wschlich/src/${CATEGORY}/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +DEPEND="" +RDEPEND="${DEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${PN}-config.patch" +} + +src_compile() { + $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o sysrqd sysrqd.c +} + +src_install() { + dosbin sysrqd + newinitd "${FILESDIR}/sysrqd.init" sysrqd + + local bindip='127.0.0.1' secret + declare -i secret + let secret=${RANDOM}*${RANDOM}*${RANDOM}*${RANDOM} + echo ${bindip} > sysrqd.bind + echo ${secret} > sysrqd.secret + + diropts -m 0700 -o root -g root + dodir /etc/sysrqd + insinto /etc/sysrqd + insopts -m 0600 -o root -g root + doins sysrqd.bind + doins sysrqd.secret + + dodoc README ChangeLog +} + +pkg_postinst() { + elog + elog "Be sure to change the initial secret in /etc/sysrqd/sysrqd.secret !" + elog "As a security precaution, sysrqd is configured to only listen on" + elog "127.0.0.1 by default. Change the content of /etc/sysrqd/sysrqd.bind" + elog "to an IPv4 address you want it to listen on or remove the file" + elog "to make it listen on any IP address (0.0.0.0)." + elog +} |