| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fix _mips_rtld_bind() to handle ELF filters.
|
|
|
|
| |
Avoid bind lock recursion.
|
|
|
|
| |
Handle protected symbols in rtld.
|
|
|
|
|
|
| |
Conditionalize all code that uses tcpd.h behind `LIBWRAP` guard
This will allow the code to stand by itself without libwrap
|
|
|
|
| |
Fix races and logic errors around dlclose().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Fix acquisition of nested write compat rtld locks.
PR: 215826
|
|
|
|
|
| |
For the main binary, postpone enforcing relro read-only protection
until copy relocations are done.
|
|
|
|
| |
Use ANSI C definitions, update comment.
|
|
|
|
| |
portion is used.
|
| |
|
|
|
|
| |
Take write lock for rtld_bind before modifying obj_list in dl_iterate_phdr().
|
|
|
|
| |
DIRDEPS_BUILD: Add some missing dirctories to the build.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Fix typo.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Assert that there is no unresolved symbols during rtld linking.
|
|
|
|
| |
Update hint to utilize user variable.
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Use SRCTOP instead of the longhand version for defining the path to contrib/atf
|
|
|
|
|
|
| |
Reference the libc symbols ypresp_{allfn,data} instead of local symbols.
PR: 213506
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Move defines common between rtld and libsysdecode into the header.
|
|
|
|
| |
Fill phdr and phsize for rtld object.
|
|
|
|
| |
Remove all remaining uses of TAILQ_FOREACH_FROM() from rtld-elf.
|
|
|
|
|
|
|
| |
Fix dlsym(RTLD_NEXT) handling to only return the next library in last library
cases.
Approved by: re (gjb)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
Approved by: re (gjb)
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Reviewed by: rpaulo
Approved by: rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6593
|
|
|
|
| |
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
| |
Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5916
|
|
|
|
|
|
|
|
| |
Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6594
|
|
|
|
|
|
|
|
| |
Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6703
|
|
|
|
|
|
|
|
| |
Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5913
|
|
|
|
|
|
|
|
|
|
| |
for the CONFS issue with dma.conf and ppp.conf.
Thank you very much to Bryan Drewery for looking into the
problem and providing this fix.
Pointyhat: gjb
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'CONFS' entries in share/mk/bsd.confs.mk explicitly check
for the 'installconfig', but does not behave properly with the
'distribute' target.
This seems to be related to the previously-reported issues
with files within /etc in the past.
Reported by: Ben Woods
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check that the dirlist path string specification does not cause
overflow and is fully contained in the hints file.
Check that the dirlist string is nul-terminated.
Make 'hdr' static variable, so that hdr.dirlistlen is available when
hints cached value is used on next function calls. Reset hdr.dirlistlen
to zero if error was detected, so that allocations use reasonable size.
Use 'hints', and not 'p' in the body, since p is only initialized on the
first call.
Reported and reviewed by: truckman (previous version)
Sponsored by: The FreeBSD Foundation
CIDs: 1006503, 1006504, 1006676, 1008488, 1007263
MFC after: 2 weeks
|
|
|
|
|
|
|
|
| |
declaring it in an inner scope and then using it via a pointer
in the outer scope.
Reported by: Coverity
CID: 605895
|
|
|
|
|
| |
When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
after r298107
Summary of changes:
- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
namespacing is kept with FILES appropriately, and that this shouldn't need
to be repeated if the namespace changes -- only the definition of PACKAGE
needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
`tests`. In the event we get to the point where things can be split up
enough in the base system, it would make more sense to group the tests
with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)
Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.
MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
| |
No functional change.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a related typo while here.
Note, this change results in the Kyuafile inclusion in the runtime
package, which needs to be fixed, however addresses the PR as far
as I can tell in my tests.
PR: 209114
Submitted by: ngie
Sponsored by: The FreeBSD Foundation
|
| |
|
| |
|