summaryrefslogtreecommitdiff
path: root/devel/gdb/patches/patch-aq
blob: 8914a8e5a2173518ce97ea9043156b68eac5299e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-aq,v 1.1 2007/07/03 12:41:18 lkundrak Exp $

Patch for CVE-2005-1705 from Gentoo #88398.

--- gdb/main.c.orig	2002-09-28 17:10:31.000000000 +0200
+++ gdb/main.c
@@ -626,7 +626,7 @@ extern int gdbtk_test (char *);
 
   if (!homedir
       || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
-    if (!inhibit_gdbinit)
+    if (!inhibit_gdbinit && (cwdbuf.st_uid == getuid()) && (!cwdbuf.st_mode & (S_IWOTH)))
       {
 	catch_command_errors (source_command, gdbinit, 0, RETURN_MASK_ALL);
       }