Hi, Encountered a small bug in this commit that can cause e_sys_main to busy loop. Turns out the wrong variable is used when trying to clean up the environment.
On Sat, Nov 30, 2013 at 07:10:05PM -0800, Carsten Haitzler wrote: > raster pushed a commit to branch enlightenment-0.17. > > http://git.enlightenment.org/core/enlightenment.git/commit/?id=126afd0fda493deec8398088e6e928b4d2e5f463 > > commit 126afd0fda493deec8398088e6e928b4d2e5f463 > Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com> > Date: Sun Dec 1 11:48:49 2013 +0900 > > e_sys - address security concerns with environment - more > > add more environment variables to nuke and add alternate envrionment > nuke method to raise security level. > > Conflicts: > src/bin/e_sys_main.c > --- <snip> > +# ifdef HAVE_ENVIRON > + if (environ) > + { > + int again; > + char *tmp, *p; > + > + /* go over environment array again and again... safely */ > + do > + { > + again = 0; > + > + /* walk through and find first entry that we don't like */ > + for (i = 0; environ[i]; i++) > + { > + /* if it begins with any of these, it's possibly nasty */ > + if ((!strncmp(environ[i], "LD_", 3)) || > + (!strncmp(environ[i], "_RLD_", 5)) || > + (!strncmp(environ[i], "LC_", 3)) || > + (!strncmp(environ[i], "LDR_", 3))) > + { > + /* unset it */ > + tmp = strdup(environ[i]); > + if (!tmp) abort(); > + p = strchr(tmp, '='); > + if (!p) abort(); > + *p = 0; > + NOENV(p); The NOENV macro should use the 'tmp' variable. > + free(tmp); > + /* and mark our do to try again from the start in case > + * unsetenv changes environ ptr */ > + again = 1; > + break; > + } > + } > + } > + while (again); > + } > +# endif Cheers, Peter -- . ..: ------------------------------------------------------------------------------ Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel