mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-18 14:01:59 +01:00
Do not erronously export 'openat' symbol from rtld.
The symbol leaked after r276630 since lib/libc/sys/openat.c defines versions for openat using .symver (version script cannot assign two versions to one symbol), and rtld uses openat. Instead, directly use __sys_openat(). Reported and tested by: antoine Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
c6f7b90092
commit
0c5cba543b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276646
@ -166,6 +166,8 @@ static bool matched_symbol(SymLook *, const Obj_Entry *, Sym_Match_Result *,
|
||||
void r_debug_state(struct r_debug *, struct link_map *) __noinline;
|
||||
void _r_debug_postinit(struct link_map *) __noinline;
|
||||
|
||||
int __sys_openat(int, const char *, int, ...);
|
||||
|
||||
/*
|
||||
* Data declarations.
|
||||
*/
|
||||
@ -2824,7 +2826,7 @@ search_library_pathfds(const char *name, const char *path, int *fdp)
|
||||
dirfd = parse_libdir(fdstr);
|
||||
if (dirfd < 0)
|
||||
break;
|
||||
fd = openat(dirfd, name, O_RDONLY | O_CLOEXEC);
|
||||
fd = __sys_openat(dirfd, name, O_RDONLY | O_CLOEXEC);
|
||||
if (fd >= 0) {
|
||||
*fdp = fd;
|
||||
len = strlen(fdstr) + strlen(name) + 3;
|
||||
|
Loading…
Reference in New Issue
Block a user