From 3809a8fdebc7087514443871f875d64c9e24e447 Mon Sep 17 00:00:00 2001 From: hubertf Date: Sat, 17 Jul 1999 19:57:03 +0000 Subject: The patch below improves the security of the game atc(6), by having it open the score file at the start and then drop all setgid privileges while keeping a (close-on-exec) file descriptor open to it. In order to allow this the static data files have to be made world readable. In addition a potential buffer overrun with corrupted score files is avoided by more careful use of scanf (note that SCORE_SCANF_FMT is defined alongside the definition of the relevant structure). Submitted in PR 8015 by Joseph Myers --- atc/extern.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'atc/extern.h') diff --git a/atc/extern.h b/atc/extern.h index 802ae9b2..7931c3ec 100644 --- a/atc/extern.h +++ b/atc/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.7 1998/11/10 13:43:30 hubertf Exp $ */ +/* $NetBSD: extern.h,v 1.8 1999/07/17 19:57:03 hubertf Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -97,6 +97,7 @@ char name __P((const PLANE *)); int next_plane __P((void)); void noise __P((void)); int number __P((char)); +void open_score_file __P((void)); void planewin __P((void)); int pop __P((void)); void push __P((int, int)); -- cgit v1.2.3-56-ge451