This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [Patch] Memory lock executable at load time
- From: Florian Weimer <Weimer at CERT dot Uni-Stuttgart dot DE>
- To: libc-alpha at sources dot redhat dot com
- Date: Sat, 04 May 2002 23:53:45 +0200
- Subject: Re: [Patch] Memory lock executable at load time
- References: <3CD4075D.5080801@acm.org>
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