From 7655843ab5908cca32d7a7f06f02fbad3069860b Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 21 Jul 2009 15:00:18 +0200 Subject: [PATCH] enumerate executable sections only to build checksum --- src/libstrongswan/integrity_checker.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libstrongswan/integrity_checker.c b/src/libstrongswan/integrity_checker.c index 9ad87833e..6a402b358 100644 --- a/src/libstrongswan/integrity_checker.c +++ b/src/libstrongswan/integrity_checker.c @@ -113,8 +113,7 @@ static int callback(struct dl_phdr_info *dlpi, size_t size, Dl_info *dli) const ElfW(Phdr) *sgmt = &dlpi->dlpi_phdr[i]; /* we are interested in the executable LOAD segment */ - if (sgmt->p_type == PT_LOAD && - (sgmt->p_flags & (PF_X | PF_R))) + if (sgmt->p_type == PT_LOAD && (sgmt->p_flags & PF_X)) { /* safe begin of segment in dli_fbase */ dli->dli_fbase = (void*)sgmt->p_vaddr + dlpi->dlpi_addr;