/[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.19 Revision 1.20
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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.19 2013/04/05 02:08:36 blueness Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/pax-utils.eclass,v 1.20 2013/04/09 23:43:53 zorry Exp $
4 4
5# @ECLASS: pax-utils.eclass 5# @ECLASS: pax-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# The Gentoo Linux Hardened Team <hardened@gentoo.org> 7# The Gentoo Linux Hardened Team <hardened@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
27 27
28# @ECLASS-VARIABLE: PAX_MARKINGS 28# @ECLASS-VARIABLE: PAX_MARKINGS
29# @DESCRIPTION: 29# @DESCRIPTION:
30# Control which markings are made: 30# Control which markings are made:
31# PT = PT_PAX markings, XT = XATTR_PAX markings 31# PT = PT_PAX markings, XT = XATTR_PAX markings
32# Default to both PT and XT markings. 32# Default to PT markings.
33PAX_MARKINGS=${PAX_MARKINGS:="PT XT"} 33PAX_MARKINGS=${PAX_MARKINGS:="PT"}
34 34
35# @FUNCTION: pax-mark 35# @FUNCTION: pax-mark
36# @USAGE: <flags> {<ELF files>} 36# @USAGE: <flags> {<ELF files>}
37# @RETURN: Shell true if we succeed, shell false otherwise 37# @RETURN: Shell true if we succeed, shell false otherwise
38# @DESCRIPTION: 38# @DESCRIPTION:
116 pt_failures="$*" 116 pt_failures="$*"
117 pt_fail=1 117 pt_fail=1
118 fi 118 fi
119 119
120 if [[ ${pt_fail} == 1 ]]; then 120 if [[ ${pt_fail} == 1 ]]; then
121 ewarn "Failed to set PT_PAX markings -${flags} for:" 121 elog "Failed to set PT_PAX markings -${flags} for:"
122 _pax_list_files ewarn ${pt_failures} 122 _pax_list_files elog ${pt_failures}
123 ret=1 123 ret=1
124 fi 124 fi
125 fi 125 fi
126 126
127 if has XT ${PAX_MARKINGS}; then 127 if has XT ${PAX_MARKINGS}; then
157 xt_failures="$*" 157 xt_failures="$*"
158 xt_fail=1 158 xt_fail=1
159 fi 159 fi
160 160
161 if [[ ${xt_fail} == 1 ]]; then 161 if [[ ${xt_fail} == 1 ]]; then
162 ewarn "Failed to set XATTR_PAX markings -${flags} for:" 162 elog "Failed to set XATTR_PAX markings -${flags} for:"
163 _pax_list_files ewarn ${xt_failures} 163 _pax_list_files elog ${xt_failures}
164 ret=1 164 ret=1
165 fi 165 fi
166 fi 166 fi
167 167
168 [[ ${ret} == 1 ]] && ewarn "Executables may be killed by PaX kernels." 168 # [[ ${ret} == 1 ]] && elog "Executables may be killed by PaX kernels."
169 169
170 return ${ret} 170 return ${ret}
171} 171}
172 172
173# @FUNCTION: list-paxables 173# @FUNCTION: list-paxables

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.20