[New-bugs-announce] [issue10388] spwd returning different value depending on privileges

Giampaolo Rodola' report at bugs.python.org
Thu Nov 11 15:03:12 CET 2010


New submission from Giampaolo Rodola' <g.rodola at gmail.com>:

As root:

>>> import spwd
>>> spwd.getspall()
[spwd.struct_spwd(sp_nam='root', sp_pwd='!', sp_lstchg=14895, sp_min=0, sp_max=99999, sp_warn=7, sp_inact=-1, sp_expire=-1, sp_flag=-1)
 ...
]

As limited user:

>>> import spwd
>>> spwd.getspall()
[]
>>> 

Wouldn't it be better for consistency to raise OSError EACCES instead?

----------
messages: 120950
nosy: giampaolo.rodola
priority: normal
severity: normal
status: open
title: spwd returning different value depending on privileges
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10388>
_______________________________________


More information about the New-bugs-announce mailing list