Issue 5705: os.getpwent returns unsigned 32bit value, os.setuid refuses it (original) (raw)

Issue5705

Created on 2009-04-05 22:37 by gregory.p.smith, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch_5705.diff boya,2009-09-01 22:34
Messages (10)
msg85582 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2009-04-05 22:37
Running test_httpservers on a 64-bit build of Python 2.7 trunk on OS X 10.5: (I added a print "nobody=", nobody) test_authorization (__main__.CGIHTTPServerTestCase) ... nobody= 4294967294 ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 55322) Traceback (most recent call last): File "/Users/greg/sandbox/python/trunk/Lib/CGIHTTPServer.py", line 251, in run_cgi os.setuid(nobody) OverflowError: signed integer is greater than maximum
msg85588 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2009-04-05 23:44
Fixed in r71299 trunk. Needs backporting to release26-maint and release30-maint. (I'm waiting for buildbot results before I do that)
msg85615 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2009-04-06 06:50
merged into release26-maint. release30-maint still needed.
msg85617 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-04-06 07:26
Closes duplicate Issue3586?
msg87064 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2009-05-03 20:22
release30-maint r72245 (its already been merged into py3k).
msg92144 - (view) Author: Boya Sun (boya) Date: 2009-09-01 22:34
Another potential bug discovered in posixmodule.c in the function posix_lchown: posix_lchown(PyObject *self, PyObject *args) { ... int uid, gid; ... if (!PyArg_ParseTuple(args, "etii:lchown", Py_FileSystemDefaultEncoding, &path, &uid, &gid)) ... } uid and gid could also cause over flow. Patch attached. Hope some one can comment on the patch, thanks a lot!
msg92399 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2009-09-07 23:21
@boya: It's maybe better to open a new issue for posix_lchown.
msg92466 - (view) Author: Boya Sun (boya) Date: 2009-09-09 21:05
Created issue 6879 following Victor's suggestion.
msg92468 - (view) Author: Boya Sun (boya) Date: 2009-09-09 21:07
Sorry, typo. Created issue 6873 following Victor's suggestion.
msg108758 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-06-26 23:20
I think this can be closed, now that there is another issue for posix_lchown.
History
Date User Action Args
2022-04-11 14:56:47 admin set github: 49955
2010-06-26 23:20:59 ezio.melotti set status: open -> closednosy: + ezio.melottimessages: + stage: resolved
2009-09-09 21:07:30 boya set messages: +
2009-09-09 21:05:54 boya set messages: +
2009-09-07 23:21:34 vstinner set nosy: + vstinnermessages: +
2009-09-02 20:55:27 joe.amenta set nosy: + joe.amenta
2009-09-02 20:42:21 brett.cannon set status: closed -> open
2009-09-01 22:34:52 boya set files: + patch_5705.diffnosy: + boyamessages: + keywords: + patch
2009-05-03 20:22:00 gregory.p.smith set status: open -> closedresolution: fixedmessages: +
2009-04-06 16:14:30 gregory.p.smith link issue3586 dependencies
2009-04-06 07:26:51 ned.deily set nosy: + ned.deilymessages: +
2009-04-06 06:50:46 gregory.p.smith set messages: + versions: - Python 2.6
2009-04-05 23:44:53 gregory.p.smith set messages: + versions: - Python 2.7
2009-04-05 22:37:55 gregory.p.smith create