On Thu, 16 Aug 2012, Marcin Cieslak wrote:

> Hello,
>
> After enabling session log in .dtprofile:
>
> export dtstart_sessionlogfile="somefile
>
> I noticed that applications complain about
> broken environment passed to them:
>
> dthelpview: environment corrupt; missing value for `yA
> ^[[?1;2c
>
> Indeed, after additional debug logging it seems
> like space allocated for env variables
>
> XFILESEARCHPATH
> NLSPATH
> XMICONBMSEARCHPATH
> XMICONSEARCHPATH
>
> got released and is reused:
>
> Environment: environ=0x80543f300
> Environment: After adding envVal[0,p=0x80543f300]: *p=0x805597c00 
> [DISPLAY=:1.0]
> Environment: After adding envVal[1,p=0x80543f308]: *p=0x80540fa80 
> [SESSION_MANAGER=local/aaabbbccc.saper.info:/tmp/.ICE-unix/29696,inet6/aaabbbccc.saper.info:47459,inet/aaabbbccc.saper.info:54707]
> Environment: After adding envVal[2,p=0x80543f310]: *p=0x805412180 [`yA^E^H]
> Environment: After adding envVal[3,p=0x80543f318]: *p=0x8054180b0 
> [<9F>"^P^B^H]
[...]
>
> Anyone seeing something similar like this?
>
> I suspect some problems with lib/DtSvc/DtUtil2/EnvControl.c,
> but I am not yet sure.
>
> Running FreeBSD 9.0/amd64
>

I have not seen this, but looking at it - there's definiely dragons
there.  At least on linux, you can remove an env variable completely
with something like putenv("SOMEVAR") or unsetenv().  So one of the
premises for this messing around with the env the way they do is
already shot down :)

Perhaps the linux/bsds can perform these manipulations with
putenv/getenv completely, rather than this very system specific (and
ancient) crap they're pulling with **environ directly...

Do the BSD's support setenv/unsetenv?

Looking at the XiG source, seems I ran into and fixed this problem for
both linux and CSRG_BASED, I added some specific code to
_DtEnvRemove() at least.  I'll post a patch with these fixes so maybe
you can try it.

-- 
Jon Trulson

"If the Martian rope-a-dope don't get him, he'll get himself, he'll
  come in too fast and punch himself out."
              - one of my brothers, referring to the Curiosity landing.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to