opnsense-ports/games/xconq/files/patch-kernel__unix.c
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

20 lines
561 B
C

--- kernel/unix.c.orig
+++ kernel/unix.c
@@ -267,7 +267,7 @@
/* The scorefile is only writable by the owner of the Xconq
executable, but we normally run as the user, so switch over
before writing. */
- setuid(games_uid);
+ setgid(games_uid);
fp = open_file(score_file_pathname(name), "a");
return fp;
}
@@ -277,7 +277,7 @@
{
fclose(fp);
/* Reset the uid back to the user who started the game. */
- setuid(getuid());
+ setgid(getgid());
}
/* Given the name of a scorefile, return a complete path to it,