comparison xrogue/state.c @ 143:7faf4568c295

Advanced Rogue family: overhaul privilege handling. Advanced Rogue 5 and 7, and XRogue, now open the scorefile and logfile at startup and then drop any set[ug]id privileges if the savedir is not being used.
author John "Elwin" Edwards
date Sat, 16 May 2015 13:39:26 -0400
parents cc5148bdf345
children 708bb2dea17c
comparison
equal deleted inserted replaced
142:6b5fbd7c3ece 143:7faf4568c295
3354 #endif 3354 #endif
3355 nonl(); 3355 nonl();
3356 crmode(); /* Cbreak mode */ 3356 crmode(); /* Cbreak mode */
3357 noecho(); /* Echo off */ 3357 noecho(); /* Echo off */
3358 } 3358 }
3359
3360 int
3361 md_normaluser(void)
3362 {
3363 #ifndef _WIN32
3364 setuid(getuid());
3365 setgid(getgid());
3366 #endif
3367 }