aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-27 03:40:33 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-27 03:40:33 +0000
commiteec8b6cae586451deadf30c371f7b5e4c9d573d1 (patch)
treeb005437b5b7d69778e06694e4bd836a3e7c42f6a /sysdeps/generic
parent17c263876bf38178d3a4ba720bf81d7a214bba51 (diff)
downloadglibc-eec8b6cae586451deadf30c371f7b5e4c9d573d1.tar
glibc-eec8b6cae586451deadf30c371f7b5e4c9d573d1.tar.gz
glibc-eec8b6cae586451deadf30c371f7b5e4c9d573d1.tar.bz2
glibc-eec8b6cae586451deadf30c371f7b5e4c9d573d1.zip
Update.
2004-03-26 Ulrich Drepper <drepper@redhat.com> * elf/dl-caller.c: New file. * include/caller.h: New file. * Makefile (distribute): Add include/caller.h. * elf/Makefile (dl-routines): Add dl-caller. * elf/dl-load.c (_dl_map_object_from_fd): Record l_text_end. * elf/dl-open.c (check_libc_caller): Removed. (dl_open_worker): Use __check_caller instead. * elf/rtld.c (_rtld_global_ro): Initialize _dl_check_caller. (_dl_start_final): Record l_text_end for ld.so map. (dl_main): Record l_text_end for main object and vdso. * include/link.h (struct link_map): Add l_text_end field. * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Add _dl_check_caller field. Define enum allowmask. Add declaration of _dl_check_caller. * sysdeps/unix/sysv/linux/dl-execstack.c: Also use __check_caller test.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/ldsodefs.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 4ff8bbf217..53c3290e01 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -171,6 +171,17 @@ struct libname_list
};
+/* Bit masks for the objects which valid callers can come from to
+ functions with restricted interface. */
+enum allowmask
+ {
+ allow_libc = 1,
+ allow_libdl = 2,
+ allow_libpthread = 4,
+ allow_ldso = 8
+ };
+
+
/* Test whether given NAME matches any of the names of the given object. */
extern int _dl_name_match_p (const char *__name, struct link_map *__map)
internal_function;
@@ -492,6 +503,7 @@ struct rtld_global_ro
const struct r_found_version *,
int, int,
struct link_map *);
+ int (*_dl_check_caller) (const void *, enum allowmask);
};
# define __rtld_global_attribute__
@@ -878,6 +890,10 @@ extern size_t _dl_dst_count (const char *name, int is_path) attribute_hidden;
extern char *_dl_dst_substitute (struct link_map *l, const char *name,
char *result, int is_path) attribute_hidden;
+/* Check validity of the caller. */
+extern int _dl_check_caller (const void *caller, enum allowmask mask)
+ attribute_hidden;
+
__END_DECLS
#endif /* ldsodefs.h */