]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Tests pass with mprotect enabled locally... let's see if it works with CI now
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 14 May 2024 00:48:46 +0000 (18:48 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 14 May 2024 00:48:46 +0000 (18:48 -0600)
src/lib/server/module.c

index c073e78b106365f521159623a7f045349c73550d..b6af4e28e867bdd9d9296a061f90808434762bf9 100644 (file)
@@ -626,12 +626,10 @@ int module_data_protect(module_instance_t *mi, module_data_pool_t *pool)
 
        DEBUG3("Protecting data %s %p-%p", mi->name, pool->start, (uint8_t *)pool->start + pool->len);
 
-#if 0
        if (unlikely(mprotect(pool->start, pool->len, PROT_READ) < 0)) {
                fr_strerror_printf("Protecting \"%s\" module data failed: %s", mi->name, fr_syserror(errno));
                return -1;
        }
-#endif
 
        return 0;
 }
@@ -650,12 +648,10 @@ int module_data_unprotect(module_instance_t const *mi, module_data_pool_t const
 
        DEBUG3("Unprotecting data %s %p-%p", mi->name, pool->start, (uint8_t *)pool->start + pool->len);
 
-#if 0
        if (unlikely(mprotect(pool->start, pool->len, PROT_READ | PROT_WRITE) < 0)) {
                fr_strerror_printf("Unprotecting \"%s\" data failed: %s", mi->name, fr_syserror(errno));
                return -1;
        }
-#endif
 
        return 0;
 }