From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757351Ab1LWPK7 (ORCPT ); Fri, 23 Dec 2011 10:10:59 -0500 Received: from tn-76-7-162-101.sta.embarqhsd.net ([76.7.162.101]:59331 "EHLO animx.eu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751848Ab1LWPK5 (ORCPT ); Fri, 23 Dec 2011 10:10:57 -0500 Date: Fri, 23 Dec 2011 10:10:53 -0500 From: Wakko Warner To: Jiri Kosina Cc: Gaurav Saxena , linux-kernel@vger.kernel.org Subject: Re: Intercepting system calls Message-ID: <20111223151053.GB25014@animx.eu.org> Mail-Followup-To: Jiri Kosina , Gaurav Saxena , linux-kernel@vger.kernel.org References: <20111222190359.GF604@animx.eu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jiri Kosina wrote: > On Thu, 22 Dec 2011, Wakko Warner wrote: > > > > Oh. I will not do it then, could you suggest me something so that I > > > could prevent unlink on some file say using kernel support. I want to > > > save file on unlink how could I do that without kernel support, or how > > > could I do that using a kernel module. > > > > I wrote a library that can be loaded in userspace that does this. It's not > > very polished, but it works for me. I use it for rsync when I want files > > "deleted" but not from the filesystem. It creates a .deleted directory in > > the $PWD. > > I don't see a way how library could cover any arbitrary userspace process > issuing unlink() (consider statically linked binaries, for starters). It cannot. I already understand that static binaries cannot be trapped like this. -- Microsoft has beaten Volkswagen's world record. Volkswagen only created 22 million bugs.