public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Richard Fish <bigfish@asmallpond.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] non-sudo way for user to run shutdown -h now? (or any equivalent)
Date: Wed, 20 Jul 2005 23:15:59 +0200	[thread overview]
Message-ID: <42DEBF0F.6020101@asmallpond.org> (raw)
In-Reply-To: <cee44eb3050720121665b84b60@mail.gmail.com>

Wade Brown wrote:

>I thought linux wouldn't allow suid shell scripts to work as suid. 
>The reasoning is a shell script doesn't quite execute, it gets
>interpeted by the command on the first line.  Just as a test I made a
>simple script modded root.root 4755 that consists of the /bin/bash
>line, and cat /etc/shadow.  Root can run just fine obviously, but
>permissions don't exist for other users to do that.
>
>  
>

Works fine on my machine.  /opt/vmware/lib/vmware/bin/vmware-vmx is a 
setuid shell script that I wrote to startup vmware with the wrapper 
library to get vmware to work with arts.  Also my permissions on that 
file are 4711, so maybe there is something special about the global read 
bit?  Or possibly dependant upon what LSM modules you have loaded/enabled?

>What may work a little better is either chmod s+x `which shutdown`, or
>writing a C wrapper and modding that s+x.
>  
>

I agree that the C wrapper is definetly the most secure option.

-Richard

-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2005-07-20 21:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-20 17:29 [gentoo-user] non-sudo way for user to run shutdown -h now? (or any equivalent) Mark Knecht
2005-07-20 17:47 ` Richard Fish
2005-07-20 18:06   ` Mark Knecht
2005-07-20 19:16     ` Wade Brown
2005-07-20 21:15       ` Richard Fish [this message]
2005-07-20 21:17     ` Richard Fish
2005-07-21  1:49     ` Iain Buchanan
2005-07-20 20:05 ` Rafer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42DEBF0F.6020101@asmallpond.org \
    --to=bigfish@asmallpond.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox