[syslog-ng] [PATCH 6/7] [system source]: Bail out on unknown systems, and use a clean environment.

Gergely Nagy algernon at balabit.hu
Thu Jun 2 21:07:12 CEST 2011


Balazs Scheidler <bazsi at balabit.hu> writes:

>> +# DO NOT REMOVE!!!
>> +# We have to force the script to use the OS's own utilities, instead of some
>> +# random stuff found in path. This is needed when PATH points to a uname binary
>> +# with some missing dependencies, due to LD_LIBRARY_PATH/LIBPATH settings. In those case, it's possible, that uname doesn't work...
>> +PATH=/bin:/usr/bin:$PATH
>> +LIBPATH=
>> +LD_LIBRARY_PATH=
>> +export PATH LIBPATH LD_LIBRARY_PATH
>>  
>>  os=${UNAME_S:-`uname -s`}
>>  osversion=${UNAME_R:-`uname -r`}
>
> Hmm... I really don't get this, what if the admin really want to change
> the uname binary? Can you explain when this is needed?

It was changed so that uname would be hard to override, and thus break
syslog-ng's system(). All systems I could think of quickly, had a
suitable uname in /bin or /usr/bin.

I do not really think there would be any reason to change the uname
binary, but one can still replace it in /usr/bin - or change the
SCL-called script to not override the PATH.

Basically, this is for the safety of users.

-- 
|8]


More information about the syslog-ng mailing list