Gentoo Archives: gentoo-hardened

From: Alex Efros <powerman@××××××××××××××××××.com>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] persistent paxctl -m?
Date: Thu, 09 Apr 2009 16:14:33
Message-Id: 20090409161411.GD2531@home.power
In Reply to: [gentoo-hardened] persistent paxctl -m? by Grant
1 Hi!
2
3 On Thu, Apr 09, 2009 at 09:07:39AM -0700, Grant wrote:
4 > I seem to need to remember to paxctl -m the firefox binary whenever I
5 > upgrade firefox. This inevitably leads to a browser crash and lost
6 > time/info. Can I set up paxctl -m to persist, even if firefox is
7 > upgraded?
8
9 Put this into your /etc/portage/bashrc:
10 ---cut---
11 if [ "x${EBUILD_PHASE}" != "x" ]; then
12 if [ -x "/etc/portage/bashrc.d/${CATEGORY}/${PF}.${EBUILD_PHASE}" ]; then
13 source "/etc/portage/bashrc.d/${CATEGORY}/${PF}.${EBUILD_PHASE}"
14 elif [ -x "/etc/portage/bashrc.d/${CATEGORY}/${P}.${EBUILD_PHASE}" ]; then
15 source "/etc/portage/bashrc.d/${CATEGORY}/${P}.${EBUILD_PHASE}"
16 elif [ -x "/etc/portage/bashrc.d/${CATEGORY}/${PN}.${EBUILD_PHASE}" ]; then
17 source "/etc/portage/bashrc.d/${CATEGORY}/${PN}.${EBUILD_PHASE}"
18 fi
19 fi
20 ---cut---
21
22 Next, create directory:
23 mkdir -p /etc/portage/bashrc.d/www-client/
24
25 and create executable shell script in that dir: mozilla-firefox-bin.postinst
26 ---cut---
27 #!/bin/bash
28 ewarn "Running chpax -m /opt/firefox/firefox-bin to avoid crash on flash!"
29 chpax -m /opt/firefox/firefox-bin
30 ---cut---
31
32 --
33 WBR, Alex.

Replies

Subject Author
Re: [gentoo-hardened] persistent paxctl -m? Alex Efros <powerman@××××××××××××××××××.com>