From owner-freebsd-current@FreeBSD.ORG Sun Nov 23 19:54:53 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E705716A4CE for ; Sun, 23 Nov 2003 19:54:53 -0800 (PST) Received: from sbk-gw.sibnet.ru (sbk-gw.sibnet.ru [217.70.96.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60E6543FF2 for ; Sun, 23 Nov 2003 19:54:41 -0800 (PST) (envelope-from stranger@sberbank.sibnet.ru) Received: from sbk-gw.sibnet.ru (localhost [127.0.0.1]) by sbk-gw.sibnet.ru (8.12.9p2/8.12.9) with ESMTP id hAO3sAoV063301; Mon, 24 Nov 2003 09:54:10 +0600 (NOVT) (envelope-from stranger@sberbank.sibnet.ru) Received: from localhost (stranger@localhost)hAO3sAfA063298; Mon, 24 Nov 2003 09:54:10 +0600 (NOVT) (envelope-from stranger@sberbank.sibnet.ru) X-Authentication-Warning: sbk-gw.sibnet.ru: stranger owned process doing -bs Date: Mon, 24 Nov 2003 09:54:10 +0600 (NOVT) From: "Maxim M. Kazachek" X-X-Sender: stranger@sbk-gw.sibnet.ru To: David Wolfskill In-Reply-To: <200311240343.hAO3hWmU002266@bunrab.catwhisker.org> Message-ID: <20031124094608.F63263@sbk-gw.sibnet.ru> References: <200311240343.hAO3hWmU002266@bunrab.catwhisker.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-1.5 required=5.0 tests=BAYES_01 autolearn=ham version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on sbk-gw.sibnet.ru cc: current@freebsd.org Subject: Re: Unfortunate dynamic linking for everything X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2003 03:54:54 -0000 On Sun, 23 Nov 2003, David Wolfskill wrote: >>Date: Mon, 24 Nov 2003 09:34:08 +0600 (NOVT) >>From: "Maxim M. Kazachek" > >> So, imagine, i'm accidentally deleted /bin with your most wanted >>static sh... And, of course, due to static nature of /bin/sh it was >>removed from /rescue? Nothing will protect you from shooting in the leg, >>neither static linking, nor assumption that /lib is OK. > >So go ahead and make /bin/sh also have a (hard) link to /rescue/sh. >Then the referenced action merely decrements the link count, and the >executable itself doesn't go away. > >Sure, you could be more imaginative with foot-shooting, but the stated >problem is really easy to avoid. > >Peace, >david (reluctant to contribute to this thread....) >-- >David H. Wolfskill david@catwhisker.org >If you want true virus-protection for your PC, install a non-Microsoft OS >on it. Plausible candidates include FreeBSD, Linux, NetBSD, OpenBSD, and >Solaris (in alphabetical order). I'm a real masochist, and removed /rescue/sh /sbin/sh whatsoever. And after that will begin complain, that FreeBSD is ugly, non bullet-proof operating system... :-) But, in fact, as I can remember, all /rescue stuff is one hadlinked executable. I don't think that hardlinking /bin/sh into /rescue would be nice idea... IMHO it's not clear. Sincerely, Maxim M. Kazachek mailto:stranger@sberbank.sibnet.ru mailto:stranger@fpm.ami.nstu.ru