classification
Title: get{pw,gr}{nam,[ug]id}() calls are not re-entrant
Type: behavior Stage: test needed
Components: Library (Lib) Versions: Python 3.2, Python 3.1, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, dhduvall
Priority: normal Keywords:

Created on 2009-07-20 22:54 by dhduvall, last changed 2010-07-10 23:59 by BreamoreBoy.

Messages (2)
msg90743 - (view) Author: Danek Duvall (dhduvall) Date: 2009-07-20 22:54
In tracking down

        6861990 getgrnam_r() str2group() function makes decisions based
on return value before it's set

(viewable on bugs.opensolaris.org), I noted that the pwd and grp modules
don't use the MT-safe interfaces to the password and group name service
tables.  The _r() interfaces have been around for a long time, are
standard, and should be used if at all possible.  That said, I can't
imagine it's terribly likely that people will go to the lengths
necessary to actually put multiple calls in flight at the same time in
CPython, but should it ever become easy to put this code into concurrent
threads, it'll likely fall over.
msg109947 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2010-07-10 23:59
Is this an issue that should be addressed?
History
Date User Action Args
2010-07-10 23:59:19BreamoreBoysetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
nosy: + BreamoreBoy

messages: + msg109947

stage: test needed
2009-07-20 22:54:44dhduvallcreate