Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 May 2024 08:59:33 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e45b440633f9 - stable/13 - rtld direct exec: make -u behavior match the description
Message-ID:  <202405070859.4478xXS3021553@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=e45b440633f9878baf019d3ef557bd2be103c3f9

commit e45b440633f9878baf019d3ef557bd2be103c3f9
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-04-28 20:57:54 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-05-07 08:59:07 +0000

    rtld direct exec: make -u behavior match the description
    
    (cherry picked from commit ef2694f368cee5957ee44b0298da88ff8360d561)
---
 libexec/rtld-elf/rtld.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 071a7cf8dde8..7110ba6c4c1a 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -6233,7 +6233,10 @@ parse_args(char* argv[], int argc, bool *use_pathp, int *fdp,
 			} else if (opt == 'p') {
 				*use_pathp = true;
 			} else if (opt == 'u') {
-				trust = false;
+				u_int ll;
+
+				for (ll = 0; ll < nitems(ld_env_vars); ll++)
+					ld_env_vars[ll].val = NULL;
 			} else if (opt == 'v') {
 				machine[0] = '\0';
 				mib[0] = CTL_HW;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405070859.4478xXS3021553>