summaryrefslogtreecommitdiffstats
path: root/libexec
AgeCommit message (Collapse)AuthorFilesLines
2018-06-13Remove #ifdef PASSWD, it was always enabled and is a leftover from krb5 days.reyk3-11/+5
No other uses of -DPASSWD were found in the tree. OK deraadt@ tb@ brynet@
2018-06-08Bail out if fchmod(2) fails.cheloha1-2/+5
Don't quietly install ld.so.hints with mode 0600 because this adds overhead to shlib lookup for non-root processes. From Nan Xiao. ok guenther@
2018-06-01Bump ELF_RANDOMIZE_LIMIT to 1MB.mortimer1-2/+2
ok deraadt@
2018-05-15On arm64 negate the whole 64-bit register otherwise system call wrapperskettenis1-2/+2
that return ssize_t will not return a negative value upon error. Fixes dynamical loading of shared objects using dlopen(). ok guenther@
2018-05-01Add an explanation to relink.log what a failed checksum of /bsdrpe1-2/+12
means and show how to re-enable KARL. Prodded by and OK deraadt Feedback and OK tb
2018-04-27Make sure ld.so doesn't use floating point registers, as the lazy-bindingguenther1-2/+2
stub doesn't preserve them and some may be used for passing arguments ok kettenis@ deraadt@ mlarkin@
2018-04-26Use <fcntl.h> instead of <sys/file.h> for open() and friends.guenther6-46/+12
Delete a bunch of unnecessary #includes and sort to match style(9) while doing the above cleanup. ok deraadt@ krw@
2018-04-26nuke trailing whitespacebeck1-3/+3
2018-03-09Add support for the DF_TEXTREL flag.kettenis1-1/+3
ok patrick@, millert@
2018-02-09Use a static chacha instance to fill randomdata sections. Avoids loopingmortimer2-33/+247
over a syscall for randomdata sections larger than 256B. ok djm@ deraadt@ kettenis@
2018-02-07sync with libc malloc: use consistent style for for loop in unmap(),otto1-3/+1
no functional change
2018-02-04Expand Type strings by one space, to fit ld.so, in the same ugly way "exe "deraadt1-6/+6
was being handled.
2018-02-01don't forget to increment loop var; infinite loops spotted by sthen@otto1-0/+1
2018-01-30No need to add ffs.c as we use .VPATH to reach over into libc/string.kettenis1-40/+0
ok otto@
2018-01-30provide ffs, gcc generates calls to it, even when __builtin_ffs() is used.otto2-2/+42
ok deraadt@
2018-01-30kill a gcc warningotto1-1/+1
2018-01-30port over the malloc changes from libc. prompted by deraadt@otto1-304/+293
2018-01-18Unlike other archs, mips64 needs ld.so to know about symbol visibility andguenther1-3/+4
skip symbol lookup on protected symbols. Add visibility #defines to <sys/exec_elf.h> to support that. ok kettenis@ visa@
2017-12-24Fix one possible buffer overflow and one underflow. Also some minormillert1-17/+29
cleanups. From Jan Kokemueller. OK deraadt@
2017-12-21Implement missing bits to support lazy binding. Note that the codekettenis2-42/+34
deliberately does not save the floating-point argument registers before calling _dl_bind(). Doing so would force an FPU context switch upon every function call through the PLT. But since we compile ld.so with -march=armv8-a+nofp+nosimd this is safe since nothing in the _dl_bind() codepath uses he FPU registers. ok guenther@, drahn@
2017-12-12ld.so's syscall _dl_* API/ABI doesn't reurn errno, but -errno.deraadt1-2/+4
Reviewing behaviour artifacts with pledge, I discover a close(-ENOSYS).. ok guenther
2017-12-12spacingderaadt1-2/+2
2017-12-08also cleanout ld.so.aderaadt1-1/+3
2017-12-08Everyone knows this as ld.so, nor by the ancient name rtld.deraadt4-10/+10
ok guenther
2017-12-01Redo the calculation of the alignment and placement of static TLS data toguenther3-17/+215
correctly take into account the segment p_align. Previously, anything with a size belong the natural alignment or with alignment larger than the natural one would either not be intialized correctly, be misaligned, or result in the TIB being misaligned. Problems reported by Charles Collicutt (charles (at) collicutt.co.uk) ok kettenis@
2017-11-28Implement a DL_REFERENCE dlctl. To be used by the upcomingkettenis1-1/+18
__cxa_thread_atexit() implementation. ok guenther@
2017-11-15Tweak bitmask calculation to match i386 and avoid clang warning.kettenis1-3/+4
ok tom@
2017-11-05Consolidate lib.so.*.a, ld.so.a and the kernel relink kit intorpe2-11/+13
one location under /usr/share/relink. Be more specific in src/etc/rc reorder_libs() what filesystems need r/w remount and ensure that their mount state is restored. Idea and positive feedback from deraadt@ OK aja@ tb@
2017-10-29Prefer <elf.h> to the non portable <sys/exec_elf.h>.mpi1-1/+1
ok jca@, deraadt@
2017-10-27Use <elf.h> instead of <elf_abi.h>mpi12-24/+24
ok jasper@, jca@, deraadt@
2017-10-26If LD_BIND_NOW is in force then all relocations are performed eagerly,guenther1-1/+5
when the object is loaded. Since kbind(2) will never be used in that case, disable it early, before invoking any library or application code. ok deraadt@ kettenis@
2017-10-24R_AARCH64_NONE should be zero, not 256. The latter was a deprecatedguenther1-3/+3
assignment and isn't used by clang/lld. ok jsg@
2017-10-18Make blacklist entries override the whitelist. When running spamdmillert4-17/+133
in greylisting mode, it is not uncommon for an IP to get whitelisted before it shows up on a spam blacklist. With this change, spamd will check its blacklists before adding a WHITE entry to the <spamd-white> pf table. If the IP matches a blacklist, the WHITE entry will be removed. OK phessler@
2017-10-17add missing HISTORY; based on CVS logs and release announcementsschwarze1-2/+9
2017-10-17Use a binary search to speed up blacklist lookups. OK phessler@millert2-38/+132
2017-10-12Check for asprintf() returning -1 instead of assuming that themillert1-2/+3
pointer will remain unchanged when fails. OK deraadt@
2017-10-10__plt_{start,end} are no longer generated or necessary, having beenguenther3-20/+3
superseded by the generic ?WX and RELRO support. Stop trying to look up and use them. ok kettenis@ deraadt@
2017-10-05Sync with libc malloc, doing delayed free double-free check alwaysotto1-21/+15
2017-09-16Make sure to freezero() the wide-character copy of the user supplied password.anton1-11/+20
While here, change the mbstowcs() error checking making it complaint with what's documented in the manual and zap some stray whitespace. ok benno@ tb@
2017-09-09Remove superfluous mprotect()ing of the PLT that's been obsoleted byguenther1-6/+8
the generic handling of RWX segments. ok aoyama@
2017-09-03Fix m88k problem in recent ld.so changes.aoyama2-8/+13
- move _dl_cerror function from SYS.h to ldasm.S to avoid duplicate definition when linking - [SYS.h] pull some macros from lib/libc/arch/m88k/DEFS.h - [ldasm.S] add "'never hit' but needed" br again in _dl_cacheflush (thanks to Miod Vallat) - [ldasm.S] change ld.hu into ld.h in order to get a correctly signed and sign-extended value (also thanks to Miod Vallat) ok deraadt@
2017-08-29rename *fdprint function to *dprintf, like libc versionderaadt3-24/+24
2017-08-28whitespacederaadt2-5/+5
2017-08-28whitespacederaadt4-10/+10
2017-08-28fix arm64 buildjsg1-2/+2
ok deraadt@
2017-08-27Place all .o files, Symbols.map, and the test program into /usr/libdata/ld.so.a.deraadt1-1/+10
My work is done; the next piece is coming from rpe. ok visa kettenis
2017-08-27The test program run before ld.so is installed was encoding the $OBJDIRderaadt1-2/+2
path to ld.so. Since the testprogram is run from inside $OBJDIR, encode with a ./ path instead. ok kettenis visa
2017-08-27Link the ~45 .o which become ld.so in a random order.deraadt1-3/+4
ok kettenis visa
2017-08-27hppa & sh use support functions from libgcc. Rather than linking againstderaadt3-6/+17
the library, extract the specific pieces and link them directly. ok kettenis visa
2017-08-27Replace heaps of hand-written syscall stubs with a simpler frameworkderaadt39-801/+683
which is largely MI. ok visa kettenis