[Patch] Memory lock executable at load time

Florian Weimer Weimer@CERT.Uni-Stuttgart.DE
Sat May 4 14:54:00 GMT 2002


Corey Minyard <minyard@acm.org> writes:

> @@ -1357,6 +1457,12 @@
>  	  if (!__libc_enable_secure
>  	      && memcmp (&envline[3], "ORIGIN_PATH", 11) == 0)
>  	    _dl_origin_path = &envline[15];
> +
> +	  if (memcmp (&envline[3], "LOCK_MEMORY", 11) == 0)
> +	    if (strcmp(&envline[15], "MLOCK") == 0)
> +	      _dl_locked_load_mode = (RTLD_LOCK_LIB_PAGES | RTLD_LOCK_MLOCK);
> +	    else if (strcmp(&envline[15], "READ") == 0)
> +	      _dl_locked_load_mode = (RTLD_LOCK_LIB_PAGES | RTLD_LOCK_READ);
>  	  break;

The mlock() feature should be guarded by !__libc_enable_secure, too,
shouldn't it?

-- 
Florian Weimer 	                  Weimer@CERT.Uni-Stuttgart.DE
University of Stuttgart           http://CERT.Uni-Stuttgart.DE/people/fw/
RUS-CERT                          +49-711-685-5973/fax +49-711-685-5898



More information about the Libc-alpha mailing list