From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 11:43:32 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C9CB1065694 for ; Fri, 10 Sep 2010 11:43:32 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id DA7FA8FC15 for ; Fri, 10 Sep 2010 11:43:31 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ou20w-0003vW-EZ for freebsd-hackers@freebsd.org; Fri, 10 Sep 2010 13:43:30 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Sep 2010 13:43:30 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Sep 2010 13:43:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Fri, 10 Sep 2010 13:43:22 +0200 Lines: 30 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100518 Thunderbird/3.0.4 In-Reply-To: X-Enigmail-Version: 1.0.1 Subject: Re: How to disallow logout X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2010 11:43:32 -0000 On 09/10/10 05:27, Aryeh Friedman wrote: > I have a directory that must not exist on logout and rm -rf is not > sufficent to do it because the contents need to be processed by our > version control system. The real life scenario is our version > control system stores the repo for a given project encrypted but for > techinical reasons it needs to keep the checkouted files in plain text > (they are all in the same dir) and I want to *NEVER* have the plain > text checkouted files in my dir when I logout, *BUT* instead of just > deleting it I need to check them in... so how do I make my .logout so > if the file exists it will not exit and give a error saying that dir > is still there? (minor but unimportant side effect of the version > control system is the dir will have a different name everytime it is > made but always the same prefix) Have you thought about what should happen if for example, the login session is forcefully terminated by either of: 1) power outage of the server 2) power outage on the client 3) network problems (ssh or TCP connection drop) 4) administrative command (e.g. root executes "killall $shell") ? I don't think there is a way to protect from all of those, so any effort in protecting from only part of the problem looks useless. On the other hand, if partial solutions satisfy your requirements, maybe you can do something with http://glebkurtsou.blogspot.com/search/label/pefs .