nv-l
[Top] [All Lists]

Re: [nv-l] Trap forwarding to TEC contains \

To: "Carlos Enriquez" <enriquezc@terra.com.mx>
Subject: Re: [nv-l] Trap forwarding to TEC contains \
From: netview@toddh.net (Todd H.)
Date: 12 Feb 2003 12:51:53 -0600
Cc: nv-l@lists.tivoli.com
Delivered-to: mailing list nv-l@lists.tivoli.com
Delivery-date: Wed, 12 Feb 2003 19:11:53 +0000
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
In-reply-to: <3DFE77F9000495DB@occmta04a.terra.com.mx>
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: <3DFE77F9000495DB@occmta04a.terra.com.mx>
Reply-to: nv-l@lists.tivoli.com
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.6
"Carlos Enriquez" <enriquezc@terra.com.mx> writes:
> Hello List
> 
> I'm also trying to fix this issue, I know that this is due to a security
> problem, I know how it must be fixed, but I don't know what I'm doing wrong
> because it has not been fixed, the lines of the script that I'm modifying
> are listed below, I hope you can help me to find what do I'm doing wrong.
> 
> hostname1=$4
> hostname=`echo $hostname1 | sed "s:\\\\\\::g"`

You have not included the error or any of the symptoms of your
difficulty, but I will try to help. 

I seem to recall the sed syntax in the NetView release notes not
working for me under AIX at least...something with the quoting of the
sed expression as I recall.

Here's what I use--I specifically replace the backslashes preceeding
legal hostname characters that are non-alphanumeric:


############################################################################
# replace \- \. and \_  with - . and  _  respectvely. Required for
# security efix
############################################################################
hostname=$(/usr/bin/echo "$hostname" | /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