classification
Title: spwd returning different value depending on privileges
Type: Stage:
Components: Versions: Python 3.2, Python 3.1, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: giampaolo.rodola
Priority: normal Keywords:

Created on 2010-11-11 14:03 by giampaolo.rodola, last changed 2010-11-11 14:58 by eric.araujo.

Messages (1)
msg120950 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) (Python committer) Date: 2010-11-11 14:03
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?
History
Date User Action Args
2010-11-11 14:58:32eric.araujosetversions: - Python 2.6
2010-11-11 14:03:10giampaolo.rodolacreate