Hi there,

It seems to me changing the permissions will cause problems to users who
happen to run E as root and "/tmp" is their runtime dir (because
XDG_RUNTIME_DIR points to it or is not set).
We can argue a lot about running stuff as root of course, or even having
/tmp as runtime dir, but I encountered that problem by accident.

As ptrace is blocked on Ubuntu, you have to run gdb and other stuff as root
sometimes, and bad things happen when /tmp suddenly decomes 0700...

Shouldn't /tmp be specifically excluded from the chmod rule?

Cheers,
JP



On Tue, Jun 25, 2013 at 11:03 AM, Sebastian Dransfeld 
<s...@tango.flipp.net>wrote:

> On 06/24/2013 05:00 AM, Carsten Haitzler (Rasterman) - Enlightenment Git
> wrote:
> > raster pushed a commit to branch master.
> >
> > commit 8e3d94d66130f16cec0d518a0ad6ec5fae04fec9
> > Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
> > Date:   Mon Jun 24 12:00:30 2013 +0900
> >
> >      efreet: don't try change permissions on runtime dir we don't own.
>
> If we should have mode 0700 on runtime dir, shouldn't it be a warning if
> we don't own it? Seems like it should be private.
>
> S.
>
> > ---
> >   src/lib/efreet/efreet_base.c | 15 +++++++++------
> >   1 file changed, 9 insertions(+), 6 deletions(-)
> >
> > diff --git a/src/lib/efreet/efreet_base.c b/src/lib/efreet/efreet_base.c
> > index 26346e0..93e264c 100644
> > --- a/src/lib/efreet/efreet_base.c
> > +++ b/src/lib/efreet/efreet_base.c
> > @@ -335,13 +335,16 @@ efreet_dirs_init(void)
> >       }
> >       else if ((st.st_mode & 0777) != 0700)
> >       {
> > -        ERR("XDG_RUNTIME_DIR=%s is mode %o, changing to 0700",
> > -            xdg_runtime_dir, st.st_mode & 0777);
> > -        if (chmod(xdg_runtime_dir, 0700) != 0)
> > +        if (st.st_uid == geteuid())
> >           {
> > -            CRITICAL("Cannot fix XDG_RUNTIME_DIR=%s incorrect mode %o:
> %s",
> > -                     xdg_runtime_dir, st.st_mode & 0777,
> strerror(errno));
> > -            eina_stringshare_replace(&xdg_runtime_dir, NULL);
> > +            ERR("XDG_RUNTIME_DIR=%s is mode %o, changing to 0700",
> > +                xdg_runtime_dir, st.st_mode & 0777);
> > +            if (chmod(xdg_runtime_dir, 0700) != 0)
> > +            {
> > +                CRITICAL("Cannot fix XDG_RUNTIME_DIR=%s incorrect mode
> %o: %s",
> > +                         xdg_runtime_dir, st.st_mode & 0777,
> strerror(errno));
> > +                eina_stringshare_replace(&xdg_runtime_dir, NULL);
> > +            }
> >           }
> >       }
> >       /* hostname */
> >
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>


-- 
Jean-Philippe André
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to