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

Balazs Scheidler bazsi at balabit.hu
Thu Jun 2 20:49:05 CEST 2011


On Mon, 2011-05-23 at 11:56 +0200, Gergely Nagy wrote:
> From: Tamas Pal <folti at balabit.hu>
> 
> Force using OS's own uname implementation, over whatewer found in
> PATH. Die with error on an unsupported system or uname error.
> 
> Signed-off-by: Tamas Pal <folti at balabit.hu>
> ---
>  scl/system/generate-system-source.sh |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/scl/system/generate-system-source.sh b/scl/system/generate-system-source.sh
> index d89fd33..6f5af70 100755
> --- a/scl/system/generate-system-source.sh
> +++ b/scl/system/generate-system-source.sh
> @@ -23,6 +23,14 @@
>  #
>  #############################################################################
>  
> +# 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?

> +       *)
> +               # need to notify the user that something gone terribly wrong...
> +               echo "$0: FATAL: unsupported OS ($os) or uname(1) error. Please call BalaBit's support" >&2
> +               exit 1
> +               ;;

hmm... most syslog-ng users would probably not have a support policy in
place, so the error message should not advise that.

If you have information on the first question, I'll integrate the patch
with a slight change in the message, so no need for an updated patch.

-- 
Bazsi




More information about the syslog-ng mailing list