Vajrasky Kok added the comment: Attached the patch to raise OSError instead of returning empty list if a normal user uses getspall function of spwd module.
I investigated about this issue. There exists situation where /etc/shadow file does not exist: https://bugs.kde.org/show_bug.cgi?id=117202 https://dev.openwrt.org/ticket/2887 So I think it is better to differentiate the result of the function where a normal user trying to access /etc/shadow file (permission denied, therefore should raise exception) or root user trying to access non-existent /etc/shadow file (therefore should get empty list). ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file31384/fix_error_message_getspall.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10388> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com