summaryrefslogtreecommitdiff
path: root/libexec
AgeCommit message (Collapse)Author
2013-06-13Appease LLVM warning..Brad Smith
error: indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference] Suggestion from matthew@ Ok matthew@ miod@
2013-06-09Constify the mib argument of sysctl().Miod Vallat
ok matthew@ millert@
2013-06-04do not go into upper to lower case translation mode when a all-capsSebastian Benoit
username has been entered. ok deraadt@
2013-06-04Add handling for keyboard layouts which break modhex (like dvorak and manyRyan Thomas McBride
others); concept and keymap table (covering about 400 layouts) from modhex.js by Daniel Holth. ok sthen@, ok halex@ (who also provided much testing and feedback)
2013-06-04Fix a bunch of "variable 'foo' set but not used." warnings emitted by newer GCC.Brad Smith
ok matthew@ kurt@
2013-06-01Make all the syscall prototypes consistent with their real forms for types,Philip Guenther
whitespace, and no argument names. ok matthew@ deraadt@
2013-06-01Introduce ltrace(1). This tool works with ld.so to inject utrace record forMiod Vallat
each plt call, allowing to trace a binary linked against shared library at the public function call level. To do so, ltrace(1) sets up some environment variables to enable plt tracing in ld.so, and invokes ktrace(2) for utrace events. ld.so will force lazy binding and will send an utrace record in the plt resolver, without updating the plt. Minimal filtering capabilities are provided, inspired by Solaris' truss -u, to limit tracing to libraries and/or symbol names. Non-traced libraries and symbols will have the regular resolver processing, with the expected plt update. "Get it in" deraadt
2013-05-17Try and support the non-PIC TEXTREL relocations which may creep in binariesMiod Vallat
when linked against non-pic material (such as linking against libgcc without passing -fpic or -fPIC on the commandline). Given the large userland address space (4GB) and random library placement, it is unlikely that these relocations can ever suceed anyway (DISP26 only allows for a 256MB offset); _dl_exit() in that case, after printing a warning message. That's better than dumping core.
2013-05-15undo malfunctionMiod Vallat
2013-05-14Don't display swapin/swapout uvmexp fieldsMiod Vallat
2013-05-08Implement symbol caching and RELACOUNT/RELCOUNT optimizations.Philip Guenther
Much assistance and testing by miod ok miod@
2013-05-07fixed size types should be fixed size. long -> uint32_t.Ted Unangst
from Matthias Pitzl pitzl at genua de
2013-05-04fix use after free in error pathsJonathan Gray
ok sthen@ jung@ fgsch@
2013-04-21use poll + nanosleep instead of select with a fixed size fd_setTheo de Raadt
ok tedu
2013-04-20Prefer the processor-specific _DYNAMIC[] tags value to find out the boundariesMiod Vallat
of the .plt whenever possible, and fallback to the old behaviour of searching for special symbols pointing to its boundaries. No functional change.
2013-04-17do not mix concepts of gettimeofday(), tv_sec, and localtime() in aTheo de Raadt
useless fashion.
2013-04-16an acceptable time_t truncation (binding cannot take that long)Theo de Raadt
ok matthew
2013-04-05- Add ORIGIN, OSNAME, OSREL and PLATFORM substitution support for rpaths.Kurt Miller
Improvements and okay matthew@, millert@, guenther@
2013-03-29Enable lazy binding by default.Miod Vallat
2013-03-26SH is a RelA architecture, not a Rel one. Fix _dl_bind() and lazy gotpltMiod Vallat
relocation to correctly process RelA entries. This allows lazy binding to work so far; not enabled yet, must survive some serious churning first.
2013-03-26Recommit the change that explicitly passes %sr0 to fic instructions. miod@ isMark Kettenis
still puzzled why this didn't work back in 2010, but it does work now and paves the way for binutils 2.17 on hppa. Obviously based on miod@'s earlier diff. ok miod@
2013-03-24dlerror() should not return const char *, as noted by landryTheo de Raadt
ok guenther
2013-03-21Correct the last change to untaint $fmt; it caused the final parameter ofStuart Henderson
the format string to be dropped, causing the year to be printed instead of the filename, as reported by ajacoutot. ok espie@
2013-03-20- Parse colon separated paths into NULL terminated arrays of stringKurt Miller
pointers to prepare for adding rpath ORIGIN support. okay matthew@ millert@
2013-03-19Untaint a variable used in an sprintf format string by using a regex and back-Stuart Henderson
reference. This diff from espie@ after we worked through a few alternatives. (Background: with perl's taint mode, any operation other than RE+backref, even just taking a length of a tainted [user-supplied/untrusted] string, results in a tainted variable. Perl 5.14 improves the checks in format strings to sprintf which triggers with this script).
2013-03-18create an empty %skip even if SUIDSKIP is not set, newer perl complains.Stuart Henderson
"I don't even see how this could work before" and ok espie@
2013-03-18Enclose qw()...) literals in parentheses where required; this was historicallyStuart Henderson
assumed anyway, but recent versions of Perl deprecate this. ok espie@
2013-03-18Fix comment tpyosPhilip Guenther
2013-03-11remove line left from previous;Jason McIntyre
2013-03-11Report -u and -g support; running as another privdrop user or group is stupid.Theo de Raadt
ok millert guenther
2013-03-11handle ECONNABORTED errors from accept(). In many code blocks they can beTheo de Raadt
ignored silently and without aborting, much like EINTR and EWOULDBLOCK are. ok's from various maintainers of these directories...
2013-03-09Code has not fallen back to "nobody" in a very long time;Theo de Raadt
jca at wxcvbn.org
2013-02-17Always enter this ld.so and subdirectories to create obj (and then theTheo de Raadt
MI man pages, even if vax currently lacks the programs)
2013-02-06Add a dummy memcpy(), needed when building ld.so with gcc3.Miod Vallat
2013-02-02Be sure to pass a NULL cleanup pointer to CSU.Miod Vallat
2013-01-31The code to use relative jumps in the GOT was completely broken, calculatingPhilip Guenther
the offset in the wrong direction, failing to take into account where in the relocation the jump would be, and not even using the right instructions in one case. Fortunately(?), the test of whether the offset was small enough had signed-vs-unsigned bugs too, so it was never used. ok miod@
2013-01-29refactor code a bit to actually store subjects in the subject objectMarc Espie
reformat for 8 spaces tab. okay millert@
2013-01-26Make sure to flush I$ over the plt in case of non-lazy relocation as well.Miod Vallat
2013-01-26Forgot to remove one line in 1.2, in turn caused div() from libc to fail ifMiod Vallat
invoked with lazy binding.
2013-01-23bits for an m68k ELF ld.so, to be used soon. Lazy resolver wrapper borrowed fromMiod Vallat
NetBSD.
2013-01-23Cache flush .plt after updating its pointers to .got during the initialMiod Vallat
object relocation, if loaded at a different address than the one it was compiled for; unsurprisingly fixes some spurious crashes.
2013-01-21Use jmp, not jsr, to jump through registers. Doh!Miod Vallat
This makes lazy binding work, so don't disable it anymore.
2013-01-21Correctly define RELOC_JMP_SLOT on m88k. While there, remove the old sparcMiod Vallat
wrong RELOC_JMP_SLOT define workaround.
2013-01-20A first cut at ld.so bits for m88k. Lazy binding is currently disabled as itMiod Vallat
does not work beyond the first few lazy resolver calls. But that's already enough to run simple binaries.
2013-01-19Do not divide by zero in _dl_findhint() if there is a valid hints file butMiod Vallat
no buckets in it (could happen if the administrator reruns ldconfig with bogus paths). ok matthew@ kurt@ drahn
2013-01-14Do not bogusly attempt to mprotect ld.so's .rodata area RW at bootstrapMiod Vallat
time: the logic is wrong, and there are no relocations to apply to .rodata anyway. ok jsing@ kettenis@
2013-01-13Fix warnings.Federico G. Schwindt
millert@ ok.
2013-01-13Correctly process RELOC_DIR32 while relocating ld.so itself; this allowMiod Vallat
global data initializers to work as intended. ok drahn kettenis@
2013-01-11Proper bounds checking for DT_xxx values in _dl_boot_bind(). Turned out to beMiod Vallat
harmless because we have full control over the array being processed, and none of the values we set up may trigger the bug; yet this may change in the future. ok drahn matthew@
2013-01-05Switch m88k ports to ELF.Miod Vallat