Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31138 > unrolled thread

Posix call (execve) breaks mercurial?

Started byWayne Werner <wayne@waynewerner.com>
First post2012-10-11 18:10 -0500
Last post2012-10-11 18:10 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Posix call (execve) breaks mercurial? Wayne Werner <wayne@waynewerner.com> - 2012-10-11 18:10 -0500

#31138 — Posix call (execve) breaks mercurial?

FromWayne Werner <wayne@waynewerner.com>
Date2012-10-11 18:10 -0500
SubjectPosix call (execve) breaks mercurial?
Message-ID<mailman.2072.1349997039.27098.python-list@python.org>
So... this is certainly the deepest I've got to dig into any source code.

I'm experimenting with Review Board for code reviews, and trying to get it 
set up/working here at work. When using post-review, however, I started 
getting issues with untrusted users - even though they were set to trusted 
in my ~/.hgrc and things worked fine otherwise.

So here's where things got weird. I could call 
`subprocess.check_output(['hg', 'root'])`, and things worked just fine. 
But when I added the env parameter, I got the untrusted issues. So if I 
did:

import os, subprocess

# Works just fine
subprocess.check_output(['hg', 'root'])

# Gives untrusted issues
subprocess.check_output(['hg', 'root'], env=os.environ)


Long story short, I dug around the source code and ended up at the POSIX 
execve function. I've been reading the manpages, but nothing seems to pop 
out at me as "hey, this should/shouldn't work!".

Does anyone know what's going on here, or where I should go for more help?

Thanks,
Wayne

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web