From nobody Tue Aug 26 20:32:04 2025 X-Original-To: freebsd-current@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 4cBK8Q5Hvxz665Fb for ; Tue, 26 Aug 2025 20:32:06 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cBK8Q4lGVz3DXN; Tue, 26 Aug 2025 20:32:06 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756240326; 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: in-reply-to:in-reply-to:references:references; bh=Kge0Z6laiekLZHHZXV3l9l0Rc1NRbkIQ9dxZgYsVH7s=; b=miSPhad5Clj6aqBdFHffEzUNM/vPe42PuW1zGZzfPLj9J6jEbqoFJMVAoxlt75XrXhcp+m zWqbOcRavkghNmyohzLAG+aVgqSl6KQ2k4enA1+fXIvWwX6RMB/bESslqRbg+FaY77X+zQ aW2R9eXoyR1QIyTUtsc62gknDm1G8Rx8Sii1QDTPFFRh6gEsNVmhGD+yWq+lx7yw2GlAnh NgvUJUKHPsUYTj10z0/IN4IBc7GNe5hH/hKMUV3ZQTryasZlAZ+JoUliu0NYp4H7GxRqJK EITFrdrphtSUgTn2fuHzhfI8Nv9uQJI5T//yt45i4YrjaOHMHRae1RydfoBPKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756240326; 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: in-reply-to:in-reply-to:references:references; bh=Kge0Z6laiekLZHHZXV3l9l0Rc1NRbkIQ9dxZgYsVH7s=; b=I24LmkdZgQv6eNAAghs/0HjEl/UKrImUZH/EIWFD0yTBXdHd1MI+ybXcR9R5+To1hwFCVm TPKN3XmoFh+GSF+Px8ox/4UStmK/AP/XNKj2GGzGFvBjcD451EEJmu65FnIBgqQRperaeE GjJPefJxvvtrfG4gin/jwC7W6P/aM+3lzKjGKnnigk4rL6Jzp5f2wkq7k/tfLKg0nVERez kQeXR/MpOOyH8Lfp2IygiXF7yphv3eOj3H3d8Ilr17lYG+5oLs/ueK+gMfUKBZfaSJF7Fy /O51UeMkbqSS6ZQkoWFAzuqcSl8PDiLvQlSOZlmqsJ14ObD5x7iG7FIE4lB3AQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1756240326; a=rsa-sha256; cv=none; b=ojgiT5W3fVXxPnxqEOuPgNSCZmc2U1FCwHZqKQ3tj5cCESfozKpR97FsISyZTad/NkfiIf /z1nNNL9TJi5k0DWnyYPGeO6vTfjWlxOQqArx1m08L5w0eEYsotTNovY3yfEyvBHq9SnGx Nyj+NHEHock9qL+9Q3x5pj6k9LmoRaWmOiZofpXc7u6o0soIpWoPRfGiDvGAFuJqP2STsE SPmTHHqVaqaEyk4Hl60SCer6Mi8dPZjVU6du7keiu1BmvvEzBPOCqnnrVUUFcj3Nl8LrG0 cnh+DcwOBgLznEZlM+xeI6hBMjv3boPFfYTa7H+fV5slWanTY1hKYCEgbqWxKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cBK8Q2bL4ztw5; Tue, 26 Aug 2025 20:32:06 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <943978ca-4825-43bf-94c2-9e539c56deab@FreeBSD.org> Date: Tue, 26 Aug 2025 15:32:04 -0500 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: hastd not working, getgroups failure, COMPAT_FREEBSD14 enabled To: "S. Ross Gohlke" , freebsd-current@FreeBSD.org References: <27174be9-3057-4e86-b21e-00fb133b77f9@bisd.ro> Content-Language: en-US From: Kyle Evans In-Reply-To: <27174be9-3057-4e86-b21e-00fb133b77f9@bisd.ro> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 8/26/25 15:05, S. Ross Gohlke wrote: > I tried running the latest PRERELEASE snapshot obtained from , published on Aug. 22. > > The hastd rc service starts but "hastctl status" fails with the following error message: > [CRIT] Assertion failed: (getgroups(0, NULL) == 1), function drop_privs, file /usr/src/sbin/hastd/subr.c, line 287. > > I have followed the "UPDATING stuff" thread on this list about 14 compatibility, and my understanding is that getgroups syscalls should work as long as the kernel has "options COMPAT_FREEBSD14" enabled. > > I am running a custom kernel, but it is based on MINIMAL, so "options COMPAT_FREEBSD14" is enabled. > > % sysctl kern.conftxt | grep COMPAT_FREEBSD14 > options    COMPAT_FREEBSD14 > > Am I doing something wrong? Might this be fixed in the next snapshot (due Thursday)? > Bah; I had adjusted the assertions, but overlooked one that doesn't make sense. The last two could probably be coalesced, but it's probably worth being sure that we don't still return one gid if room was created for whatever reason. Try this: diff --git a/sbin/hastd/subr.c b/sbin/hastd/subr.c index 284fb0d07647..add1280e960b 100644 --- a/sbin/hastd/subr.c +++ b/sbin/hastd/subr.c @@ -284,7 +284,7 @@ drop_privs(const struct hast_resource *res) PJDLOG_VERIFY(rgid == pw->pw_gid); PJDLOG_VERIFY(egid == pw->pw_gid); PJDLOG_VERIFY(sgid == pw->pw_gid); - PJDLOG_VERIFY(getgroups(0, NULL) == 1); + PJDLOG_VERIFY(getgroups(0, NULL) == 0); PJDLOG_VERIFY(getgroups(1, gidset) == 0); pjdlog_debug(1,