From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8569 invoked from network); 12 Sep 2006 19:51:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Sep 2006 19:51:40 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 40231 invoked from network); 12 Sep 2006 19:51:34 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Sep 2006 19:51:34 -0000 Received: (qmail 12334 invoked by alias); 12 Sep 2006 19:51:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22697 Received: (qmail 12312 invoked from network); 12 Sep 2006 19:51:31 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 Sep 2006 19:51:31 -0000 Received: (qmail 39870 invoked from network); 12 Sep 2006 19:51:31 -0000 Received: from ug-out-1314.google.com (66.249.92.168) by a.mx.sunsite.dk with SMTP; 12 Sep 2006 19:51:27 -0000 Received: by ug-out-1314.google.com with SMTP id c2so4975364ugf for ; Tue, 12 Sep 2006 12:51:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uZG46miJbAHbQ+44QCfNCqikshUPqIKYtdi6nOnyceP5CSr1ZKg1c2a83TxavLmntyMVwQUQT/ZEePPNpHrO0RJnTZi7VmQ/+aLHb6/BUpehQwCxGA6oy61EtK4BQqRejGXm8kAPkXCuy0CRoJuA5YAcJQt/LS5WUBeUaPI/dIE= Received: by 10.67.22.2 with SMTP id z2mr3636652ugi; Tue, 12 Sep 2006 12:51:26 -0700 (PDT) Received: by 10.66.222.6 with HTTP; Tue, 12 Sep 2006 12:51:26 -0700 (PDT) Message-ID: <237967ef0609121251u4fa6cb4erd3061a267cf4a645@mail.gmail.com> Date: Tue, 12 Sep 2006 21:51:26 +0200 From: "Mikael Magnusson" To: "Dave Yost" Subject: Re: builtin setuid and setgid commands Cc: zsh-workers@sunsite.dk In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: On 9/12/06, Dave Yost wrote: > Zshell should have builtins to call the setuid and setgid system calls. > > With this feature, one can write a shell script that is executed by > root but runs as another user. > > The usefulness of this feature came up in the context of the > mysql.server script, which starts/stops the server and is run by root > at boot time. It would be nice if the script itself could use a > setuid command to ensure that it is running as the mysql user. > > Thanks > > Dave # whoami root # UID=1003 # whoami mikaelh # UID=0 # whoami mikaelh another session # whoami root # EUID=1003 # whoami mikaelh # EUID=0 # whoami root -- Mikael Magnusson