summaryrefslogtreecommitdiffstats
path: root/games/cribbage
diff options
context:
space:
mode:
Diffstat (limited to 'games/cribbage')
-rw-r--r--games/cribbage/instr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/games/cribbage/instr.c b/games/cribbage/instr.c
index a0414d8..5df7dae 100644
--- a/games/cribbage/instr.c
+++ b/games/cribbage/instr.c
@@ -74,6 +74,10 @@ instructions()
if (pager = rindex(path, '/'))
++pager;
pager = path;
+ if (setuid(getuid()) < 0) {
+ (void)fprintf(stderr, "cribbage: unable to setuid\n");
+ _exit(1);
+ }
execlp(path, pager, _PATH_INSTR, (char *)NULL);
(void)fprintf(stderr, "cribbage: %s.\n", strerror(errno));
_exit(1);
OpenPOWER on IntegriCloud