From nobody Tue Nov 12 13:44:59 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 4Xnnj76Mckz5cYk1; Tue, 12 Nov 2024 13:44:59 +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 4Xnnj74lqlz4Hw1; Tue, 12 Nov 2024 13:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731419099; 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=Fz2/8/jJFgO5t1LnY8ifHaVgFN9gOpd0m6Q7zLkx2UI=; b=tyq0AzdozmYzIuLj/nMQxecDt4M3LFdGdHgbxHir1WL5oxG/FHGWRszaKVP7v5d1i5P2NI 86Ks/Bh804jB2bwQ2IdU6uvJUil8ZZY5hsh9wc1VIjVDzmp+QRivBX9jMlKQnc4P/vfatd zZO0isiW/XCyOtdEdiGFONnZeBkviwN05iezauFuFmwP8JmAF74qgcChKCzUf9t4NyuYAR Q7L+wqFvs34ko5q0vChtOQnBFRTtrk7weB9DXTaZESS+XId2FsfwtUkwee4MrDLBtlENuG KYbRF2HOEwqKV7nqVreWFwheKzdc0FmIEONI4Fgy6yV8rlh2TVGc8YLxBT3z+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731419099; 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=Fz2/8/jJFgO5t1LnY8ifHaVgFN9gOpd0m6Q7zLkx2UI=; b=YngpkZwOCGT5nprFBTSUW3IgEwraoiqLbdBvFsPe8tlwJdaUbQ+eaU0cr5XSJReCBIczWD 6KLMPsr1llRyyB6tTPyagQ4tbYzbFdp6Vcb/EjQMGwunNth+F3uj91OiQBWUQEsByGGw6H rv9yRG25yWekbW3IL3FMN6dAgwpckFaRyixJP5isDLnKpUqQTUdeaR3W/sdbnhIUZkKDQD LVK0mYYijwW2S+s13z7WbXBUN7o+r1BHy3fRjeveOiTxLhlJcQDnt1+x/81OXPmusUsPua lesvLwfkNiiB7BE4vlkB2/TE0JmKIWJHZ6XoE1jj0paaRN6hh9yGmf5VlBEFTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731419099; a=rsa-sha256; cv=none; b=TorVZnmzzRJHf8b7V9FxzvGSGKwLzldG7lKeJYYpTNwxSa//t1ZGtYvOdvDcVtK03iGerw Ad4tJcwdh62El23jENHgiik4vtsnvsUfn6/mM5EISw+sruOSr6zHC/dgKyAoJa7y8ELgev 8jmlFZOQyvoLbedNdBzogSeexrOjOinD/vvkpfokAxeswfOSbwpfR7bYqfKaQcyIU5A+Y4 XyMFLuHgz835p07CE/AtJC3IDLgw9JMNmto20Hvmtjn6ap/NFfEmTdZW094lOiU7svE10F 4hXeWgM/s6eLKC+1vpXENKw2DklxAfE6gTMrrOsAbMNkjR0zStdshYPaTIyuBg== 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 4Xnnj71TdGz1Bd8; Tue, 12 Nov 2024 13:44:59 +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 4ACDixdj025593; Tue, 12 Nov 2024 13:44:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACDix7T025590; Tue, 12 Nov 2024 13:44:59 GMT (envelope-from git) Date: Tue, 12 Nov 2024 13:44:59 GMT Message-Id: <202411121344.4ACDix7T025590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 92a324a151ce - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 92a324a151ceef49cf52d33e9e30038f6459629a Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=92a324a151ceef49cf52d33e9e30038f6459629a commit 92a324a151ceef49cf52d33e9e30038f6459629a Author: Ed Maste AuthorDate: 2024-10-23 12:25:29 +0000 Commit: Ed Maste CommitDate: 2024-11-12 13:44:47 +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 (cherry picked from commit ba10bfe509dcb5d408de89c886527035068b8f17) (cherry picked from commit 914752d0f7f874ab4fc8393aee28c22df87324f2) (cherry picked from commit 6abc57ceb6a0af92ec86d95ba3bca0c396624c90) --- contrib/openbsm/libbsm/bsm_io.c | 4 ++-- usr.sbin/praudit/tests/input/numeric_form | 2 +- 2 files changed, 3 insertions(+), 3 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); diff --git a/usr.sbin/praudit/tests/input/numeric_form b/usr.sbin/praudit/tests/input/numeric_form index 09f089450ac3..144be694f2e4 100644 --- a/usr.sbin/praudit/tests/input/numeric_form +++ b/usr.sbin/praudit/tests/input/numeric_form @@ -2,6 +2,6 @@ header,113,11,socket(2),0,Mon Jun 11 10:18:45 2018, + 380 msec argument,1,0x1c,domain argument,2,0x2,type argument,3,0x0,protocol -subject,root,root,wheel,root,wheel,7053,4724,37636,10.0.2.2 +subject,0,0,0,0,0,7053,4724,37636,10.0.2.2 return,success,3 trailer,113