Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: builtin setuid and setgid commands



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



Messages sorted by: Reverse Date, Date, Thread, Author