Message118057
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 with os.setgid, os.setuid solved the problem.
I think os.initgroups(username, gid) does just this, only is not yet available in my distro.
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?
To David: Yes you are right, only it would have cost me quite a bit of time to strip the code, and I tried this code to see if the behaviour was consistent when using other daemon code. Next time I will post my own code. |
|
Date |
User |
Action |
Args |
2010-10-06 08:10:24 | Tjeerd.Pinkert | set | recipients:
+ Tjeerd.Pinkert, ned.deily, r.david.murray |
2010-10-06 08:10:24 | Tjeerd.Pinkert | set | messageid: <1286352624.15.0.73250512839.issue10032@psf.upfronthosting.co.za> |
2010-10-06 08:10:23 | Tjeerd.Pinkert | link | issue10032 messages |
2010-10-06 08:10:22 | Tjeerd.Pinkert | create | |
|