This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/131/

On January 20th, 2015, 7:48 p.m. UTC, Miloslav Trmac wrote:

src/rolekit/async.py (Diff revision 1)
def input_handler(unused_fd, condition, unused_data):
294
    def demote(user_uid, user_gid):

AFAICS calling the demote() function is superfluous and, to me, confusing; we only need to pass the set_ids callable.

I actually looked up how to do this in several places and all the examples I could find insisted that it had to be done this way or else the calling application would also be affected by the permission drop. I'm choosing to trust them.


On January 20th, 2015, 7:48 p.m. UTC, Miloslav Trmac wrote:

src/rolekit/async.py (Diff revision 1)
def input_handler(unused_fd, condition, unused_data):
298
            os.setgid(user_gid)
299
            os.setuid(user_uid)

setre[ug]id() to make it explicit that both are changed?

Seems excessive, but ok, sure.


- Stephen


On January 20th, 2015, 6:12 p.m. UTC, Stephen Gallagher wrote:

Review request for RoleKit Mailing List, Miloslav Trmac, Stephen Gallagher, and Thomas Woerner.
By Stephen Gallagher.

Updated Jan. 20, 2015, 6:12 p.m.

Repository: rolekit

Description

Allow impersonating a different UID/GID in subprocesses

Diffs

  • src/rolekit/async.py (0f9ddaac1beb27cebdf41ca0383a62a807c4fcb6)

View Diff