Hi,
here's the updated patch with your suggestions implemented.
Thanks
Ankit

On Tue, May 15, 2012 at 11:43 PM, Eduardo Silva <[email protected]> wrote:

> On Tue, May 15, 2012 at 12:10 PM, Ankit Kumar
> <[email protected]> wrote:
> > yup, implementing the same
> > -Ankit
>
> Check that src/include/monkey.h already have:
>
>  gid_t EGID;
>  gid_t EUID;
>
>
> >
> >
> > On Tue, May 15, 2012 at 11:35 PM, Eduardo Silva <[email protected]>
> wrote:
> >>
> >> On Mon, May 14, 2012 at 2:38 PM, Davidlohr Bueso <[email protected]> wrote:
> >> > On Tue, 2012-05-15 at 01:31 +0530, Ankit Kumar wrote:
> >> >> Hi,
> >> >> here is the updated patch for MK_TRACE_BACKGROUND env variable.
> >> >> Thanks
> >> >> Ankit
> >> >
> >> > +    char* bgcolortype;
> >> > +    bgcolortype = getenv("MK_TRACE_BACKGROUND");
> >> >
> >> > (i) Let's make this a single line, the data segment will appreciate
> >> > it :)
> >> >
> >> > (ii) It might be worth implementing a more robust mk_getenv that also
> >> > checks __secure_getenv(), ie:
> >> >
> >> > char *mk_getenv(const char *arg)
> >> > {
> >> >        uid_t ruid = getuid();
> >> >
> >> >        if (ruid != 0 || (ruid != geteuid()) || (getgid() !=
> getegid()))
> >> >                return NULL;
> >> >
> >> > #ifdef HAVE___SECURE_GETENV
> >> >        return __secure_getenv(arg);
> >> > #else
> >> >        return getenv(arg);
> >> > #endif
> >> > }
> >>
> >> I would add that as an char *mk_utils_getenv(const char *arg){..}, any
> >> volunteer ?
> >>
> >>
> >> >
> >> >>
> >> >> On Mon, May 14, 2012 at 11:24 PM, Eduardo Silva <[email protected]>
> >> >> wrote:
> >> >>         On Mon, May 14, 2012 at 9:59 AM, Felipe Reyes <[email protected]
> >
> >> >>         wrote:
> >> >>         > Hi,
> >> >>         > On Mon, May 14, 2012 at 11:14:26AM +0530, Ankit Kumar
> wrote:
> >> >>         >> Hi,
> >> >>         >> I am submitting the patch for this. The environment
> >> >>         variable used is
> >> >>         >> BGCOLORTYPE that signifies whether the background is light
> >> >>         or dark, and
> >> >>         >> changes trace colors accordingly.
> >> >>         > random ideas.
> >> >>         > vim uses the variable "background" (it's an internal
> >> >>         variable, not from the env), the other option is to take a
> >> >>         look to the variable LS_COLORS, or how 'dircolors -p' decide
> >> >>         the colors to use
> >> >>         >
> >> >>
> >> >>
> >> >>         Hi,
> >> >>
> >> >>         Seems like we will add more trace options in a near future so
> >> >>         lets
> >> >>         cleanup some things... I have renamed the environment
> variable
> >> >>         MONKEY_TRACE to MK_TRACE_FILTER. So following the naming
> >> >>         conventions
> >> >>         we could have MK_TRACE_BACKGROUND with values "dark" or
> >> >>         "light", being
> >> >>         "dark" the default of course.
> >> >>
> >> >>         - Ankit, would you please update your patch for the naming
> >> >>         convention ?
> >> >>         - Felipe, seems like a good idea bad not all linux distro set
> >> >>         that
> >> >>         variable, i think that we can manage an optional value for
> >> >>         MK_TRACE_FILTER like "ls", a patch for that is welcome
> >> >>
> >> >>         thanks,
> >> >>
> >> >>
> >> >>         --
> >> >>         Eduardo Silva
> >> >>         http://edsiper.linuxchile.cl
> >> >>         http://www.monkey-project.com
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Ankit Kumar
> >> >> Morgan Stanley | GWMG Technology
> >> >> Bldg. 5, Sector 30, Mindspace, Goregaon (West)
> >> >> Mumbai (Ex Bombay), 400 090
> >> >>
> >> >>
> >> >>
> >> >> _______________________________________________
> >> >> Monkey mailing list
> >> >> [email protected]
> >> >> http://lists.monkey-project.com/listinfo/monkey
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Eduardo Silva
> >> http://edsiper.linuxchile.cl
> >> http://www.monkey-project.com
> >
> >
> >
> >
> > --
> > Ankit Kumar
> > Morgan Stanley | GWMG Technology
> > Bldg. 5, Sector 30, Mindspace, Goregaon (West)
> > Mumbai (Ex Bombay), 400 090
> >
> >
>
>
>
> --
> Eduardo Silva
> http://edsiper.linuxchile.cl
> http://www.monkey-project.com
>



-- 
Ankit Kumar
Morgan Stanley | GWMG Technology
Bldg. 5, Sector 30, Mindspace, Goregaon (West)
Mumbai (Ex Bombay), 400 090

Attachment: 0001-implemented-mk_utils_getenv-to-fetch-value-of-MK_TRA.patch
Description: Binary data

_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to