Re: pledge for tetris

2015-11-19 Thread Theo Buehler
Now that tedu moved the score file to $HOME, we can get by with "stdio rpath wpath cpath tty". Do some basic clean up in the manual. There's more to do, but leave that for later. Index: games/tetris/tetris.6 === RCS file: /var/cvs/s

Re: pledge for tetris

2015-11-17 Thread Tati Chevron
On Tue, Nov 17, 2015 at 12:21:32AM -0500, Michael McConville wrote: Ted Unangst wrote: Theo Buehler wrote: > drop the score file support No way! this is critical functionality. :) Seconded. :P I disagree - the obvious solution is to move tetris to ports for anyone who needs score file supp

Re: pledge for tetris

2015-11-16 Thread Ted Unangst
Ted Unangst wrote: > Theo Buehler wrote: > > In its current form, tetris is a setgid program and needs a whopping > > > > pledge("stdio rpath wpath cpath flock getpw id tty") > > > > throughout its lifetime because of the score file in /var/games. > > > > As discussed with Theo off-list, this is

Re: pledge for tetris

2015-11-16 Thread Theo Buehler
On Tue, Nov 17, 2015 at 12:15:59AM -0500, Ted Unangst wrote: > Theo Buehler wrote: > > In its current form, tetris is a setgid program and needs a whopping > > > > pledge("stdio rpath wpath cpath flock getpw id tty") > > > > throughout its lifetime because of the score file in /var/games. > > >

Re: pledge for tetris

2015-11-16 Thread Michael McConville
Ted Unangst wrote: > Theo Buehler wrote: > > drop the score file support > > No way! this is critical functionality. :) Seconded. :P

Re: pledge for tetris

2015-11-16 Thread Ted Unangst
Theo Buehler wrote: > In its current form, tetris is a setgid program and needs a whopping > > pledge("stdio rpath wpath cpath flock getpw id tty") > > throughout its lifetime because of the score file in /var/games. > > As discussed with Theo off-list, this is risk-only. Thus, drop the > score

Re: pledge for tetris

2015-11-16 Thread Theo Buehler
In its current form, tetris is a setgid program and needs a whopping pledge("stdio rpath wpath cpath flock getpw id tty") throughout its lifetime because of the score file in /var/games. As discussed with Theo off-list, this is risk-only. Thus, drop the score file support, lose the setgid bit a

Re: pledge for tetris

2015-11-15 Thread Theo Buehler
Please disregard. This patch breaks multiple simultaneous games. Sorry for the noise.

pledge for tetris

2015-11-15 Thread Theo Buehler
pledge("stdio rpath wpath cpath flock getpw id tty") for setup then play the game with "stdio rpath wpath getpw tty". Most of the promises are needed for dealing with the score file. The function getscores() currently appears towards the end of the program's lifetime and it calls setegid() and fl