From nobody Sun Nov 03 18:37:45 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 4XhNd61ryxz5cbLP; Sun, 03 Nov 2024 18:37:46 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XhNd61DxXz4p3R; Sun, 3 Nov 2024 18:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730659066; 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=t+CNwZGK1UjlC0LfOqN05aNmIi+qPhXcN4BDli0LDZg=; b=L096KZTbGnhNUiOPMAn6J7Wd0F0rTS5OAj0OioyGPTA+V3THTx9RTyfl4QIiZZmfakY0HS wCksD+/TsIFuT8delDROWaMZ9cYkJAe2gPavY0J5EgK3/lVaGD/eXgPikim/fHwTGn8CHt U1+AUf2LGEJMMovNYeTiK/mmtZY+N+LGIOVVuwNP8aIAnlci4AOaG8DAg58C+NSKEcRjFn 9l6u/y4XOUHyNwOmHEaqAP3GFwRzuya2ZaSG5mnwvKhinClnrpoov/lCXCuy36un3C63g8 ZmnUwmyTOjAusm08f/OKhd4hL0yiq82Rpcjhi+4KkcmdFqRrZwiwaWEmlxHOqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730659066; 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=t+CNwZGK1UjlC0LfOqN05aNmIi+qPhXcN4BDli0LDZg=; b=CNuZ99KYeulBuNiqjttniDfQ0GWYdqzDn7kXmezndb9I6wdBrggx/X5vZZ2Y6pKety/hzr psjXLcmdOJuE8CCma3txHP51WpOW6R1FRolY6+e6NX7VkmrHIBFqRoZLiZGc4lhO72kgUM 2HR5irmQgorfCUC1aS3i5Y1j5llcQ7l8kvNUfq7ALri/ReqX9mPJKOBdRvvM8Im+8jV232 5tUNk4BgpgIbh+yMc11A9BaObIkh3glM2E97X6FfqRYELgiPGUli6Kn/83n1cYhjTJ3QFf kTR0etZhis9p4d9ArvlAnBxePqqUSTIHJhvBsLjWT3izRISKwxIjJov5JyuVhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730659066; a=rsa-sha256; cv=none; b=WK3nEFFtOn+qO/lpais4bjnWt88jmtLQ93++9u/zBrLMRYigJkONHOvSNcpGAbfJbwU8iZ DMr+dh6dj9z5JC0SrYFCEcTHceJe0D9le3zUaysiQqmp0l7kaEnG/RIeJdkYW4hFqR6mB8 rgmDzFzx3jtYDJmOSvNnr1TdJXdl0CkKsQnsr8gCnKypZ9DdjqbWaR6lR1QUxBo7PmiXvN nMmtf0xwYludxVPU61LOcyzQy9GHwlVBMkA7uepaxzkDfQxYuVBOXwceVBYahbvrVH+ZhZ JG4kFRKTKdfjDiBBPFxH/nR9/ZQ7ViMOM+r0FQgCMP1DX4kPCHi0hxCD/yg66A== 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 4XhNd60kzBz10yS; Sun, 3 Nov 2024 18:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4A3IbjNg097463; Sun, 3 Nov 2024 18:37:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A3Ibjge097460; Sun, 3 Nov 2024 18:37:45 GMT (envelope-from git) Date: Sun, 3 Nov 2024 18:37:45 GMT Message-Id: <202411031837.4A3Ibjge097460@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: ba10bfe509dc - main - libbsm: honour AU_OFLAG_NORESOLVE 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba10bfe509dcb5d408de89c886527035068b8f17 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ba10bfe509dcb5d408de89c886527035068b8f17 commit ba10bfe509dcb5d408de89c886527035068b8f17 Author: Ed Maste AuthorDate: 2024-10-23 12:25:29 +0000 Commit: Ed Maste CommitDate: 2024-11-03 18:37:24 +0000 libbsm: honour AU_OFLAG_NORESOLVE AU_OFLAG_NORESOLVE is documented as "Leave user and group IDs in their numeric form" but it was not actually tested. OpenBSM pull request at https://github.com/openbsm/openbsm/pull/85 PR: 282271 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47263 --- contrib/openbsm/libbsm/bsm_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/openbsm/libbsm/bsm_io.c b/contrib/openbsm/libbsm/bsm_io.c index 4b89ccb8b59c..f0b3e4a1a2df 100644 --- a/contrib/openbsm/libbsm/bsm_io.c +++ b/contrib/openbsm/libbsm/bsm_io.c @@ -644,7 +644,7 @@ print_user(FILE *fp, u_int32_t usr, int oflags) { struct passwd *pwent; - if (oflags & AU_OFLAG_RAW) + if (oflags & (AU_OFLAG_RAW | AU_OFLAG_NORESOLVE)) fprintf(fp, "%d", usr); else { pwent = getpwuid(usr); @@ -663,7 +663,7 @@ print_group(FILE *fp, u_int32_t grp, int oflags) { struct group *grpent; - if (oflags & AU_OFLAG_RAW) + if (oflags & (AU_OFLAG_RAW | AU_OFLAG_NORESOLVE)) fprintf(fp, "%d", grp); else { grpent = getgrgid(grp);