summaryrefslogtreecommitdiff
path: root/libexec
AgeCommit message (Collapse)Author
2016-07-18Polish:Philip Guenther
- copy #define workaround from mips64 to avoid dangling __CERROR symbol - remove trap DL_SYSCALL2_NOERR() macro with comment explanation - make DL_SYSCALL2() self-contained - add END() and ENTRY() macros to make the symbol table shine ok miod@
2016-07-18Updated advice^Wcode from miod@ for passing &_DYNAMIC to _dl_boot_bindPhilip Guenther
ok aoyama@
2016-07-15Switch m88k to pass &_DYNAMIC to _dl_boot_bind()Philip Guenther
probably works: this ASM pattern is already used for _dl_dtors
2016-07-13Adjust existing tls_config_set_cipher() callers for TLS cipher groupJoel Sing
changes - map the previous configuration to the equivalent in the new groups. This will be revisited post release. Discussed with beck@
2016-07-04Remove prebind support: binding to symbol table indices is too fragilePhilip Guenther
for our development process. ok kettenis@ deraadt@
2016-07-04Nuke prebind support; it's unworkable and we're never going to finish it.Mark Kettenis
ok guenther@, deraadt@
2016-07-04The GOT has been initally mapped RW for *years*; ld.so doesn't need toPhilip Guenther
mprotect it to RW when filling in the references from the PLT in snaps for a week, ok deraadt@
2016-07-04Use fstatat() instead of crafting a filename to use with stat()Philip Guenther
ok millert@
2016-06-21When handling DT_TEXTREL only set the mapping to READ+WRITE, ignoreTheo de Raadt
possible EXEC permission for the section, because the proper permission is set late, and there are no thread concerns here. Avoids W^X issues in oddball cases. ok guenther kettenis
2016-06-21Handle textrels like other architectures do.Theo de Raadt
ok kettenis guenther
2016-06-18Make mips64 like all the others: only make mappings writable during relocationPhilip Guenther
if DT_TEXTREL was set on the object. If that's needed, only set the mapping to READ+WRITE to avoid W^X violation. ok kettenis@
2016-06-13Only need to sync the icache on the GOT for the old BSS PLT formatPhilip Guenther
ok kettenis@
2016-06-08Some ELF ABIs still require a PLT that is both writable and executable. ToMark Kettenis
avoid W^X violations, initially map such segments as writable and non-executable, and change the mapping to non-writable and executable after initial relocation processing. As a side-benefit this means we no longer depend on the __plt_start and __plt_end to make the PLT read-only after relocation processing. This will break binaries linked with ld -Z, most notably emacs, on some of our architectures. ok deraadt@, guenther@
2016-06-05Avoid W^X violation when setting DT_DEBUG on mips64.Mark Kettenis
ok deraadt@
2016-05-26for textrels (sthen ran into one...):Theo de Raadt
Ignore the listed protection (which may contain X) when making page writeable temporary.
2016-05-22Ignore the listed protection (which may contain X) when making pageTheo de Raadt
writeable temporary. As pointed out by kettenis, discussed with guenther
2016-05-21mul/div/rem replacement should happen without PROT_EXECTheo de Raadt
ok guenther
2016-05-21Temporarily make the PLT writable when we're initializing the magic slotsMark Kettenis
or doing non-lazy relocation processing. ok guenther@
2016-05-19Give the caller a chance to handle the failure if unable to allocatePhilip Guenther
the TIB for a new thread ok jca@ millert@ deraadt@
2016-05-19ld.so can now be entered by multiple threads via _dl_{allocate,free}_tib(),Philip Guenther
so do locking in ld.so's malloc subsystem, (re)using the existing _dl_thread_kern_{stop,go}() callbacks. problem diagnosed by jsing@ in the 'go' port; fix tested there and by semarie@ in the 'rust' port
2016-05-18fix types for mmap wrappers. A few whitespace cleanups snuck in.Theo de Raadt
ok guenther
2016-05-17tyopJeremie Courreges-Anglas
2016-05-12more hppa64 cleaningTheo de Raadt
2016-05-11remove hppa64 port, which we never got going beyond broken single users.Theo de Raadt
hppa reverse-stack gives us a valuable test case, but most developers don't have a 2nd one to proceed further with this. ok kettenis
2016-05-07Move the set_tcb after getdents to keep L_cerr in range.Philip Guenther
ok deraadt@
2016-05-07Use a Thread Information Block in both single and multi-threaded programs.Philip Guenther
This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable! Make libpthread dlopen'able by moving the cancelation wrappers into libc and doing locking and fork/errno handling via callbacks that libpthread registers when it first initializes. 'errno' *must* be declared via <errno.h> now! Clean up libpthread's symbol exports like libc. On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec. Testing by various, particularly sthen@ and patrick@ ok kettenis@
2016-05-04Kill #ifdef INET6 occurrences in userland.Jeremie Courreges-Anglas
Prompted by and ok millert@ (tcpdump and libpcap left untouched, the #ifdef force is too strong with those)
2016-04-27Remove pledge(2)'s that are called before chroot(2) since in the near futureRicardo Mestre
this will be forbidden. The remaining pledge(2) calls after chroot(2) are still kept. OK semarie@ "it is time now"
2016-04-26Add missing "tty" promise to the pledge(2) callRicardo Mestre
This is needed since getpass(3) calls readpassphrase(3) which in turn tries to open(2) a tty in O_RDWR mode Problem reported by Kevin Chadwick <m8il1ists ! gmail.com> Cluebat stick provided by deraadt@, OK millert@
2016-04-25prefer setres{u,g}id() rather than manipulating both real and effectiveTheo de Raadt
ids, it clarifies these are full revocation situations. ok millert
2016-04-24explicit_bzero some keys after use.Sebastian Benoit
From fritjof () alokat ! org, thanks! ok semarie@
2016-04-10per rfc, ehlo responses contain hostname, then options. from dyn+bsdTed Unangst
2016-04-06compare pointer to NULL instead of 0Sebastien Marie
from fritjof ! alokat.org ok ratchov@ natano@
2016-04-02Use open(tty, O_WRONLY) + fdopen() instead of fopen(tty, "w") toTodd C. Miller
keep stdio from opening with O_CREAT which would require pledge cpath.
2016-03-31Don't use .Aq for syntax elements that require ASCII "<>".Ingo Schwarze
Bug reported by Christian Heckendorf <mbie at ulmus dot me>, patch by me. OK jmc@ bentley@
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2016-03-25- Both checks for pw are not needed since it was already done at the start ofmestre
the program - Add error message to syslog if privdrop didn't succeed and then exit - Remove lint comments OK beck@ after his suggestion and also looks good to jca@
2016-03-24Unbreak arm and m88k: COPY relocations for weak symbols that are overloadedPhilip Guenther
with strong symbols in ld.so don't do what we need, so put definitions back in crt0 and make ld.so update __progname like it does environ. report and testing patrick@ jsg@
2016-03-21Rename the system call sendsyslog2 to sendsyslog. Keep the old oneAlexander Bluhm
as osendsyslog for a while. The three argument variant is the only one that will stay. input kettenis@; OK deraadt@
2016-03-21Provide _dlctl(), an alternate name for dlctl() that's in the reservedPhilip Guenther
namespace, for use by libpthread ok deraadt@
2016-03-21Switch ld.so's stack smash handler from sendsyslog to sendsyslog2Philip Guenther
and pass the LOG_CONS flag like libc's handler. ok deraadt@ bluhm@ (who had a similar diff)
2016-03-20Export environ and __progname, making the latter a copy of just the filenamePhilip Guenther
portion like crt0 does. This is prep for eliminating _dl_fixup_user_env() Mark almost everything in resolve.h as hidden, to improve code generation. ok kettenis@ mpi@ "good time" deraadt@
2016-03-16More "(<blah> *)0" -> NULL, avoiding any stdarg functions.Kenneth R Westerback
Feedback millert@ kettenis@
2016-03-16- Check if user running spamlogd(8) has root privileges and if not then stopmestre
program early - #define SPAMD_USER "_spamd" and use it on getpwnam(3) call - Set usage() as __dead void - Remove lint-style comments OK beck@
2016-03-10- add a define for "_spamd" user like others OpenBSD daemons;Gleydson Soares
- check for root privileges, otherwise exit early with an appropriate status code and a formatted string; - be more specific with chroot()/chdir() checks. OK beck@
2016-02-29Print ssize_t with %zd; ok deraadt@ mmcc@Jeremie Courreges-Anglas
2016-02-29Kill unused variable.Jeremie Courreges-Anglas
2016-02-05pledge(2) for talkd(8):mestre
rpath: fopen(3) _PATH_UTMP in read mode wpath/cpath: fopen(3) full_tty in write mode (w), which implies O_CREAT inet/dns: the intervening hosts in the conversation may be remote, or not, but since we will never know beforehand then it'll always need inet and dns to resolve the hostnames ok jca@ and also discussed with tb@
2016-02-01Remove unused headers and sort the remainingmestre
OK tb@
2016-01-24Delete remnants of grpsym cache setting during symbol search: it's done atPhilip Guenther
load time only nwo. Rename _dl_searchnum and lastlookup to _dl_grpsym_gen and grpsym_gen as they are generation numbers. Merge _dl_newsymsearch() into _dl_cache_grpsym_list_setup(). ok millert@