From owner-freebsd-ports-bugs@freebsd.org Wed May 23 21:28:29 2018 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35B09EE68FA for ; Wed, 23 May 2018 21:28:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C2E437FBBB for ; Wed, 23 May 2018 21:28:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 87282EE68F8; Wed, 23 May 2018 21:28:28 +0000 (UTC) Delivered-To: ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FD44EE68F7 for ; Wed, 23 May 2018 21:28:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E92BE7FBB7 for ; Wed, 23 May 2018 21:28:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 01EAD21EEA for ; Wed, 23 May 2018 21:28:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NLSQXe045795 for ; Wed, 23 May 2018 21:28:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w4NLSQ2J045794 for ports-bugs@FreeBSD.org; Wed, 23 May 2018 21:28:26 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: ports-bugs@FreeBSD.org Subject: [Bug 228446] security/trousers: tcsd does not shutdown if ssh-agent is left running Date: Wed, 23 May 2018 21:28:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new 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: saper@saper.info X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: hrs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 21:28:29 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228446 Bug ID: 228446 Summary: security/trousers: tcsd does not shutdown if ssh-agent is left running Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: hrs@FreeBSD.org Reporter: saper@saper.info Flags: maintainer-feedback?(hrs@FreeBSD.org) Assignee: hrs@FreeBSD.org I am using the following setup: OpenSSL is configured to use libtpm: [openssl_def] engines =3D engine_section [engine_section] foo =3D tpm_section [tpm_section] dynamic_path =3D /usr/local/lib/openssl/engines/libtpm.so engine_id =3D tpm default_algorithms =3D ALL #default_algorithms =3D RAND,RSA init =3D 1 SSH client is configured to use libsimple-tpm-pk11.so: Host m PKCS11Provider /usr/home/saper/sw/simple-tpm-pk11/.libs/libsimple-tpm-pk11.= so GSSAPIAuthentication yes GSSAPIDelegateCredentials yes ForwardAgent yes ForwardX11 no User xxx I am using a vanilla /usr/local/etc/tcsd.conf I start ssh-agent from my .xsession file as eval `/usr/bin/ssh-agent -s` therefore it does not die when I kill my X session. I noticed that tcsd blocks system shutdown (gets killed eventually by the watchdog). Quick look at the source code and open sockets reveals, that ssh-agent maintains a persistent connection to tcsd. The easiest way to reproduce the problem with my config is to start a separ= ate shell with ssh-agent /bin/sh and try to stop tcsd in another terminal: sudo service tcsd stop as long as the shell is running tcsd will not stop. It is enough to exit the shell and after a second or two tcsd will shutdown. The shutdown is immediate if ssh-agent is not running. I think tcsd should be able to notice earlier that it is time to close its sockets and go away. --=20 You are receiving this mail because: You are the assignee for the bug.=