delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/06/26/11:24:03

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 26 Jun 2002 17:23:19 +0200
From: Pavel Tsekov <ptsekov AT syntrex DOT com>
Reply-To: Pavel Tsekov <cygwin AT cygwin DOT com>
Organization: Syntrex, Inc.
X-Priority: 3 (Normal)
Message-ID: <129017524.20020626172319@syntrex.com>
To: cygwin AT cygwin DOT com
Subject: Re[2]: cygwin 1.3.11-3: Strange variable contents when logging via telnet
In-Reply-To: <20020626144725.GA29576@redhat.com>
References: <10223674412 DOT 20020626155415 AT syntrex DOT com>
<4025053184 DOT 20020626161714 AT syntrex DOT com> <20020626144725 DOT GA29576 AT redhat DOT com>
MIME-Version: 1.0

Hello Christopher,

Wednesday, June 26, 2002, 4:47:25 PM, you wrote:

CF> On Wed, Jun 26, 2002 at 04:17:14PM +0200, Pavel Tsekov wrote:
>>PT> I've noticed that the inetd_dummy environment variable contains some
>>PT> strange value - is this the expected content of this variable ?
>>
>>PT> inetd_dummy=$'xxx\201zdR\200\f\314Y\361\004'
>>
>>
>>More info:
>>
>>I reverted back to 1.3.9 (I couldn't find 1.3.10 on my disk) and
>>inetd_dummy contains only "xxx" - without the double quotes.

CF> That's what I get with (the equivalent of) the most recent snapshot.

Oh, well :) It's pure luck though ! The good news is that the problem
doesn't lie in cygwin1.dll at all but in inetd.

Here is the snippet which deals with that 'inetd_dummy' env var -
inetd.c, line 702:

    {
        /* space for daemons to overwrite environment for ps */
#define DUMMYSIZE   100
        char dummy[DUMMYSIZE];

        (void)memset(dummy, 'x', sizeof(DUMMYSIZE) - 1);
        dummy[DUMMYSIZE - 1] = '\0';
        (void)setenv("inetd_dummy", dummy, 1);
    }

Obviously the memset () call is incorrect - the size argument should
either be DUMMYSIZE - 1 or sizeof (dummy) - 1.

Btw I haven't found the place where this environment variable
is used by the 'daemons', as the comment points. Maybe is is safe to
just remove it ! :)


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019