From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6036 invoked by alias); 27 Oct 2006 15:33:14 -0000 Received: (qmail 6028 invoked by uid 22791); 27 Oct 2006 15:33:14 -0000 X-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e4.ny.us.ibm.com (HELO e4.ny.us.ibm.com) (32.97.182.144) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 27 Oct 2006 15:33:04 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e4.ny.us.ibm.com (8.13.8/8.12.11) with ESMTP id k9RFX1WQ018248 for ; Fri, 27 Oct 2006 11:33:01 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id k9RFX1Ii225306 for ; Fri, 27 Oct 2006 11:33:01 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k9RFX0rp030025 for ; Fri, 27 Oct 2006 11:33:00 -0400 Received: from [127.0.0.1] (sig-9-65-5-156.mts.ibm.com [9.65.5.156]) by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k9RFWvbD029680; Fri, 27 Oct 2006 11:32:59 -0400 Message-ID: <454226A5.2020307@us.ibm.com> Date: Fri, 27 Oct 2006 15:33:00 -0000 From: Vara Prasad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Frank Ch. Eigler" CC: systemtap@sources.redhat.com Subject: Re: marking tapset files References: <20061027132033.GI4978@redhat.com> In-Reply-To: <20061027132033.GI4978@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q4/txt/msg00261.txt.bz2 Frank Ch. Eigler wrote: >Hi - > >If you recall, scripts located under tapset/* are like libraries and >not mainline scripts people can run individually. This confusion is >biting several people. Short of some sort of mechanical enforcement, >do you think it would be worthwhile to put an additional header comment >into all our tapsets, near the copyright header (which they all should >have, hint hint): > > /* This file is part of the tapset library. It is not meant for > direct execution, but only for implicit use by other scripts. > See test case for an example. */ > >- FChE > > How about we change the extension type of these tapsets something like .tap instead of .stp that is used for end user scripts. I think we should also have the name of the tapsets start with lib*. I think we should also add some kind of signature inside the tapset at the top equivalent to the magic number of executables. If this convention is followed translator could recognize the difference between scripts and tapsets and error out if someone tries to execute them directly. If some user renames these files and tampers with the magic number we may not recognize it as a tapset and run into the same problem that we are facing today, but that is acceptable i guess if someone tampers with it.