zsh-workers
 help / color / mirror / code / Atom feed
* Re: builtin setuid and setgid commands
       [not found] <pdy98830624063bc12cb7255de8@192.168.1.2>
@ 2006-09-12 19:51 ` Mikael Magnusson
  2006-09-12 20:57   ` Dave Yost
  0 siblings, 1 reply; 4+ messages in thread
From: Mikael Magnusson @ 2006-09-12 19:51 UTC (permalink / raw)
  To: Dave Yost; +Cc: zsh-workers

On 9/12/06, Dave Yost <Dave@yost.com> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: builtin setuid and setgid commands
  2006-09-12 19:51 ` builtin setuid and setgid commands Mikael Magnusson
@ 2006-09-12 20:57   ` Dave Yost
  2006-09-13  0:56     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Yost @ 2006-09-12 20:57 UTC (permalink / raw)
  To: zsh-workers

At 09:51 PM +0200 2006-09-12, Mikael Magnusson wrote:
>On 9/12/06, Dave Yost <Dave@yost.com> 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

Thanks.  Also note:

0 516 Z% grep setuid /tmp/zshall.1
1 517 Z%     

:)

Dave


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: builtin setuid and setgid commands
  2006-09-12 20:57   ` Dave Yost
@ 2006-09-13  0:56     ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2006-09-13  0:56 UTC (permalink / raw)
  To: zsh-workers

On Sep 12,  1:57pm, Dave Yost wrote:
}
} Thanks.  Also note:
} 
} 0 516 Z% grep setuid /tmp/zshall.1
} 1 517 Z%     

Um, man1/zshall.1, is just a wrapper that contains a whole lot of .so
commands to read in the other sections.  So unless /tmp/zshall.1 is
the output of "man zshall" or is a copy of e.g. cat1/zshall.1, you're
not going to find anything interesting.

Try "grep -i uid zshparam.1" for example.  The older the part of the
zsh manual you're looking at (and the EUID parameter is *really* old)
the more likely it is to have been written for the benefit of non-
programmer college freshmen, not people who would have any idea what
"setuid" means or even what a system call is ... and I don't think it's
reasonable to expect that the manual for an interactive shell would
contain a reference to a specific system call in any case.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* builtin setuid and setgid commands
@ 2006-09-12 19:16 Dave Yost
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Yost @ 2006-09-12 19:16 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-13  0:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <pdy98830624063bc12cb7255de8@192.168.1.2>
2006-09-12 19:51 ` builtin setuid and setgid commands Mikael Magnusson
2006-09-12 20:57   ` Dave Yost
2006-09-13  0:56     ` Bart Schaefer
2006-09-12 19:16 Dave Yost

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).