nv-l
[Top] [All Lists]

Re: [nv-l] email of trap message contains \"\\\"

To: bart<bart@isiskorea.com>
Subject: Re: [nv-l] email of trap message contains \"\\\"
From: netview@toddh.net (Todd H.)
Date: 10 Feb 2003 10:06:17 -0600
Cc: nv-l@lists.tivoli.com
Delivered-to: mailing list nv-l@lists.tivoli.com
Delivery-date: Mon, 10 Feb 2003 16:17:08 +0000
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
In-reply-to: <200302100154.h1A1skI18863@mail.fw.isiskorea.com>
List-help: <mailto:nv-l-help@lists.tivoli.com>
List-post: <mailto:nv-l@lists.tivoli.com>
List-subscribe: <mailto:nv-l-subscribe@lists.tivoli.com>
List-unsubscribe: <mailto:nv-l-unsubscribe@lists.tivoli.com>
Mailing-list: contact nv-l-help@lists.tivoli.com; run by ezmlm
References: <200302100154.h1A1skI18863@mail.fw.isiskorea.com>
Reply-to: nv-l@lists.tivoli.com
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.6
bart<bart@isiskorea.com> writes:

> Hi,world~
> 
> I remenber I saw something like this somewhere in this site,but I can't find 
> the solution.
> 
> When I set the event configuration to send the email,
> I send messages something like this
> 
> echo "$hostname" "$MSG "| mailx -r <mail_server> -s "$HOST $MSG"  
> nmsadmin@isiskorea.com ;;
> 
> the action works well...
> 
> But,when the hostname or messages  contains ip_adress,
> it displays "" infront of the "dot" like this xxx\\.xxx\\.xxx\\.xxx\\.
> 
> How can i eliminate the "" ?

As part of a security fix from a root exploit vulnerability, by
default, when send trap vabinds to external scripts, Netview escapes
- and . with a backslash and replaces all other non-alphanumerics with
  an _.   

See the release notes for your version of NetView for more details and
for sed commands that strips the backslashes out in the external
script. 

Example from a script of mine:


############################################################################
# replace \- \. and \_  with - . and  _  respectvely. Required for
# security efix
############################################################################
TEMP_HOST=$(/usr/bin/echo "$5" | /usr/bin/sed 's:\\\([-\._]\):\1:g')
MESSAGESTRING=$(/usr/bin/echo "$1" | /usr/bin/sed 's:\\\([-\._]\):\1:g')


-- 
Todd H.
http://www.toddh.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com
For additional commands, e-mail: nv-l-help@lists.tivoli.com

*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)


<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web