summaryrefslogtreecommitdiff
path: root/libexec
Commit message (Collapse)AuthorAgeFilesLines
* MFS r320799: MFC r320665:Xin LI2017-07-081-3/+3
| | | | | | | | | | In open_binary_fd: when using buffer size for strl* and snprintf, always use >= instead of > to avoid truncation. Approved by: re (kib) Notes: svn path=/releng/11.1/; revision=320800
* Merge r320645 from stable/11 into releng/11.1:Allan Jude2017-07-042-2/+20
| | | | | | | | | | Add deprecation notices for all rcmd tools Approved by: re (gjb) Relnotes: yes Notes: svn path=/releng/11.1/; revision=320654
* MFC r318954Eric van Gyzen2017-06-015-25/+0
| | | | | | | | | | | | rtld: fix warnings about redundant declarations Fix warnings about redundant declarations in rtld when libthr in increased to WARNS=6. Sponsored by: Dell EMC Notes: svn path=/stable/11/; revision=319434
* MFC r319137:Konstantin Belousov2017-06-011-4/+5
| | | | | | | Correct explanation of the dynamic tokens handling. Notes: svn path=/stable/11/; revision=319367
* MFC r319138:Konstantin Belousov2017-06-011-0/+71
| | | | | | | Document direct execution mode for rtld. Notes: svn path=/stable/11/; revision=319366
* MFC r318446:Konstantin Belousov2017-05-291-3/+8
| | | | | | | Update my copyright, note The FreeBSD Foundation involvement. Notes: svn path=/stable/11/; revision=319136
* MFC direct execution mode for rtld.Konstantin Belousov2017-05-291-19/+243
| | | | | | | | | | | | | | | | | | | | | | | MFC r318313: Make ld-elf.so.1 directly executable. MFC r318352 (by jonathan): Rename rtld's parse_libdir to parse_integer. MFC r318380: Pretend that there is some security when executing in direct mode. MFC r318431 (by jonathan): Allow rtld direct-exec to take a file descriptor. MFC r318445: Fix style, add static keyword before static function definition. MFC r318739: For ld.so direct execution mode, implement -p option. Notes: svn path=/stable/11/; revision=319135
* MFC r318312:Konstantin Belousov2017-05-291-0/+2
| | | | | | | Fix the AT_EXECFD functionality. Notes: svn path=/stable/11/; revision=319134
* MFC r314833Rodney W. Grimes2017-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Convert absolute links to relative links. Style.Makefile(9) has been ignored to produce minimal diffs. MFC r314837 The relative symlink fix causes downstream issues for EMC DELL Isilon so revert the relative symlink fix pending a better solution. Reported by: ngie MFC r315091 Revert r314833 until the problem with INSTALL_RSYMLINKS can be found as it appears to break arm release builds. PR: 217705 Reported by: cyclaero@gmail.com Approved by: grehan (mentor) Notes: svn path=/stable/11/; revision=319016
* MFC r318256:Konstantin Belousov2017-05-201-23/+10
| | | | | | | Style. Notes: svn path=/stable/11/; revision=318564
* MFC r317862:Kurt Lidl2017-05-122-3/+5
| | | | | | | | | | | | | | | Improve blacklist support before upgrading libblacklist The locally declared enum of blacklistd actions needs to be hidden when the soon to be committed changes to libblacklist are brought into the tree. Fix the type of the "msg" parameter to match the library. There should be no functional changes. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=318240
* MFC r312764:Andrew Turner2017-04-201-8/+16
| | | | | | | | | | | Pull the R_AARCH64_TLSDESC code out into a common function and use them in both the plt and non-plt case. This fixes an issue where libraries built with LLD can fail with "Unhandled relocation 1031" Notes: svn path=/stable/11/; revision=317189
* MFC r315040Alan Somers2017-04-023-0/+3
| | | | | | | | | | | | | | Increase WARNS for rtld-elf tests ATF tests have a default WARNS of 0, unlike other usermode programs. Reviewed by: ngie, julian MFC after: 3 weeks Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933 Notes: svn path=/stable/11/; revision=316388
* MFC r315331:Konstantin Belousov2017-03-2921-66/+88
| | | | | | | | | | | | | Implement LD_BIND_NOT knob for rtld. MFC r315337: Disable LD_BIND_NOT for setugid processes. MFC r315429 (by jilles): Document that LD_BIND_NOT is unset for setugid processes. Notes: svn path=/stable/11/; revision=316135
* MFC r309068 (by jhb):Konstantin Belousov2017-03-292-4/+15
| | | | | | | Fix _mips_rtld_bind() to handle ELF filters. Notes: svn path=/stable/11/; revision=316134
* MFC r314973:Konstantin Belousov2017-03-161-25/+33
| | | | | | | Avoid bind lock recursion. Notes: svn path=/stable/11/; revision=315416
* MFC r313494:Konstantin Belousov2017-02-231-8/+12
| | | | | | | Handle protected symbols in rtld. Notes: svn path=/stable/11/; revision=314128
* MFC r311473:Enji Cooper2017-02-042-1/+11
| | | | | | | | | Conditionalize all code that uses tcpd.h behind `LIBWRAP` guard This will allow the code to stand by itself without libwrap Notes: svn path=/stable/11/; revision=313231
* MFC r310420, r310421, r310422:Mark Johnston2017-02-032-19/+81
| | | | | | | Fix races and logic errors around dlclose(). Notes: svn path=/stable/11/; revision=313124
* MFC r312288: rtld: do not rely on a populated GOT on amd64Ed Maste2017-01-262-2/+14
| | | | | | | | | | | | | | | | | | | | | On rela architectures GNU BFD ld and gold store the relocation addend in GOT entries (in addition to the relocation's r_addend field). rtld previously relied on this to access its own _DYNAMIC symbol in order to apply its own relocations. However, recording addends in the GOT is not specified by the ABI, and some versions of LLVM's LLD linker leave the GOT uninitialized on rela architectures. BFD ld does not populate the GOT on sparc64, and sparc64 rtld has a machine-dependent rtld_dynamic_addr() function that returns the _DYNAMIC address. Use the same approach on amd64, obtaining the %rip- relative _DYNAMIC address following a suggestion from Rafael EspĂ­ndola. Architectures other than amd64 should be addressed in future work. Notes: svn path=/stable/11/; revision=312789
* MFC r311886:Konstantin Belousov2017-01-241-23/+28
| | | | | | | | | Fix acquisition of nested write compat rtld locks. PR: 215826 Notes: svn path=/stable/11/; revision=312693
* MFC r311984:Konstantin Belousov2017-01-191-8/+20
| | | | | | | | For the main binary, postpone enforcing relro read-only protection until copy relocations are done. Notes: svn path=/stable/11/; revision=312401
* MFC r311879:Konstantin Belousov2017-01-171-4/+4
| | | | | | | Use ANSI C definitions, update comment. Notes: svn path=/stable/11/; revision=312339
* MFC r310609: Don't use high precision clock for expiration as only secondXin LI2017-01-091-7/+7
| | | | | | | portion is used. Notes: svn path=/stable/11/; revision=311749
* MFC r310608: Avoid use after free.Xin LI2017-01-091-4/+6
| | | | Notes: svn path=/stable/11/; revision=311746
* MFC r310025:Bryan Drewery2017-01-031-2/+2
| | | | | | | Take write lock for rtld_bind before modifying obj_list in dl_iterate_phdr(). Notes: svn path=/stable/11/; revision=311202
* MFC r305148:Bryan Drewery2017-01-032-0/+36
| | | | | | | DIRDEPS_BUILD: Add some missing dirctories to the build. Notes: svn path=/stable/11/; revision=311183
* MFC r309411: Retire long-broken/unused static rtld supportEd Maste2017-01-034-19/+11
| | | | | | | | | | | | | | | | | | | | | | rtld-elf has some vestigial support for building as a static executable. r45501 introduced a partial implementation with a prescient note that it "might never be enabled." r153515 introduced ELF symbol versioning support, and removed part of the unused build infrastructure for static rtld. GNU ld populates rela relocation addends and GOT entries with the same values, and rtld's run-time dynamic executable check relied on this. Alternate toolchains may not populate the GOT entries, which caused RTLD_IS_DYNAMIC to return false. Simplify rtld by just removing the unused check. If we want to restore static rtld support later on we ought to introduce a build-time #ifdef flag. PR: 214972 Notes: svn path=/stable/11/; revision=311156
* MFC r310155:Konstantin Belousov2016-12-191-1/+1
| | | | | | | Fix typo. Notes: svn path=/stable/11/; revision=310237
* MFC 308456: Pass the correct flag to find_symdef() from _rtld_bind().John Baldwin2016-12-012-3/+3
| | | | | | | | | | | When symbol versioning was added to rtld, the boolean 'in_plt' argument to find_symdef() was converted to a bitmask of flags. The first flag added was 'SYMLOOK_IN_PLT' which replaced the 'in_plt' bool. This happened to still work by accident as SYMLOOK_IN_PLT had the value of 1 which is the same as 'true', so there should be no functional change. Notes: svn path=/stable/11/; revision=309371
* MFC r308689:Konstantin Belousov2016-11-2320-5/+151
| | | | | | | | | | | | | Pass CPUID[1] %edx (cpu_feature), %ecx (cpu_feature2) and CPUID[7].%ebx (cpu_stdext_feature), %ecx (cpu_stdext_feature2) to the ifunc resolvers on x86. MFC r308925: Adjust r308689 to make rtld compilable with either in-tree or (hopefully) stock gcc 4.2.1 on i386 and other arches. Notes: svn path=/stable/11/; revision=309045
* MFC r308688:Konstantin Belousov2016-11-221-1/+1
| | | | | | | Assert that there is no unresolved symbols during rtld linking. Notes: svn path=/stable/11/; revision=308964
* MFC r308687:Konstantin Belousov2016-11-221-1/+1
| | | | | | | Update hint to utilize user variable. Notes: svn path=/stable/11/; revision=308963
* MFC r308567: Fix build when WITHOUT_BLACKLIST=yes is specifiedKurt Lidl2016-11-151-3/+0
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=308703
* MFC r308175: Revisit blacklistd support in ftpdKurt Lidl2016-11-084-15/+50
| | | | | | | | | | | | Enhance blacklistd support to not log anything by default, unless blacklistd support is enabled on the command line. Document new flag in man page, cleanup patches to be less intrusive in code. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=308446
* MFC r306029:Enji Cooper2016-10-212-2/+2
| | | | | | | Use SRCTOP instead of the longhand version for defining the path to contrib/atf Notes: svn path=/stable/11/; revision=307721
* MFC r307398:Mark Johnston2016-10-191-2/+2
| | | | | | | | | Reference the libc symbols ypresp_{allfn,data} instead of local symbols. PR: 213506 Notes: svn path=/stable/11/; revision=307642
* Import Dragonfly Mail Agent snapshort from 20160806 aka v0.11+Baptiste Daroussin2016-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | Most important change being: dma - Fix security hole Affecting DragonFly 4.6 and earlier, Matt Dillon fixed this in base after finding out from BSDNow Episode 152. Comments following were from his commit which explains better than I. Just taking his change and putting it here as well. * dma makes an age-old mistake of not properly checking whether a file owned by a user is a symlink or not, a bug which the original mail.local also had. * Add O_NOFOLLOW to disallow symlinks. Thanks-to: BSDNow Episode 152, made me dive dma to check when they talked about the mail.local bug. Notes: svn path=/stable/11/; revision=304587
* MFC r304016:Konstantin Belousov2016-08-192-27/+65
| | | | | | | Move defines common between rtld and libsysdecode into the header. Notes: svn path=/stable/11/; revision=304453
* MFC r304012:Konstantin Belousov2016-08-191-0/+4
| | | | | | | Fill phdr and phsize for rtld object. Notes: svn path=/stable/11/; revision=304452
* MFC r304011:Konstantin Belousov2016-08-191-10/+6
| | | | | | | Remove all remaining uses of TAILQ_FOREACH_FROM() from rtld-elf. Notes: svn path=/stable/11/; revision=304451
* MFC r302908:Bryan Drewery2016-07-221-1/+1
| | | | | | | | | | Fix dlsym(RTLD_NEXT) handling to only return the next library in last library cases. Approved by: re (gjb) Notes: svn path=/stable/11/; revision=303193
* Fix race for incrementally rebuilding VERSION_MAP.Bryan Drewery2016-07-031-2/+1
| | | | | | | | | | | | | | | | | The dependency is needed in PROG_FULL since only the build of PROG_FULL is using the LDFLAGS and depending on VERSION_MAP. This was not a problem with MK_DEBUG_FILES==no since it only builds PROG. This should probably be using bsd.lib.mk instead [1] Reported by: swills, gjb Reviewed by: emaste Noted by: rgrimes [1] Sponsored by: EMC / Isilon Storage Division Approved by: re (kib) Notes: svn path=/head/; revision=302325
* DIRDEPS_BUILD: Update dependenciesBryan Drewery2016-06-144-0/+8
| | | | | | | | Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301891
* Separate BLACKLIST vs BLACKLIST_SUPPORT properlyKurt Lidl2016-06-071-1/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=301553
* Update blacklist support in ftpd to clarify fd usageKurt Lidl2016-06-062-13/+11
| | | | | | | | | | | | | | | | The ftp daemon dups the control socket to stdin and uses that fd throughout the code. Clarify this usage slightly by changing from explicit use of "0" for the fd to a variable, to make it clear what the zero represents in the non-blacklist code. Make the blacklist_notify routine use STDIN_FILENO so as to have less of a "magic number" feel to the code. Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6716 Notes: svn path=/head/; revision=301517
* Add blacklist support to rlogindKurt Lidl2016-06-052-3/+27
| | | | | | | | | | Reviewed by: rpaulo Approved by: rpaulo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6593 Notes: svn path=/head/; revision=301417
* DIRDEPS_BUILD: Connect new directories and update dependencies.Bryan Drewery2016-06-031-0/+11
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301283
* Add blacklist support to fingerdKurt Lidl2016-06-032-0/+20
| | | | | | | | | | | Reviewed by: rpaulo Approved by: rpaulo Relnotes: YES Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5916 Notes: svn path=/head/; revision=301243
* Add blacklist support to rshdKurt Lidl2016-06-032-1/+42
| | | | | | | | | | | Reviewed by: rpaulo Approved by: rpaulo Relnotes: YES Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6594 Notes: svn path=/head/; revision=301242