From nobody Tue Mar 18 19:10:32 2025 X-Original-To: desktop@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 4ZHLyd4Sr8z5r5QJ for ; Tue, 18 Mar 2025 19:10:33 +0000 (UTC) (envelope-from bugzilla-noreply@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 4ZHLyc5fK1z3rsv for ; Tue, 18 Mar 2025 19:10:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742325032; 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=1rVLtOwIRA4BD+ZGObDQeKj6bbCkhFBVv3wPWUdWECw=; b=q4tjaFgjpwG/A0Gu11IchfjvgFSHTsOwRGx61EltyW+FVdcvJxzOe6IVJnjDNm+jYtBUPC PPQY8QJm9Na8b59udbsAL52g0itmR3mXWWVD7AB4tri3O1/HBGD2kkNrxJmTFZRSERZPlP 9Kw4s8mzib2gm+InWeSfTpenvaufbKYmCUS3/0+87YRoyatlg2DD/kLKRMw2ul+vQmXSmV 3QQqUFJ9pNvBUu9MxOUjzH3MGOj8fZgkNONFuU7LoCNpar8I7ovyDNUIF/rlntWjJvdusQ /aRiOm90chf0bWtCbQONXYa8Mug+gOMSuvmGitntLCPptXMnz7RstY9nLtMV5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742325032; a=rsa-sha256; cv=none; b=t0LwK+iIBLZQ9RZKqheSrXduKBQevUZBzMYrbLRdeMEPBDft0uY5dINu5jlPWfwAMLDOMn 5YSjJVnSNTmh0QPVD/3j2jRYd3zoZFZl8GedVkDkbzaiGD0JbH6KwNXLWzKVu/yNWpj+Uu PooWCv4rRL817nbrsYJ5/t1y7/WYxrDFXpx96n5x2WYn6NgzJ0roeGUDzRDD9rcruYOaiC aVpiJ+tntFKCIclwd0ITsM0U0wlsUJJM00wMSe9CdNl3QQtBVQw4O7Ax7lyx3bWxYMtjAA n2P9mRUhkgrumgkz3gWA0ek0oH50J+0pdqEsR+KR0f4WxVYnfxuVM4r7QHwwgQ== 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=1742325032; 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=1rVLtOwIRA4BD+ZGObDQeKj6bbCkhFBVv3wPWUdWECw=; b=HrDi7VntnO43t+h6ljm/JgC+6dwdqlEDSITuUv58Q/OA+OWM2gew63eyCnoN5QZudrFAq8 ERnGI750Doo2kWwaAv2wze8l9fn0vnLkNbG7HpS7cT8ygA3U+OhCloAVwo+1IFTRmbGzZg 5HQOfXEjrbovVJEziEOUjxQsgsGojLxxFdIA929Pz4s1xsS1UbOSQMpAy1u0/VjwEXxNUf 4Mf3EO8wRWmj+RoUvSni1kQp/ndUcuki2FyH1HeOIfTRl5FCi/AXsEOdAn8zS2c0wfc3D2 MplH7NNV6KWps4RcUkbnApNdGNAgShpFgi21ryEB/QE4PSgzVPDKZ9Hn1/WDWg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4ZHLyc3lrWzmFx for ; Tue, 18 Mar 2025 19:10:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 52IJAWol014203 for ; Tue, 18 Mar 2025 19:10:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 52IJAW6T014201 for desktop@FreeBSD.org; Tue, 18 Mar 2025 19:10:32 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: desktop@FreeBSD.org Subject: [Bug 285394] sysutils/consolekit2 seems to use wrong tty Date: Tue, 18 Mar 2025 19:10:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: desktop@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Using and improving FreeBSD on the desktop List-Archive: https://lists.freebsd.org/archives/freebsd-desktop List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-desktop@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D285394 --- Comment #12 from Andriy Gapon --- (In reply to Gleb Popov from comment #11) That's a very interesting finding. Now things are less mysterious. Looking at vtterm_ioctl (I assume that we all use vt driver, not sc), CONS_GETVERS (used by ck_fd_is_a_console) should succeed for any terminal. So, I wonder if there could be some sort of a race. E.g., if the controlling terminal is revoked before CONS_GETVERS (or even before opening /dev/tty[*]) then the ioctl fails and the control flow proce= eds to using /dev/console and everything is okay. But if /dev/tty is still valid when CONS_GETVERS is issued, then ConsolKit proceeds to using it, but then it gets revoked and things go bad. But I am conjecturing now. Need to do more experiments. To answer your question, I am sure that /dev/console would work the same or even better than /dev/ttyv0 that my patch currently forces. But I am going to test it for 100% confidence. [*] /dev/tty is implemented as a special "ctty" device, see sys/kern/tty_tt= y.c. If a process opening /dev/tty has a controlling terminal, then the opened device is actually a clone of that terminal device. If the process does not have a controlling terminal, then the cloned device= is a clone of ctty special device and that device cannot be really opened. --=20 You are receiving this mail because: You are the assignee for the bug.=