I have a situation I can't explain: I have an executable with setgid bit on. When I call getegid() it returns me the expected group. But once I spawn a shell from it using execl the shell no longer has this effective gid, but rather the one of the user launching it.
It actually always worked for me, but this system was recently upgraded and may some settings were changed. I can't strace it, because under strace setgid is not working. Any ideas?