[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TZ=... date affected PROMPT_COMMAND

From: jidanni
Subject: Re: TZ=... date affected PROMPT_COMMAND
Date: Thu, 17 Apr 2008 17:34:27 +0800

OK, now using Archimerged's cleaner version, I bet Matthew can
reproduce this.

address@hidden:/root# su - nobody
No directory, logging in with HOME=/
address@hidden:/$ PROMPT_COMMAND='prompt_status=\ $?'
address@hidden:/$ PS1=$SPECIAL_PS1"\A\${prompt_status# 0} \W$ "
17:26 /$ TZ=America/Los_Angeles date
Thu Apr 17 02:26:11 PDT 2008
02:26 /$ echo $BASH_VERSION
02:26 /$ false
02:26 1 /$ true
02:26 /$ /bin/true
17:26 /$ 

Note how the prompt timezone becomes contaminated until we finally
shake it back off with a non-built-in command.

You know, this reminds me of some injection attacks!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]