Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 132943

Summary: sandbox bashrc looks very wrong
Product: Portage Development Reporter: ferret <ferret-bgo>
Component: SandboxAssignee: Sandbox Maintainers <sandbox>
Status: RESOLVED INVALID    
Severity: normal CC: ed, jakub
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description ferret 2006-05-10 13:18:03 UTC
I don't really have the time or knowledge to test this at the moment, but I happened to glance at /usr/share/sandbox/sandbox.bashrc :

if [[ -n ${LD_PRELOAD} && ${LD_PRELOAD} != *$SANDBOX_LIB* ]] ; then
        export LD_PRELOAD="${SANDBOX_LIB} ${LD_PRELOAD}"
elif [[ -z ${LD_PRELOAD} ]] ; then
        export LD_PRELOAD="${SANDBOX_LIB}"
fi

The if statement looks bad. '*' is pathname expansion in bash, but it's trying to do string matching or something here by the look of it.
Comment 1 Ed Catmur 2006-05-16 16:26:46 UTC
It's correct. [[ ]] tests have their own semantics for globbing. See bash(1).
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2006-05-17 06:13:47 UTC
(In reply to comment #1)
> It's correct. [[ ]] tests have their own semantics for globbing. See bash(1).
> 

Ditto - bug is invalid.