From nobody Mon May 25 19:46:46 2026 X-Original-To: dev-commits-src-main@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 4gPRGh1SnBz6fqds for ; Mon, 25 May 2026 19:46:52 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPRGh0z6tz3FKd for ; Mon, 25 May 2026 19:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779738412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vgo97L2H3lbOG2iLJGLZhuneJ7iJEQS9R4OrIUQdA3E=; b=tyRt31U54OR58+Jc8IaIAHxtvgUHPiWT90NTL/2Y8P9qZNtQVQGl4ZUuDPn9fstpp7Xg6w FR3WSvhNnU2Fbwea1h/dtX/GN8O8FWt4i9FWeCmjzO+fdST4gKMIw3HK1skYUFrwY/aBb/ qQU20BDx4srBe4/TBPa4bJjZCXQvuw11OweAgCllRv6y132i+92jnsP6/sJ6wXmPjJlYpS SKdL4WEt7VGip30Cg0ZHIkvTmeiSnFijKf35iCPfN16DNNF4MPIfiq5lI9mRlKYFc1CA1S zrQx/ZK+fRKJy3xO5Hch/8vhGkHtpxlciU9woyiBGKcunffSCdO2MlKIDkYh8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779738412; a=rsa-sha256; cv=none; b=T4Xbe3VVZlDEc9tZbpcRlEAvLRjDCpSgBTyWpDNwyVhuZpYhkkm4A5kNNMqhUgnug//gX4 9Fb9V/1CnFBwUme6pMHVO2G+FfW0LG1lyIZ9eV/xgCvqwwzYcu6mEUcT+mn0ISfaqV4AIR zTKgUNqH6Fjlx+1AlEQ3BBAm1JmOgTI97KUAcDgPqt/rrwNINgYoi1cRGHhQy9ScMk6OZk 4HuiWU+bgukPkZ3YY0fa4vWwfActr/ICzgP1R1uMtnuVQ9gSQ4yqpEzqhVRSYjyvq0KEa/ 0jh/urChTsmQAOQXSjqNoYG9NgEI/MlKd4TEMhSlTPKGEvn4tfQPaicdnLRPTQ== 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=1779738412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vgo97L2H3lbOG2iLJGLZhuneJ7iJEQS9R4OrIUQdA3E=; b=asm+2YScZ8CZAI3JNPH2mhdE6Apd4hgxAA1Ba/KLO79ME8/cxrq1BfovAGc3/7y/zrcpEs z5G4lqHq9CTJJA0KhE5AbUxD1nEFT/z1wu4muBJGpdcw6z4NnHZhPoI/10BuvB+xirMyC7 7bHfHK2NjAPDOJyRxOnxd88URQyRTSQjg98yXyt5Dn4NXFkmYo0vxpgCqA/E0mmBihf+wA Pt6BIS2WWVxeP5zD37CRHHlap4un3kPiBvGNEA4xC5hYF3dBaZCO+iXqrwTaJa/zZLPRBr aFKeTr9J43hbWNxJp43rt5CAxI6xheO4Ki9G05UmlzY439ZPDZf195mpEi4Xzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPRGh09Ldzw8l for ; Mon, 25 May 2026 19:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 458d4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 25 May 2026 19:46:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Peter Eriksson From: Rick Macklem Subject: git: 6e7c10c79dea - main - acl_id_to_name.c: Fix printing of uids and gids List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e7c10c79deac3c6bb6ad3bd12c8e0ad68bb59f0 Auto-Submitted: auto-generated Date: Mon, 25 May 2026 19:46:46 +0000 Message-Id: <6a14a726.458d4.9729153@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6e7c10c79deac3c6bb6ad3bd12c8e0ad68bb59f0 commit 6e7c10c79deac3c6bb6ad3bd12c8e0ad68bb59f0 Author: Peter Eriksson AuthorDate: 2026-05-25 19:44:41 +0000 Commit: Rick Macklem CommitDate: 2026-05-25 19:44:41 +0000 acl_id_to_name.c: Fix printing of uids and gids uid_t and gid_t are uint32_t (unsigned 32bit integers). They are printed as signed integers when calling getfacl (and other tools using the acl_to_text() libc function). This causes uid/gids larger than 2G (214783648) to print as negative numbers - which causes problem with setfacl since the acl_from_text() libc function fails on negative numbers. Reviewed by: rmacklem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57179 --- lib/libc/posix1e/acl_id_to_name.c | 4 ++-- lib/libc/posix1e/acl_to_text_nfs4.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/posix1e/acl_id_to_name.c b/lib/libc/posix1e/acl_id_to_name.c index 78e050a8648a..c90e6083cca1 100644 --- a/lib/libc/posix1e/acl_id_to_name.c +++ b/lib/libc/posix1e/acl_id_to_name.c @@ -67,7 +67,7 @@ _posix1e_acl_id_to_name(acl_tag_t tag, uid_t id, ssize_t buf_len, char *buf, else p = getpwuid(id); if (!p) - i = snprintf(buf, buf_len, "%d", id); + i = snprintf(buf, buf_len, "%ju", (uintmax_t)id); else i = snprintf(buf, buf_len, "%s", p->pw_name); @@ -83,7 +83,7 @@ _posix1e_acl_id_to_name(acl_tag_t tag, uid_t id, ssize_t buf_len, char *buf, else g = getgrgid(id); if (g == NULL) - i = snprintf(buf, buf_len, "%d", id); + i = snprintf(buf, buf_len, "%ju", (uintmax_t)id); else i = snprintf(buf, buf_len, "%s", g->gr_name); diff --git a/lib/libc/posix1e/acl_to_text_nfs4.c b/lib/libc/posix1e/acl_to_text_nfs4.c index 157215c9dd52..4f19f3a9a7b2 100644 --- a/lib/libc/posix1e/acl_to_text_nfs4.c +++ b/lib/libc/posix1e/acl_to_text_nfs4.c @@ -69,7 +69,7 @@ format_who(char *str, size_t size, const acl_entry_t entry, int numeric) else pwd = NULL; if (pwd == NULL) - snprintf(str, size, "user:%d", (unsigned int)*id); + snprintf(str, size, "user:%ju", (uintmax_t)*id); else snprintf(str, size, "user:%s", pwd->pw_name); acl_free(id); @@ -89,7 +89,7 @@ format_who(char *str, size_t size, const acl_entry_t entry, int numeric) else grp = NULL; if (grp == NULL) - snprintf(str, size, "group:%d", (unsigned int)*id); + snprintf(str, size, "group:%ju", (uintmax_t)*id); else snprintf(str, size, "group:%s", grp->gr_name); acl_free(id);