[issue10032] os.setuid and os.setgid have unexpected influence on serial module

2010-10-06 Thread Tjeerd Pinkert
Tjeerd Pinkert t.j.pink...@alumnus.utwente.nl added the comment: Indeed I use Linux, sorry for the inconvenience of not mentioning. Thanks Ned, I think this is indeed the case. Using os.setgroups with a list of group ids (one for the file access, one for the serial port) before switching user

[issue10032] os.setuid and os.setgid have unexpected influence on serial module

2010-10-06 Thread Ned Deily
Ned Deily n...@acm.org added the comment: It could be a feature of os that the groups of the user are set on a os.setuid call? Or would this break compatibility with the standard unix library behaviour? The POSIX system interface specification specifically prohibits that: The setuid()

[issue10032] os.setuid and os.setgid have unexpected influence on serial module

2010-10-05 Thread Tjeerd Pinkert
New submission from Tjeerd Pinkert t.j.pink...@alumnus.utwente.nl: If I use os.setgid and os.setuid to switch to an other user in some daemon code, I cannot open the serial port anymore. If I run the same code directly from the user I can open the serial port. Since the serial module is using

[issue10032] os.setuid and os.setgid have unexpected influence on serial module

2010-10-05 Thread Tjeerd Pinkert
Changes by Tjeerd Pinkert t.j.pink...@alumnus.utwente.nl: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10032 ___ ___

[issue10032] os.setuid and os.setgid have unexpected influence on serial module

2010-10-05 Thread Ned Deily
Ned Deily n...@acm.org added the comment: While you did not specify what platform you are running this on, the issue here is almost certainly a misunderstanding of how permissions work. On UNIX-y systems, access to device files is normally governed by permissions like any other file or

[issue10032] os.setuid and os.setgid have unexpected influence on serial module

2010-10-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: If you do want to pursue this further note that [your] own crappy code is a better reproducer to post than something that depends on a third party module. -- nosy: +r.david.murray ___ Python