From nobody Tue Nov 12 13:43:34 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 4XnngV58Q7z5cYN6; Tue, 12 Nov 2024 13:43:34 +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 4XnngV4dMCz4HZv; Tue, 12 Nov 2024 13:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731419014; 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=Vp2MwMF6vDzIM++qeqzHBYSFLpmicv0uMdcliz86jLY=; b=mfq+4u8meYC1QNEF62sbCpUUTHdFEMIVWDsdhEKVtXfr9wAgOQ2PB+OUMkemRypGOHKR3i /fOpCkiQs4nG5fjbT7faiY14lQbHtE2hWK+tuIPAQWVe2V0314IYUI0ek/TPqjGWOzZ36X Y4VzOO86fHYFvB5wFF2JBBXTyccNzTOiTirhwtiGfH248fXs/C8SYPHmWUtAm/2UFvQyew RHOKaQFew9JXpcEpiFOjrjsQ++wf8OdFPjhlq+g0pU2k3QDxDNIx31kGUJiLVTsU7qpmH3 Jbp+iGIKj4vRUJTNg7cZb8Jzzv02KR6BVRB+n+3K60+9cHn3WSoLoz69gr1PtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731419014; 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=Vp2MwMF6vDzIM++qeqzHBYSFLpmicv0uMdcliz86jLY=; b=c8FkAzABl3B/GxCvtogIc6d7UI+OI3CyuuhFQrTlZhezLner0R8G+masJpOvjCQeHOWp4l LIZOt1EtqT/VTAUmwoGK+8aZ2Tg8BqCb6sncEH/g37k8KpT9+z3wvycPi7MBtB1YyAGY/1 bV3VreXxlG/SrKWG6wYja940CMo5gRvFCRCZgmFVAx+IhlpKWCkVN1w/envhx7zvAh8jTq TJGNrweNRRibvSypR7g4svyyZ0VwxNyqxe3eTVDwOmv4v4nPXoVQUY+JMKANzEdzWqb9uW biphdIRm/n2pMRHM78IzzvKnjiRps2c8k0wZSjeeTgMJ58udVepx/mZjQo9rwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731419014; a=rsa-sha256; cv=none; b=in7+ZgoiziaHfxedAbP9djR0/M86+g+iqWWSpaM0P2XUkn4DY/zlg+I4og2JoBGPRZfDDH Hs6SJpMXkUoj5B6p7nswJ1obHor8hMGZjoWXrbsyi6EkjuOgKhwXt0oIe4+tthSlWEGnvu DXlHMb2NleGA3cgwrjHZUWSV+DlhQGjA/3pNEOolVvUE1IMj2iuYstF90A2H2+XbSiILkn xYYNA+Y7EiQujus11WUOqBcUOS6gMjVJYt56aaN+R9zjOCJk4xV0YYj6t57vH5ce5Eqnj3 AuomK1uuOOHMJrUDHBaKuj1w97X4DNEca3nIwtRZKBsTY8VBpDEAzFyOyHOwjg== 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 4XnngV4DR9z1Bsk; Tue, 12 Nov 2024 13:43:34 +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 4ACDhYDh025060; Tue, 12 Nov 2024 13:43:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACDhY8I025057; Tue, 12 Nov 2024 13:43:34 GMT (envelope-from git) Date: Tue, 12 Nov 2024 13:43:34 GMT Message-Id: <202411121343.4ACDhY8I025057@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: 6abc57ceb6a0 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 6abc57ceb6a0af92ec86d95ba3bca0c396624c90 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6abc57ceb6a0af92ec86d95ba3bca0c396624c90 commit 6abc57ceb6a0af92ec86d95ba3bca0c396624c90 Author: Ed Maste AuthorDate: 2024-10-23 12:25:29 +0000 Commit: Ed Maste CommitDate: 2024-11-12 13:40:05 +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) --- 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