nv-l

Re: [nv-l] " \ " character not wanted

2002-04-22 18:18:19
Subject: Re: [nv-l] " \ " character not wanted
From: netview AT toddh DOT net (Todd H.)
To: "D'Apice, Dominic" <D.D'Apice AT SAQ.qc DOT ca>
Date: 22 Apr 2002 17:18:19 -0500
"D'Apice, Dominic" <D.D'Apice AT SAQ.qc DOT ca> writes:
> hi all, aix 4.3.3 and nv 7.1
> 
> It is normal to have some superflu " \ " characters on tec event after
> forward with a postemsg ?

Yes.  Consult the release notes for NetView 7.1.   This is part of the
NetView security fix for CERT advisory
        http://www.cert.org/advisories/CA-2001-24.html
(Note however that the sed expressions in the release notes may not be
reliable. )

Any character that is not alphanumeric is a candidate for either being
replaced with an underscore (_) or being prepended with a baskslash
before being handed off to any external shell processes.  Hyphens and
periods are legal hostname characters.  I believe both of those by
default will get backslashed rather than replaced with an _

Adding and tweaking the AdditionalLegalTrapCharacters environment
variable in /usr/OV/bin/netnmrc.pre and recycling all daemons with
        # ovstop;ovstop nvsecd;/etc/netnmrc
will allow you to control this.  Your current settings can be viewed
at the top of /usr/OV/log/nvaction.alog if you have that logging
enabled.

> if yes how can i delete it before i do a postemsg ? if not, the
> error should be in my side or the side of the tec ?

Consider modifying your action scripts that send postemsg's to TEC
cleanse the varbind data of these backslashes when necessary.  For
example, to remove backslashes from legal non-alphanumerics in
hostnames contained in varbinds 2 3 and 4:

########################################################################
# replace \. \-  with . -  respectvely. 
########################################################################
NVATTR_2=$(/usr/bin/echo "$NVATTR_2" | /usr/bin/sed 's:\\\([-\.]\):\1:g')
NVATTR_3=$(/usr/bin/echo "$NVATTR_3" | /usr/bin/sed 's:\\\([-\.]\):\1:g')
NVATTR_4=$(/usr/bin/echo "$NVATTR_4" | /usr/bin/sed 's:\\\([-\.]\):\1:g')


Best Regards,
-- 
Todd H.
http://www.toddh.net/

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