From nobody Mon May 06 04:42:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VXpgC3DHlz5J9xl; Mon, 06 May 2024 04:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VXpgC1NVPz4Wtr; Mon, 6 May 2024 04:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714970567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kOXDELYqtpaGbkEfF4bZq7Svj9YSQLWBPWeXTCC0G5g=; b=WZI/xkbyA1lw/D37HUCTaS7g6WK/PzSQtefD0emHNl5gyP8rodTUlLrnsStSYX0QEsloho J+o/GkrzQVp3JXJUci6eSceVSZJGPtfVzl/HD2twXh+kQdqesllD1PUEm7tz1SQhXHODnK tI2RtEN6kd9+23leCwnnhXWZnTuKsNszpn7gdj4VzPW9iSyeczzuIVH16OmlRZqgVqMdNB tePwbPebmKLakp5NkPgyl0ncq8k/lewqLwR6Fsp1NJ2AYBxanckD4gci9FbGT7dI00/Eiv KAoa15tsyfqOerXdb36+Pdh0/Y/cbWRXFd5y5jGQv7TmjrDtt3eQ2r7KrPQwFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714970567; a=rsa-sha256; cv=none; b=hXodQ3DYRMiu9B37ko5hTPvuS+RXSDtjRDvWi2NMfpAoqGXYYHHd1CqZg6SAnTiwAKuxLA TOt/CcME3LK0lXzl4RpwCn9vnNzFPjaoBkv/85J3Nlh7Hh7mfPsPTryNqnVSwx8nQfmZIR usX4OlyMbupbrl/T5tGLP1tjSs7NV4psnU1opmiYqyB26kj24YuqD/RXDPrgyIf35hexIE B3Jtha9MzVaStlMdw03H/qBHeeeCrBmYHzyu0Olzgte9SJLDKGFoAFjIaI/EtVhHQv/hP5 UKrL/3xiiolfdexua0iudmJAU2iE0MNPcZ+kzzoPWa4hyszd5x6a63rq8wmAkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714970567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kOXDELYqtpaGbkEfF4bZq7Svj9YSQLWBPWeXTCC0G5g=; b=wdYK1V9gyGdxV8relOkCWscQ1qKriEJZADeA3rE6qaYnU2r92c1v/mDLnhBtiDgYRlKKsr cVhcVSzRJspjTSZWWsgi9DHP35ad10diR/EG0kDBhJJOYJNON3ashgTsEGsyN8C47chAjl dKHYBiw6AgPwiia6VsDxbUusftKmQTVV33HBoynt0/4ubHH9tOlqoxviPmJQFHSGZg9Z5c mIXXJutrlLYwKNA3/5g0tza9rl+uHELNs9oIgZWOGS6DfybuP+Zu7Dwz4wPfdilD7io+lD uJeThVoCSfZF9WxV+Be0t14AUCqK/uPpva949QtDZ9T+J9aw4KsSo7kWOH1+FA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VXpgC0zmhzkDH; Mon, 6 May 2024 04:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4464glpt049966; Mon, 6 May 2024 04:42:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4464glBF049963; Mon, 6 May 2024 04:42:47 GMT (envelope-from git) Date: Mon, 6 May 2024 04:42:47 GMT Message-Id: <202405060442.4464glBF049963@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6c85003139a4 - stable/14 - rtld direct exec: make -u behavior match the description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6c85003139a4917bf617916e9aad8f024d847278 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6c85003139a4917bf617916e9aad8f024d847278 commit 6c85003139a4917bf617916e9aad8f024d847278 Author: Konstantin Belousov AuthorDate: 2024-04-28 20:57:54 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-06 04:42:19 +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 0492b8f9d9f3..96042f7b5af3 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -6187,7 +6187,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;