]> git.pld-linux.org Git - packages/crossavr-gdb.git/blobdiff - gdb-gdbinit-stat.patch
- read .gdbinit from current directory only if owned by current user and not world...
[packages/crossavr-gdb.git] / gdb-gdbinit-stat.patch
diff --git a/gdb-gdbinit-stat.patch b/gdb-gdbinit-stat.patch
new file mode 100644 (file)
index 0000000..47820e4
--- /dev/null
@@ -0,0 +1,11 @@
+--- gdb/main.c.orig    2005-04-08 18:21:50.000000000 -0400
++++ gdb/main.c 2005-04-08 18:41:15.000000000 -0400
+@@ -693,7 +693,7 @@
+   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);
+       }
This page took 0.056745 seconds and 4 git commands to generate.