Project

General

Profile

Bug #1152

Release: problems with sed

Added by Anna Maria Bigatti over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Release
Target version:
Start date:
03 Feb 2018
Due date:
% Done:

100%

Estimated time:
0.99 h
Spent time:

Description

For some compilations there are problems with the path for sed.

History

#1 Updated by John Abbott over 6 years ago

(A) The simplest solution is to call sed directly without using its full path:
  • +++ should work everywhere
  • --- might call an unknown executable, if the user has another sed in their path
(B) We could attempt to build a list of all known paths to sed, and then write a script to pick the right one from the list.
  • +++ should avoid the risk of calling an unknown (malicious?) executable
  • --- it could be tedious and time-consuming to build and maintain the list of possible paths

JAA thinks the risk of running an unknown executable called sed is quite low, so suggests adopting the simpler solution.

#2 Updated by Anna Maria Bigatti over 6 years ago

John Abbott wrote:

(A) The simplest solution is to call sed directly without using its full path:
  • +++ should work everywhere
  • --- might call an unknown executable, if the user has another sed in their path
    JAA thinks the risk of running an unknown executable called sed is quite low, so suggests adopting the simpler solution.

I agree!

#3 Updated by Anna Maria Bigatti over 6 years ago

There is a problem now.... I cannot remember and find where sed is called....

#4 Updated by John Abbott over 6 years ago

  • Status changed from New to In Progress

Try doc/Makefile ;-)

#5 Updated by John Abbott over 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 10 to 80

I have changed the relevant lines in Doc/Makefile. It works for me.

I'm still a bit uneasy about calling a command without its full path...

#6 Updated by John Abbott almost 6 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 80 to 100
  • Estimated time set to 0.99 h

I have just checked doc/Makefile and noticed that it calls both sed and txt2tags without specifying the full paths of the executables... so being paranoid about sed but not about txt2tags is fairly pointless.

We can accept the current solution, but should remember that it is "risky" (if someone should put a malicious sed or txt2tags in the path for executables.

Closing.

Also available in: Atom PDF