Re: Inconsistency between os.getgroups and os.system('groups') after os.setgroups()

2012-03-26 Thread jeff
On Sunday, March 25, 2012 6:22:10 PM UTC-6, Ben Finney wrote: jeff writes: On Sunday, March 25, 2012 4:04:55 PM UTC-6, Heiko Wundram wrote: Am 25.03.2012 23:32, schrieb jeff: but I have to be able to get back to root privilege so I can't use setgid and setuid. Simply not

Inconsistency between os.getgroups and os.system('groups') after os.setgroups()

2012-03-25 Thread jeff
Run this test program as root: import os print before:, os.getgroups() os.system(groups) os.setgroups([]) print after:, os.getgroups() os.system(groups) After the os.setgroups, os.getgroups says that the process is not in any groups, just as you would expect. However the groups command run

Re: Inconsistency between os.getgroups and os.system('groups') after os.setgroups()

2012-03-25 Thread Heiko Wundram
Am 25.03.2012 23:32, schrieb jeff: After the os.setgroups, os.getgroups says that the process is not in any groups, just as you would expect... I can suppress membership in the root group only by doing os.setgid and os.setuid before the os.system call (in which case I wind up in the group of

Re: Inconsistency between os.getgroups and os.system('groups') after os.setgroups()

2012-03-25 Thread jeff
On Sunday, March 25, 2012 4:04:55 PM UTC-6, Heiko Wundram wrote: Am 25.03.2012 23:32, schrieb jeff: After the os.setgroups, os.getgroups says that the process is not in any groups, just as you would expect... I can suppress membership in the root group only by doing os.setgid and os.setuid

Re: Inconsistency between os.getgroups and os.system('groups') after os.setgroups()

2012-03-25 Thread Ben Finney
jeff 3bee...@gmail.com writes: On Sunday, March 25, 2012 4:04:55 PM UTC-6, Heiko Wundram wrote: Am 25.03.2012 23:32, schrieb jeff: but I have to be able to get back to root privilege so I can't use setgid and setuid. Simply not possible (i.e., you can't drop root privileges, be it