This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re[2]: cygwin 1.3.11-3: Strange variable contents when logging via telnet


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]