]> git.ipfire.org Git - people/stevee/pakfire.git/blame - src/quality-agent/050-relro
Use autotools.
[people/stevee/pakfire.git] / src / quality-agent / 050-relro
CommitLineData
f165e102
MT
1#!/bin/bash
2
3. $(dirname ${0})/qa-include
4
5DESC="Text relocations force the dynamic linker to perform extra \
6 work at startup, waste system resources, and may pose a security \
7 risk. On some architectures, the code may not even function \
8 properly, if at all."
9
10function check() {
11 local failed=0
12
13 local file
14 for file in $(find_elf_files --prefix=${BUILDROOT} ${BINARY_PATHS}); do
15 if filter_startfiles ${file}; then
16 continue
17 fi
18
19 # Skip all files that are not a shared object.
20 file_is_shared_object ${file} || continue
21
22 if ! file_is_relro_full ${file}; then
23 if [ "${QUALITY_AGENT_PERMIT_NOT_FULL_RELRO}" = "yes" ]; then
24 log_warning " Is not full relro: ${file}"
25 else
26 log_error " Is not relro: ${file}"
27 failed=1
28 fi
29 fi
30 done
31
32 return ${failed}
33}
34
35run