summaryrefslogtreecommitdiffstats
path: root/libexec
Commit message (Collapse)AuthorAgeFilesLines
* MFC r270798:kib2014-09-1210-334/+321
| | | | | | | | | | Process STT_GNU_IFUNC when doing non-plt relocations. MFC r270802: Only do the second pass over non-plt relocations when the first pass found IFUNCs. Approved by: re (gjb)
* MFC r267176, r267181, r268445 (ATF-related commits):ngie2014-09-095-2/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Phabric: https://reviews.freebsd.org/D706 Approved by: rpaulo (mentor) Approved by: re (gjb) Reviewed by: jmmv Sponsored by: EMC / Isilon Storage Division r267176: Add the *_TESTS_SH_SED_* functionality to atf.test.mk. This exists already in plain.test.mk and tap.test.mk and should have been added to atf.test.mk too when the feature was first introduced. (It is probably time to address the related TODOs but I will do that separately.) r267181: Move atf-sh from /usr/bin/ to /usr/libexec/ In r266650, we made libatf-c and libatf-c++ private libraries so that no components outside of the source tree could unintendedly depend on them. This change does the same for the "atf-sh library" by moving the atf-sh interpreter from its public location in /usr/bin/ to the private location in /usr/libexec/. Our build system will ensure that our own test programs use the right binary, but users won't be able to depend on atf-sh by "mistake". Committing this now to ride the UPDATING notice added with r267172 today. r268445: Fix atf-sh's integration_test With the move of atf-sh into /usr/libexec in r267181, some of the tests in the integration_test program broke because they could not execute atf-sh from the path any longer. This slipped through because I do have a local atf installation in my home directory that appears in my path, hence the tests could still execute my own version. Fix this by forcing /usr/libexec to appear at the beginning of the path when attempting to execute atf-sh. To make upgrading easy (and to avoid an unnecessary entry in UPDATING), make integration_test depend on the Makefile so that a rebuild of the shell script is triggered. This requires a hack in the *.test.mk files to ensure the Makefile is not treated as a source to the generated program. Ugly, I know, but I don't have a better way of doing this at the moment. Will think of one once I address the TODO in the *.test.mk files that suggests generalizing the file generation functionality. PR: 191052 Reviewed by: Garrett Cooper
* MFC r270803:kib2014-09-011-0/+4
| | | | Document the whole settings needed to build a debug version of rtld.
* MFC r266650, r267172 (both by jmmv):ngie2014-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r266650: Change libatf-c and libatf-c++ to be private libraries. We should not be leaking these interfaces to the outside world given that it's much easier for third-party components to use the devel/atf package from ports. As a side-effect, we can also drop the ATF pkgconfig and aclocal files from the base system. Nothing in the base system needs these, and it was quite ugly to have to get them installed only so that a few ports could build. The offending ports have been fixed to depend on devel/atf explicitly. Reviewed by: bapt r267172: Homogenize libatf-* version numbers with upstream. The libatf-* major version numbers in FreeBSD were one version ahead of upstream because, when atf was first imported into FreeBSD, the upstream numbers were not respected. This is just confusing and bound to cause problems down the road. Fix this by taking advantage of the fact that libatf-* are now private and that atf is not yet built by default. However, and unfortunately, a clean build is needed for tests to continue working once "make delete-old-libs" has been run; hence the note in UPDATING. Phabric: D701 Approved by: jmmv (maintainer, mentor)
* MFC r270256:pfg2014-08-281-2/+2
| | | | | | Always check the limits of array index variables before using them. Obtained from: DragonFlyBSD
* MFH (r263160): remove lukemftpddes2014-08-235-431/+0
|
* MFC r265456, r265578:markj2014-08-072-1/+17
| | | | | | | | Add a postinit debugger hook to rtld. This will be used by dtrace(1) to halt the victim process before its entry point is called, at which point probes and DOF data are registered with the kernel. The r_debug_state hook cannot be used for this purpose, as it is called before the program's init routines are invoked and in particular before DOF data is registered (via drti.o).
* MFC r268979:delphij2014-07-291-0/+2
| | | | | | | | | | | Don't save entropy inside jails. As of r126744, we no longer feed the entropy device in jails upon start, and collecting them is no longer useful. PR: conf/126744 Submitted by: Eugene Grosbein <eugen grosbein net> (with minor changes) Approved by: so (des)
* MFC r260913,266895:nwhitehorn2014-06-081-2/+5
| | | | | | | | | | Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the device is an active kernel console and "off" otherwise. This is designed to allow serial-booting x86 systems to provide a login prompt on the serial line by default without providing one on all systems by default. Set this flag on x86 systems for ttyu0. Comments and suggestions by: grehan, dteske, jilles
* MFC r266609:kib2014-06-071-1/+15
| | | | Change the _rtld_atfork() to lock the bind lock in write mode.
* MFC r266411:kib2014-05-251-3/+3
| | | | Fix LD_LIBMAP.
* MFC r264617:ghelmer2014-05-051-0/+6
| | | | | | | | Fix releasing the lock in the parent atrun process after the queue directory has been processed. Otherwise, a long-running child process caused other atrun invocations to stall unnecessarily. Submitted by: J.R. Oldroyd jr at opal.com
* MFC r264481:kib2014-04-211-0/+43
| | | | | Add dwarf annotations to the amd64 _rtld_bind_start to allow debuggers to unwind around the calls from PLT to binder.
* MFC refactoring of the *.test.mk files.jmmv2014-04-141-1/+1
| | | | | | | | | - r263161 Make bsd.test.mk the only public mk fragment for the building of tests. - r263172 Move FreeBSD Test Suite-specific code to a suite.test.mk file. - r263204 Add some documentation for bsd.test.mk. - r263217 Document support for TAP-compliant Perl test programs. This is "make tinderbox" clean.
* MFC: r263121brueffer2014-03-271-13/+12
| | | | | | | | | | | | Re-format the license to conform to our BSD license template as much as possible. This does not change the wording in any way. Remove the 3rd clause ("advertising clause") of the BSD license as permitted by the University of Berkeley on July 22, 1999. While the clause itself mentions Lawrence Berkeley Laboratory, UCB is the sole copyright holder of this file. Reviewed by: imp, emaste, eadler
* MFC r262277:davidxu2014-02-271-7/+5
| | | | | | | | | | | | | | | | | | malloc_aligned() may not leave enough space for pointer to allocated memory, saving the pointer will overwrite bytes belongs to another memory block unexpectly, to fix the problem, use (allocated address + sizeof(void *)) as initial value, and slip to next aligned address, so maximum extra bytes is sizeof(void *) + align - 1. Tested by: Andre Albsmeier < mail at ma17 dot ata dot myota dot orgndre > MFC r262334: Increase alignment to size of pointer if the alignment is too small. Some modules do not align data at least to size of pointer, they uses a smaller alignment, but our pointer should be aligned to its native boundary, otherwise on some platforms, hardware alignment checking will cause bus error.
* MFC: r262136brueffer2014-02-2455-275/+55
| | | | | | | Remove the 3rd clause ("advertising clause") of the BSD license as permitted by the University of Berkeley on July 22, 1999. Reviewed by: imp
* MFC: r262135brueffer2014-02-244-0/+8
| | | | Add $FreeBSD$.
* MFC: r261885brueffer2014-02-211-0/+2
| | | | | | | | | In sgetpwnam(), save and free pw_class like all other char members of struct passwd. This fixes spurious "login_getclass: unknown class" errors. PR: 186439 Submitted by: UEMURA Tetsuya <t_uemura at macome.co.jp>
* Plug the ATF tests into the build.jmmv2013-12-288-3/+43
| | | | | | | | | | | | This is a MFC into stable/10 of: - r257849 Add libatf-c++ to the prebuild libs. - r257853 Build and install the atf tests. - r258233 Move all atf directories to the tests mtree. - r258285 Fix the build of some ATF tests. This change is "make tinderbox" clean on ref10-amd64 with the default settings of WITHOUT_TESTS. It is likely for the WITH_TESTS build to still be broken because not all relevant changes have been merged yet.
* Set up the /usr/tests hierarchy.jmmv2013-12-281-4/+4
| | | | | | | | | | | | | | | | | This is a MFC of the following into stable/10: - r257097 Set up the /usr/tests hierarchy. - r257098 Add missing WITHOUTTESTS file. - r257100 Add a tests(7) manual page. - r257105 Disable WITHTESTS= for now. - r257848 Fix buildworld when WITHTESTS is enabled. - r257850 Subsume the functionality of MKATF into MKTESTS. - r257851 Handle the removal of the test suite when WITHOUTTESTS=yes. - r257852 Install category Kyuafiles from their category directories. - r258232 Install BSD.tests.mtree when MKTESTS is yes. Note that building with WITH_TESTS is still broken at this point (and hence why WITHOUT_TESTS is the set as the default). Subsequent pullups will fix the remaining issues.
* MFC r259044:kib2013-12-131-15/+20
| | | | | | | For variant II static TLS, properly align tls segments. MFC r259072: Cast Elf_Addr to void * to match the free_aligned() argument type.
* MFC r259043:kib2013-12-132-0/+32
| | | | | Build an allocator for the aligned memory on top of the rtld-private malloc.
* By popular demand, move freebsd-version(1) from /libexec to /bin.des2013-10-094-272/+0
| | | | Approved by: re (gjb)
* Explicitly pass the full path to the input file to sed. This unbreaksdes2013-10-091-1/+1
| | | | | | the WITHOUT_BMAKE build. Approved by: re (gjb)
* Introduce the /libexec/freebsd-version script, which is intended to bedes2013-10-074-0/+272
| | | | | | | | | | used by auditing tools to determine the userland patch level when it differs from what `uname -r` reports. This can happen when the system is kept up-to-date using freebsd-update and the last SA did not touch the kernel, or when a new kernel has been installed but the system has not yet rebooted. Approved by: re (glebius)
* Implement support for the interpose dso flag.kib2013-10-072-2/+33
| | | | | | | | Requested by: bf Reviewed by: kan Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (glebius)
* Populate .rld_map on MIPS for debuggersemaste2013-10-021-5/+1
| | | | | | | | | On MIPS the .dynamic section is read-only, so the pointer to rtld information for debuggers cannot be stored there (in DT_DEBUG). Instead, a special section .rld_map is used. Sponsored by: DARPA, AFRL Approved by: re (delphij)
* Make the directory mapping functionality, which was previously onlydes2013-09-213-9/+5
| | | | | | | | | available in 32-bit compatibility mode, unconditional. Overhaul the man page, which had evolved more by accretion than by design. Approved by: re (gjb) MFC after: 3 weeks
* Revert r253748,253749avg2013-07-282-0/+2
| | | | | | This WIP should not have been committed yet. Pointyhat to: avg
* remove needless inclusion of machine/cpu.h in userlandavg2013-07-282-2/+0
| | | | MFC after: 21 days
* Add the name of the file that could not be opened to the error messageghelmer2013-06-111-1/+1
| | | | | | regarding the failure. Suggested while working on PR bin/113239.
* Prevent races running the queue by serializing access to theghelmer2013-06-111-0/+4
| | | | | | queue directory. PR: bin/113239
* mdoc sweep.joel2013-05-121-1/+1
|
* Properly terminate the result string for intermediate results, tokib2013-04-291-1/+2
| | | | | | | | allow the final strcpy() to start at the intended place. Reported and tested by: pgj Pointy hat to: kib MFC after: 3 days
* The origin_subst_one() function limits the length of the string tokib2013-04-151-73/+75
| | | | | | | | | | | | | | | | | | PATH_MAX after the token substitution. This is wrong, because origin_subst_one() performs the substitution on the whole rpath and similar strings, which contain several pathes separated by colon. As result, long (but correct) rpath consisting of many path elements is rejected by the function. Correct the problem by rewriting the origin_subst_one() to perform two passes, first pass to calculate the number of substitutions to be performed, and second pass to generate the resulting string. Second pass allocates the memory for the result based on the count from the first pass, without enforcing a limit. Reported and tested by: pgj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Map libraries linked with -Ttext-segment=base_addr at base_addr.tijl2013-02-271-1/+1
| | | | | | | | | Normal libraries have base address 0 and are unaffected by this change. PR: 176216 Submitted by: Damjan Jovanovic <damjan.jov@gmail.com> Reviewed by: kib MFC after: 1 week
* Since clang 3.2 now has an option to suppress warnings about implicitlydim2013-02-162-10/+0
| | | | | | | promoted K&R parameters, remove the workarounds added for sendmail components in r228558. MFC after: 1 week
* Avoid use of register variables, which some compilers (e.g. clang)nwhitehorn2013-02-081-9/+5
| | | | | | don't like. It makes the code a little clearer as well. MFC after: 1 week
* Retire struct sockaddr_inarp.glebius2013-01-311-19/+7
| | | | | | | | | | | | | | | Since ARP and routing are separated, "proxy only" entries don't have any meaning, thus we don't need additional field in sockaddr to pass SIN_PROXY flag. New kernel is binary compatible with old tools, since sizes of sockaddr_inarp and sockaddr_in match, and sa_family are filled with same value. The structure declaration is left for compatibility with third party software, but in tree code no longer use it. Reviewed by: ru, andre, net@
* Mark tftp_log() as __printflike() (which would have caught the bugmarius2013-01-314-15/+17
| | | | | | fixed in r246106) and deal with the fallout. MFC after: 2 weeks
* Remove extra %s from debug statement that ends up crashing tftpd ifsbruno2013-01-301-1/+1
| | | | | | | debug is set very high (like -d15 in my case). Obtained from: Yahoo! Inc MFC after: 2 weeks
* When building for ARM EABI link against libgcc for the __aeabi_* functions.andrew2013-01-191-0/+10
|
* Use correct size in snprintf.antoine2012-12-251-2/+1
| | | | | | | | Remove unused buffer. PR: 174631 Submitted by: Henning Petersen MFC after: 1 month
* Use absolute path for /usr/libexec/ld-elf.so.1 symlink.pjd2012-12-041-2/+2
| | | | | | | | | Requested by: kan, kib Use -h flags for chflags, so we won't remove 'schg' flag from system's /libexec/ld-elf.so.1. MFC after: 2 weeks
* Do not change entire BINDIR, it might be needed later, just changepjd2012-12-041-2/+2
| | | | | | symlink target. MFC after: 2 weeks
* Change /usr/libexec/ld-elf.so.1 to point at ../../libexec/ld-elf.so.1pjd2012-12-041-1/+1
| | | | | | | | | | | instead of /libexec/ld-elf.so.1. Below in the Makefile we execute 'chflags noschg ${DESTDIR}/usr/libexec/ld-elf.so.1', which follows symlink and removes 'schg' flag from system's /libexec/ld-elf.so.1 instead of the one in DESTDIR. It is also more friendly to use replative paths in symlink in case of jail/chroot environments. Obtained from: WHEEL Systems MFC after: 2 weeks
* rtld: Fix fd leak with parallel dlopen and fork/exec.jilles2012-11-042-4/+4
| | | | | | | | | | | | | | | | Rtld did not set FD_CLOEXEC on its internal file descriptors; therefore, such a file descriptor may be passed to a process created by another thread running in parallel to dlopen() or fdlopen(). No other threads are expected to be running during parsing of the hints and libmap files but the file descriptors need not be passed to child processes so add O_CLOEXEC there as well. This change will break fdlopen() (as used by OpenPAM) on kernels without F_DUPFD_CLOEXEC (added in July). Note that running new userland on old kernels is not supported. Reviewed by: kib
* atrun(8): scale default load average limit with the number of CPUsmjg2012-10-302-2/+21
| | | | | | | | | Previously atrun refused to run jobs if load average was not below fixed limit of 1.5. PR: 173175 Reviewed by: peterj Approved by: trasz (mentor) MFC after: 2 weeks
* Check the return error of set[e][ug]id. While this can never fail in theeadler2012-10-221-1/+4
| | | | | | | | | | current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days
OpenPOWER on IntegriCloud