From ea479e7e772e8ae07c4dce6661b2b092756725ef Mon Sep 17 00:00:00 2001
From: Sven Geuer <sge@debian.org>
Date: Mon, 3 Mar 2025 22:35:58 +0100
Subject: [PATCH] Ignore current directory when searching for files to display.

A file to be displayed gets copied or unpacked to /tmp. This can result in
exposing private data due transferring the file to a potentially foreign file
system not supporting proper access control.

See https://bugs.debian.org/1077605 for more details.
From: https://github.com/baszoetekouw/pinfo/pull/39
---
 doc/pinfo.1.in  | 2 +-
 src/datatypes.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/pinfo.1.in b/doc/pinfo.1.in
index bb285cc..31b80a4 100644
--- a/doc/pinfo.1.in
+++ b/doc/pinfo.1.in
@@ -11,7 +11,8 @@
 read by passing it an
 .I infopage
 argument. This argument contains the name of an info page (i.e. 'bash').
-The program will then (by default) search for it in the current directory,
+The program will then (by default) search for it in
+.IR "@PREFIX@/share/info",
 .IR "/usr/share/info",
 .IR "/usr/info",
 .IR "/usr/local/share/info",
diff --git a/src/datatypes.c b/src/datatypes.c
index 352b9a6..e804cdd 100644
--- a/src/datatypes.c	2019-02-16 20:23:32.000000000 +0000
+++ b/src/datatypes.c	2025-08-21 20:28:02.877958308 +0000
@@ -29,7 +29,7 @@
 char *maileditor = "mail";
 char *printutility = "lpr";
 char *manlinks = "1:8:2:3:4:5:6:7:9:n:l:p:o:3X11:3Xt:3X:3x";
-char *configuredinfopath = ".:/usr/share/info:/usr/info:/usr/local/share/info:/usr/local/info:/opt/info";
+char *configuredinfopath = "@PREFIX@/share/info:/usr/share/info:/usr/info:/usr/local/share/info:/usr/local/info:/opt/info";
 char *ignoredmacros = 0;
 char *rcfile = NULL;
 
