On Tue, 16 Aug 2016 21:22:32 +0900, Carsten Haitzler wrote:
> On Tue, 16 Aug 2016 11:44:03 +0000 Mike Blumenkrantz
> <michael.blumenkra...@gmail.com> said:
> 
> no worries. it's the same for SSH_ASKPASS too - you still get the normal tty
> password req is there is a tty. if there is not both sudo and ssh can fail
> (unless you have a no-password ssh key or sudo is configured for nopasswd for
> your user). so these work as normal in the no password cases. in the cases you
> do need a password both will fail completely. this adds this little utility so
> these don't hail anymore if they are in .desktop file or other
> command/app/script you launch from within e... :) overall this makes e more
> functional... thus i don't see a problem in ALWAYS setting the env var. if
> someone dislikes this they can override the env vars or unset them in scripts.
> and even in e's environment var settings since e_env_init is called after
> these env vars are set... :) but for the vast majority of people .. they don't
> need this or likely want it.. and things went from not working to working out
> of the box with no effort on their part. :)
> 
> some small things to improve in e here. i'll poke around some other small
> things here and there as i get the time. :)

Now explain the do { } while(0). If all you wanted to do was indent the
blocks hierarchically, why not just { }? I had to pay to download all
those extra characters.

> 
> > Oh okay, thanks for clearing that up!
> > 
> > On Mon, Aug 15, 2016 at 7:16 PM Carsten Haitzler <ras...@rasterman.com>
> > wrote:
> > 
> > > On Mon, 15 Aug 2016 15:08:53 +0000 Mike Blumenkrantz
> > > <michael.blumenkra...@gmail.com> said:
> > >
> > > > On Sat, Aug 13, 2016 at 4:39 AM Carsten Haitzler <ras...@rasterman.com>
> > > > wrote:
> > > >
> > > > > raster pushed a commit to branch master.
> > > > >
> > > > >
> > > > >
> > > http://git.enlightenment.org/core/enlightenment.git/commit/?id=8d780c7fb5ccb04c49c98370c9e4ec7a2440bbb1
> > > > >
> > > > > commit 8d780c7fb5ccb04c49c98370c9e4ec7a2440bbb1
> > > > > Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
> > > > > Date:   Sat Aug 13 17:39:17 2016 +0900
> > > > >
> > > > >     e sudo gui support - add askpass util for sudo askpass support
> > > > >
> > > > >     this gives e by default sudo gui support with an askpass util that
> > > > >     sudo can use as well as setting the env var correctly so it will 
> > > > > be
> > > > >     used by sudo.
> > > > >
> > > > >     @feature
> > > > > ---
> > > > >  configure.ac                               |   4 +
> > > > >  data/desktop/Makefile.mk                   |   3 +-
> > > > >  data/desktop/enlightenment_askpass.desktop |  12 +++
> > > > >  data/icons/Makefile.mk                     |   6 ++
> > > > >  data/icons/enlightenment-askpass.png       | Bin 0 -> 696 bytes
> > > > >  src/bin/.gitignore                         |   1 +
> > > > >  src/bin/Makefile.mk                        |   9 +-
> > > > >  src/bin/e_askpass_main.c                   | 142
> > > > > +++++++++++++++++++++++++++++
> > > > >  src/bin/e_main.c                           |   2 +
> > > > >  9 files changed, 177 insertions(+), 2 deletions(-)
> > > > >
> > > > >
> > > >
> > > >
> > > > > diff --git a/src/bin/e_main.c b/src/bin/e_main.c
> > > > > index 28ed4bc..4c705fc 100644
> > > > > --- a/src/bin/e_main.c
> > > > > +++ b/src/bin/e_main.c
> > > > > @@ -325,6 +325,8 @@ main(int argc, char **argv)
> > > > >     e_util_env_set("E_RESTART_OK", NULL);
> > > > >     e_util_env_set("PANTS", "ON");
> > > > >     e_util_env_set("DESKTOP", "Enlightenment");
> > > > > +   snprintf(buff, sizeof(buff), "%s/enlightenment_askpass",
> > > > > e_prefix_bin_get());
> > > > > +   e_util_env_set("SUDO_ASKPASS", buff);
> > > > >     TS("Environment Variables Done");
> > > > >
> > > > >     /* KDE5 applications don't understand anything other then gnome or
> > > > > kde     */
> > > > >
> > > > >
> > > > Ignoring some unusual style and whitespace-related choices in the rest 
> > > > of
> > > > the commit, globally setting SUDO_ASKPASS and forcing a gui popup any
> > > time
> > > > a user runs sudo in a terminal seems a bit excessive. Perhaps that's 
> > > > just
> > > > me?
> > >
> > > incorrect. read the sudo manual page. SUDO_ASKPASS is ONLY used if bno
> > > tty/terminal is found by sudo OR you use the -A option. :)
> > >
> > > --
> > > ------------- Codito, ergo sum - "I code, therefore I am" --------------
> > > The Rasterman (Carsten Haitzler)    ras...@rasterman.com
> > >
> > >
> 
> 
> -- 
> ------------- Codito, ergo sum - "I code, therefore I am" --------------
> The Rasterman (Carsten Haitzler)    ras...@rasterman.com
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to