From owner-freebsd-questions@freebsd.org Thu Mar 10 14:15:42 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63168ACB80B for ; Thu, 10 Mar 2016 14:15:42 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from bede.qeng-ho.org (bede.qeng-ho.org [217.155.128.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "fileserver.home.qeng-ho.org", Issuer "fileserver.home.qeng-ho.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 08FA8872 for ; Thu, 10 Mar 2016 14:15:41 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from arthur.home.qeng-ho.org (arthur.home.qeng-ho.org [172.23.1.2]) by bede.home.qeng-ho.org (8.15.2/8.15.2) with ESMTP id u2AEFcws001772; Thu, 10 Mar 2016 14:15:39 GMT (envelope-from freebsd@qeng-ho.org) Subject: Re: Are system updates without reboots possible? To: "Steve O'Hara-Smith" , freebsd-questions@freebsd.org References: <56E162B5.4010309@qeng-ho.org> <20160310131311.95dcd6c66c6dbf60339a2df0@sohara.org> From: Arthur Chance Message-ID: <56E1818A.1060604@qeng-ho.org> Date: Thu, 10 Mar 2016 14:15:38 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160310131311.95dcd6c66c6dbf60339a2df0@sohara.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 14:15:42 -0000 On 10/03/2016 13:13, Steve O'Hara-Smith wrote: > On Thu, 10 Mar 2016 12:04:05 +0000 > Arthur Chance wrote: > >> The latest security advisory on openssl contains the usual mantra >> >> "Restart all deamons using the library, or reboot the system." >> >> I usually just reboot but find myself wondering if there's a reliable >> *automatic* way of identifying which running programs use any given >> library (or set of libraries), and identify whether or not they're >> daemons controlled by service(8). >> >> I suppose root could use ps and ldd to identify affected programs, but >> this seems like brute force and I can't see how to tie into the >> service(8) structure. >> >> Anybody got ideas on this? It could be useful for updating servers you'd >> rather not reboot. > > You could just apply brute force and use service -R to restart all > services or reboot if the update included a new kernel. Overkill but safe. > I'd missed the -R option for service(8). Thanks for pointing that out. However, that only restarts daemons from /usr/local/etc/rc.d, not built-in system daemons from /etc/rc.d. Neither does it let me identify non-daemon running programs that are affected by a library update. -- Moore's Law of Mad Science: Every eighteen months, the minimum IQ necessary to destroy the world drops by one point.