[issue6508] expose setresuid

2009-11-27 Thread Martin v . Löwis
Martin v. Löwis added the comment: I have now added documentation to os.rst, and committed the patch as r76550 and r76552. Thanks for contributing it. -- resolution: -> accepted status: open -> closed ___ Python tracker

[issue6508] expose setresuid

2009-11-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: Attaching an updated patch that includes unittests. I also changed the set functions to take input as long's instead of int's as that is more likely to fit within a uid_t and forced the return values on the get's to fit within a long and used Py_BuildValue(

[issue6508] expose setresuid

2009-09-18 Thread Travis H.
Travis H. added the comment: On Fri, Sep 18, 2009 at 07:44:56AM +, Martin v. L??wis wrote: > > Your patch looks good (except that in getresuid, you seem to be missing > return). I have no clue why it doesn't work; I'll see whether I can try it > out on Linux within the next few weeks. I

[issue6508] expose setresuid

2009-09-18 Thread Travis H.
Travis H. added the comment: This patch fixes a number of typos in the original and, to my knowledge, is now complete. I have tested this manually and confirmed that it works. I would start as root, setresuid/gid to some non-root uid/gids, getresuid/gid to test those functions, and follow it u

[issue6508] expose setresuid

2009-09-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: Your patch looks good (except that in getresuid, you seem to be missing return). I have no clue why it doesn't work; I'll see whether I can try it out on Linux within the next few weeks. The one puzzling detail is that you don't include a patch to pyconfig.

[issue6508] expose setresuid

2009-09-17 Thread Travis H.
Travis H. added the comment: I applied the same patch to Python 2.6.2 and believe that I got the tab/space situation worked out so that it's consistent with the rest of posixmodule.c I also executed autoconf to convert configure.in to configure, and judging by the config.log, it is testing for

[issue6508] expose setresuid

2009-09-17 Thread Travis H.
Travis H. added the comment: Simplified if/else chaining Uploading here before testing on new machine (m4 was too old on previous machine) -- Added file: http://bugs.python.org/file14918/foo.txt ___ Python tracker

[issue6508] expose setresuid

2009-09-17 Thread Martin v . Löwis
Martin v. Löwis added the comment: Your patch looks right, although I have a few style issues: - the if chaining looks complicated: we don't usually have an else when the if returns - make sure you use tabs consistently with the rest of the file - it may be better to use uid_t where appropriate

[issue6508] expose setresuid

2009-09-17 Thread Martin v . Löwis
Martin v. Löwis added the comment: Please do try this out on your system. Installing autoconf locally is really not difficult: download 2.61, then do ./configure --prefix=$HOME/ac261 make make install This will give you $HOME/ac261/bin/auto{conf|header}; automake is not needed for Python. -

[issue6508] expose setresuid

2009-09-16 Thread Dave Malcolm
Dave Malcolm added the comment: > I cannot test this in my current environment because I'm stuck with Red > Hat and it does not have a recent enough automake to re-create configure > from configure.in. FWIW, it may be an _autoconf_ version issue; I'm able to recreate a "configure" from Python's

[issue6508] expose setresuid

2009-09-16 Thread Travis H.
Travis H. added the comment: I have coded up a first draft at implemented {get,set}res{gid,uid} functions. This completes the exposure of the user and group setting functions, and enables python programmers to be able to safely drop privileges, for example when running network daemons as root t

[issue6508] expose setresuid

2009-08-27 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue6508] expose setresuid

2009-08-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Where would be the best place to put these non-POSIX calls? > > I looked at posixmodule.c and it's a mess; much conditional CPP logic > governing what gets compiled, not clear where I should add something > like this there - if I should at all, since these r

[issue6508] expose setresuid

2009-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Yes, just put it near the numerous set_XXXuid functions, protected with a HAVE_SETRESUID macro (you will have to modify configure.in as well) -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue6508] expose setresuid

2009-08-21 Thread Travis H.
Travis H. added the comment: Where would be the best place to put these non-POSIX calls? I looked at posixmodule.c and it's a mess; much conditional CPP logic governing what gets compiled, not clear where I should add something like this there - if I should at all, since these routines are not

[issue6508] expose setresuid

2009-08-21 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/o

[issue6508] expose setresuid

2009-08-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: Would you like to work on a patch? -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mai

[issue6508] expose setresuid

2009-07-17 Thread Travis H.
Travis H. added the comment: should also expose setresgid for same reason. Paper also defines a higher-level API in section 8.2.1 that would probably be worth implementing. -- ___ Python tracker __

[issue6508] expose setresuid

2009-07-17 Thread Travis H.
New submission from Travis H. : Python should expose setresuid in the same module that exposes setuid. The reason why is complicated, but is best explained here: http://www.eecs.berkeley.edu/~daw/papers/setuid-usenix02.pdf I might work on a patch to implement this. -- components: Exte