FAQ
I have a program (which normally runs as root) which can start child
processes as different users.
Effectively, my program is a modified version of popen2's Popen3 class
where the child process (after the fork) does:

os.setregid (gid, gid)
os.setreuid (uid, uid)
session_pid = os.setsid ()

This all seems to work. However, I am running into a problem where the
environment of the new process still carries values that were set
before the setreuid() call.

What would be the best way to go about modifying the environment
without having to re-implement all the functionality of the 'su'
command?

I could use it (the 'su' command) to start the new process but I'd like
to avoid external dependencies like that.

Thank you
--
Mitko Haralanov
==========================================
The program isn't debugged until the last user is dead.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedSep 30, '08 at 6:56p
activeSep 30, '08 at 6:56p
posts1
users1
websitepython.org

1 user in discussion

Mitko Haralanov: 1 post

People

Translate

site design / logo © 2022 Grokbase