about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-19 21:45:14 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-19 21:45:14 +0000
commit1866ae945547e8ebf978b1f5760661239f2513a6 (patch)
tree0fb415a53879b6b05e3bb8d8a611116c3741d20b /sysdeps
parent708c687a6f64bf7ea5dec46b28073fc8eacec1ca (diff)
downloadglibc-1866ae945547e8ebf978b1f5760661239f2513a6.tar.gz
glibc-1866ae945547e8ebf978b1f5760661239f2513a6.tar.xz
glibc-1866ae945547e8ebf978b1f5760661239f2513a6.zip
Update.
2004-10-19  Alfred M. Szmidt  <ams@gnu.org>

	* sysdeps/generic/readonly-area.c (__readonly_str): Renamed to ...
	(__readonly_area): ... this.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/readonly-area.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sysdeps/generic/readonly-area.c b/sysdeps/generic/readonly-area.c
index df5b96015c..4b8172f193 100644
--- a/sysdeps/generic/readonly-area.c
+++ b/sysdeps/generic/readonly-area.c
@@ -16,14 +16,19 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <stdlib.h>
+
 /* Return 1 if the whole area PTR .. PTR+SIZE is not writable.
    Return -1 if it is writable.  */
 
-#include <stdlib.h>
-
 int
-__readonly_str (const void *ptr, size_t size)
+__readonly_area (const void *ptr, size_t size)
 {
-  /* The conservative answer is that all strings are writable.  */
-  return -1;
+  /* We cannot determine in general whether memory is writable or not.
+     This must be handled in a system-dependent manner.  to not
+     unconditionally break code we need to return here a positive
+     answer.  This disables this security measure but that is the
+     price people have to pay for using systems without a real
+     implementation of this interface.  */
+  return 1;
 }