tiny tetris patch

2015-03-15 Thread David CARLIER
Hi all, As tetris is one of my preferred game :-) ... just did wrapper around setegid in same manner than xmalloc and such. If it can find any use ... Thanks. Index: scores.c === RCS file: /cvs/src/games/tetris/scores.c,v retrieving

Re: tiny tetris patch

2015-03-15 Thread Ingo Schwarze
Hi David, David CARLIER wrote on Sun, Mar 15, 2015 at 09:09:25AM +: As tetris is one of my preferred game :-) ... just did wrapper around setegid in same manner than xmalloc and such. If it can find any use ... This doesn't make sense to me. The global variables gid and egid are only set

Re: tiny tetris patch

2015-03-15 Thread Kenneth Gober
On Sun, Mar 15, 2015 at 1:21 PM, Theo de Raadt dera...@cvs.openbsd.org wrote: One day, it would be nice if /var cannot be filled up in a hostile fashion... slightly off-topic, but I routinely make /var and /var/log separate filesystems (especially on Internet-facing hosts). this might be

Re: tiny tetris patch

2015-03-15 Thread Theo de Raadt
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

Re: tiny tetris patch

2015-03-15 Thread Theo de Raadt
On Sun, Mar 15, 2015 at 1:21 PM, Theo de Raadt dera...@cvs.openbsd.org wrote: One day, it would be nice if /var cannot be filled up in a hostile fashion... slightly off-topic, but I routinely make /var and /var/log separate filesystems (especially on Internet-facing hosts). this