diff options
author | Roland McGrath <roland@gnu.org> | 2005-04-26 04:26:13 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2005-04-26 04:26:13 +0000 |
commit | b34cbd1428405d1c64b071364bc90fe064b8b0c9 (patch) | |
tree | b8ab1a9852b47852641e2de9e97c5f7d63a6cb60 | |
parent | 5949daa081392aa2a250aa5064b715e97aa9acb8 (diff) | |
download | glibc-b34cbd1428405d1c64b071364bc90fe064b8b0c9.zip glibc-b34cbd1428405d1c64b071364bc90fe064b8b0c9.tar.gz glibc-b34cbd1428405d1c64b071364bc90fe064b8b0c9.tar.bz2 |
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
(INTERNAL_SYSCALL_ERROR_P): Fix typo in last change.
* sunrpc/xdr.c (xdr_u_int): Use `long' for L and cast where needed.
* elf/dl-load.c: Revert last change.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | elf/dl-load.c | 8 | ||||
-rw-r--r-- | sunrpc/xdr.c | 4 |
3 files changed, 18 insertions, 3 deletions
@@ -1,3 +1,12 @@ +2005-04-25 Roland McGrath <roland@redhat.com> + + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h + (INTERNAL_SYSCALL_ERROR_P): Fix typo in last change. + + * sunrpc/xdr.c (xdr_u_int): Use `long' for L and cast where needed. + + * elf/dl-load.c: Revert last change. + 2005-04-24 Ulrich Drepper <drepper@redhat.com> * stdio-common/vfscanf.c: Fix parsing of decimal point after +-. diff --git a/elf/dl-load.c b/elf/dl-load.c index 0d3fbb4..d8b3a56 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -55,6 +55,12 @@ # define MAP_COPY MAP_PRIVATE #endif +/* We want to prevent people from modifying DSOs which are currently in + use. This is what MAP_DENYWRITE is for. */ +#ifndef MAP_DENYWRITE +# define MAP_DENYWRITE 0 +#endif + /* Some systems link their relocatable objects for another base address than 0. We want to know the base address for these such that we can subtract this address from the segment addresses during mapping. @@ -1175,7 +1181,7 @@ cannot allocate TLS data structures for initial thread"); /* Remember which part of the address space this object uses. */ l->l_map_start = (ElfW(Addr)) __mmap ((void *) mappref, maplength, c->prot, - MAP_COPY | MAP_FILE, + MAP_COPY|MAP_FILE|MAP_DENYWRITE, fd, c->mapoff); if (__builtin_expect ((void *) l->l_map_start == MAP_FAILED, 0)) { diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index 2f894fb..411cbe1 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -131,7 +131,7 @@ bool_t xdr_u_int (XDR *xdrs, u_int *up) { #if UINT_MAX < ULONG_MAX - u_long l; + long l; switch (xdrs->x_op) { @@ -144,7 +144,7 @@ xdr_u_int (XDR *xdrs, u_int *up) { return FALSE; } - *up = (u_int) l; + *up = (u_int) (u_long) l; case XDR_FREE: return TRUE; } |