> The global variables gid and egid are only set at one place; > actually, it's visible in your patch itself in tetris.c. > So we know both are always the process's real, effective, or saved GID. > Consequently, setegid() cannot fail, and there is no need to check.
Yes. Long term, I would like to see the games stop being setgid as a way to write to /var. One day, it would be nice if /var cannot be filled up in a hostile fashion...