summaryrefslogtreecommitdiffstats
path: root/libexec
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add ATF to the build. This is may be a bit rought around the egdes,marcel2012-10-224-1/+113
| | | | | | | | | | | | | | | | | but committing it helps to get everyone on the same page and makes sure we make progress. Tinderbox breakages that are the result of this commit are entirely the committer's fault -- in other words: buildworld testing on amd64 only. Credits follow: Submitted by: Garrett Cooper <yanegomi@gmail.com> Sponsored by: Isilon Systems Based on work by: keramida@ Thanks to: gnn@, mdf@, mlaier@, sjg@ Special thanks to: keramida@
* More -Wmissing-variable-declarations fixes.ed2012-10-209-18/+52
| | | | | | | | | | In addition to adding missing `static' keywords: - bin/dd: Pull in `extern.h' to guarantee consistency with source file. - libexec/rpc.rusersd: Move shared globals into an extern.h. - libexec/talkd: Move `debug' and `hostname' into extern.h. - usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree. - usr.bin/m4: Move `end_result' into extern.h. - usr.sbin/services_mkdb: Move shared globals into an extern.h.
* More -Wmissing-variable-declarations fixes.ed2012-10-191-1/+1
| | | | | | | | | | | | | | | | In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
* Fix warnings found by -Wmising-variable-declarations.ed2012-10-193-5/+5
| | | | | | | | | | | This self-written compiler warning, which is hopefully going to be committed into LLVM sources soon, warns about potentially missing `static' keywords, similar to -Wmissing-prototypes. - bin/pax: Move external declaration of chdname and s_mask into extern.h. - bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h. - sbin/mount_fusefs: Remove char *progname; use getprogname(). - others: add `static' where possible.
* atrun: Do not assume that MAXLOGNAME <= 100.jilles2012-09-261-1/+1
| | | | | | | | | The reserved space for fmt was exactly sufficient for a two-digit value of MAXLOGNAME - 1. PR: bin/171815 Submitted by: Jeremy Huddleston Sequoia MFC after: 1 week
* Do not reference z_nodeflib for !objgiven case, thus fixing LD_PRELOADkib2012-09-191-4/+4
| | | | | | | for a non-absolute path. PR: bin/171604 MFC after: 3 days
OpenPOWER on IntegriCloud