]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
authorRoland McGrath <roland@gnu.org>
Tue, 26 Apr 2005 04:26:13 +0000 (04:26 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 26 Apr 2005 04:26:13 +0000 (04:26 +0000)
(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.

ChangeLog
elf/dl-load.c
sunrpc/xdr.c

index ab23fb40deacfd36988b19eed321267132decd66..c8dd4734dbbd4f9e1454f9b92b77dff3420fa968 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 +-.
index 0d3fbb425bcea9c1548835a0722ea21c0fae43c7..d8b3a56d0dd01904012e8ecd6be0798f5018c375 100644 (file)
 # 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))
          {
index 2f894fbba7e8070c364dc2475ed430f2cb0155aa..411cbe1ab1534efd04068a2506c4f9e79328474b 100644 (file)
@@ -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;
     }