/[gentoo-x86]/eclass/pax-utils.eclass
Gentoo

Diff of /eclass/pax-utils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.12 Revision 1.13
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/pax-utils.eclass,v 1.12 2011/07/02 17:03:51 blueness Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/pax-utils.eclass,v 1.13 2011/07/03 21:17:10 blueness Exp $
4 4
5# @ECLASS: pax-utils.eclass 5# @ECLASS: pax-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Maintained by 7# Maintained by
8# The Gentoo Linux Hardened Team <hardened@gentoo.org> 8# The Gentoo Linux Hardened Team <hardened@gentoo.org>
22# contain either "PT" or "none". If PAX_MARKINGS is set to "PT", and the 22# contain either "PT" or "none". If PAX_MARKINGS is set to "PT", and the
23# necessary utility is installed, the PT_PAX_FLAGS markings will be made. If 23# necessary utility is installed, the PT_PAX_FLAGS markings will be made. If
24# PAX_MARKINGS is set to "none", no markings will be made. 24# PAX_MARKINGS is set to "none", no markings will be made.
25 25
26inherit eutils 26inherit eutils
27
28IUSE="hardened"
29
30DEPEND="hardened? ( app-misc/pax-utils
31 sys-apps/paxctl )"
32 27
33# Default to PT markings. 28# Default to PT markings.
34PAX_MARKINGS=${PAX_MARKINGS:="PT"} 29PAX_MARKINGS=${PAX_MARKINGS:="PT"}
35 30
36# @FUNCTION: pax-mark 31# @FUNCTION: pax-mark
54# 49#
55# Please confirm any relaxation of restrictions with the Gentoo Hardened team. 50# Please confirm any relaxation of restrictions with the Gentoo Hardened team.
56# Either ask on the gentoo-hardened mailing list, or CC/assign hardened@g.o on 51# Either ask on the gentoo-hardened mailing list, or CC/assign hardened@g.o on
57# the bug report. 52# the bug report.
58pax-mark() { 53pax-mark() {
59 # It doesn't make sense to pax-mark on non-hardened systems
60 # so we'll just do nothing.
61 use hardened || return 0;
62
63 local f flags fail=0 failures="" zero_load_alignment 54 local f flags fail=0 failures="" zero_load_alignment
64 # Ignore '-' characters - in particular so that it doesn't matter if 55 # Ignore '-' characters - in particular so that it doesn't matter if
65 # the caller prefixes with - 56 # the caller prefixes with -
66 flags=${1//-} 57 flags=${1//-}
67 shift 58 shift

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20