Sync code with last security fixes and improvements from OpenBSD
This commit is contained in:
parent
95114fbda2
commit
f5f0d5c82b
106 changed files with 371 additions and 1162 deletions
|
@ -106,7 +106,7 @@ ENTRY(_dl_bind_start)
|
|||
ldp x2, x3, [sp], #16
|
||||
ldp x0, x1, [sp], #16
|
||||
|
||||
// restore LR saved by PLT stub
|
||||
// restore LR saved by PLT stub
|
||||
ldp xzr, x30, [sp], #16
|
||||
br x17
|
||||
END(_dl_bind_start)
|
||||
|
|
|
@ -101,7 +101,7 @@ dlopen(const char *libname, int flags)
|
|||
object->obj_flags |= DF_1_NODELETE;
|
||||
object->nodelete = 1;
|
||||
}
|
||||
|
||||
|
||||
_dl_link_dlopen(object);
|
||||
|
||||
if (OBJECT_REF_CNT(object) > 1) {
|
||||
|
|
|
@ -781,7 +781,7 @@ _dl_rtld(elf_object_t *object)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* TEXTREL binaries are loaded without immutable on un-writeable sections.
|
||||
* After text relocations are finished, these regions can become
|
||||
* immutable. OPENBSD_MUTABLE section always overlaps writeable LOADs,
|
||||
|
|
|
@ -89,7 +89,7 @@ _dl_start:
|
|||
END(_dl_start)
|
||||
|
||||
ENTRY(_dl_bind_start)
|
||||
# r0 contains offset, do not overwrite
|
||||
# r0 contains offset, do not overwrite
|
||||
# r2 ld.so toc is loaded on entry to this function.
|
||||
mflr %r12
|
||||
std %r12,16(%r1) # save lr
|
||||
|
|
|
@ -612,7 +612,7 @@ _dl_find_symbol_obj(elf_object_t *obj, struct symlookup *sl)
|
|||
if (((*hashval ^ hash) >> 1) == 0) {
|
||||
const Elf_Sym *sym = symt +
|
||||
(hashval - obj->chains_gnu);
|
||||
|
||||
|
||||
int r = matched_symbol(obj, sym, sl);
|
||||
if (r)
|
||||
return r > 0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# $OpenBSD: Makefile,v 1.1 2011/03/23 21:13:27 schwarze Exp $
|
||||
|
||||
realinstall:
|
||||
realinstall:
|
||||
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
|
||||
${.CURDIR}/security ${DESTDIR}${BINDIR}/security
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ sub check_ksh {
|
|||
# is particularly important, so make sure we are really there.
|
||||
chdir '/root';
|
||||
|
||||
# A good .kshrc will not have a umask or path,
|
||||
# A good .kshrc will not have a umask or path,
|
||||
# that being set in .profile; check anyway.
|
||||
foreach my $filename (@list) {
|
||||
next unless -s $filename;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue