[issue10503] os.getuid() documentation should be clear on what kind of uid it is referring
New submission from Giampaolo Rodola'
Return the current process’s user id.
It is not clear, however, whether "user id" refers to real, effective or saved user id.
As per:
http://linux.about.com/library/cmd/blcmdl2_getuid.htm
...it should refer to _real_ user id.
----------
assignee: docs@python
components: Documentation
messages: 122117
nosy: docs@python, giampaolo.rodola
priority: normal
severity: normal
status: open
title: os.getuid() documentation should be clear on what kind of uid it is referring
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
_______________________________________
Python tracker
Giampaolo Rodola'
Return the name of the user logged in on the controlling terminal of the process. For most purposes, it is more useful to use the environment variable LOGNAME to find out who the user is, or pwd.getpwuid(os.getuid())[0] to get the login name of the currently effective user id.
Since os.getuid() refers to _real_ uid the last sentence should be changed as such:
- ... to get the login name of the currently effective user id.
+ ... to get the login name of the currently real user id.
----------
_______________________________________
Python tracker
R. David Murray
Giampaolo Rodola'
Changes by Adam Woodbeck
Greg added the comment:
Here's a wording change in the documentation to clarify this.
----------
keywords: +patch
nosy: +εσχατοκυριος
Added file: http://bugs.python.org/file35514/mywork.patch
_______________________________________
Python tracker
Roundup Robot added the comment:
New changeset 19172062e5c0 by Benjamin Peterson in branch '3.4':
specify that getuid() returns the real uid (closes #10503)
http://hg.python.org/cpython/rev/19172062e5c0
New changeset 6dfbe504f659 by Benjamin Peterson in branch '2.7':
specify that getuid() returns the real uid (closes #10503)
http://hg.python.org/cpython/rev/6dfbe504f659
New changeset 8866ac6f2269 by Benjamin Peterson in branch 'default':
merge 3.4 (#10503)
http://hg.python.org/cpython/rev/8866ac6f2269
----------
nosy: +python-dev
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
_______________________________________
Python tracker
participants (5)
-
Adam Woodbeck
-
Giampaolo Rodola'
-
Greg
-
R. David Murray
-
Roundup Robot