On Sat, Dec 18, 2010 at 01:22:22AM +0100, Han Boetes wrote: > Mark Kettenis wrote: > > > From: Marco Peereboom <sl...@peereboom.us> > > > > > > I kind of disagree with you mark and I think that the diff > > > makes sense. > > > > FWIW, I feel too strongly about this. > > If you want to check it check it properly. For example use stat to > see if LD_PRELOAD contains an existing file or use file to see if > it's really a library. But checking if LD_PRELOAD only contains an > empty string seems like a non check. Would you also check if it > contained a space or two spaces? > > Actually there is no need to check since if the file is not a valid > library the result would be an error which the user has to debug. > > Something about giving users enough rope...
I was just writting to ask what happens if there's a space or a tab :-) I think Han phrased it quite well and I agree with him. There's no need for this check. And the fact that you encountered an empty LD_PRELOAD was so obviously a case of bad scripting that when you wrote the second mail and confirmed it I decided to reply and say no to this.