Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [day] [month] [year] [list]
Date: Tue, 14 Jan 2014 08:07:57 +0400
From: "(GalaxyMaster)" <>
Subject: absolute() in /etc/init.d/functions is unreliable


In /etc/init.d/functions we have a defined subroutine called absolute().
The purpose of that subroutine is to return the absolute path of the
provided executable.  However, 'type -afp <file>' behaves unreliably if
the PATH system variable contains a directory where <file> resides
$ echo "$PATH"
$ type -afp file
$ export PATH="/usr/bin:$PATH"
$ echo "$PATH"
$ type -afp file

My initial thought was to remove -a from the type command (this way it
just returns the first match), but -a also ensures that type is not
using hashed paths (i.e. cached values).

I stumbled upon this multiple times when I was installing 3rd party

I'm not sure how to fix this issue properly, but was wondering why we
are implementing a substitute for which(1) that we are providing with
Owl?  Maybe the absolute() subroutine should be enhanced in such a way
that it uses which(1) if it is in PATH, but fallback to type otherwise?


Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ