summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-16 16:16:05 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-16 16:16:05 +0900
commit796f50820a22b886d71039db22cc9f91d41f18d4 (patch)
tree46143f7809d879728239ada1c8a73ec12e068465
parent18aab4be01628bea4795bb4ccdb9f4035da9673a (diff)
askpass env var - dont use 32byte buffer for path but use stringshare
use stringshare to have no limit on askpass path.
-rw-r--r--src/bin/e_main.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 3c88736b0..67ee88737 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -215,6 +215,7 @@ main(int argc, char **argv)
215 Eina_Bool safe_mode = EINA_FALSE; 215 Eina_Bool safe_mode = EINA_FALSE;
216 Eina_Bool after_restart = EINA_FALSE; 216 Eina_Bool after_restart = EINA_FALSE;
217 Eina_Bool waslocked = EINA_FALSE; 217 Eina_Bool waslocked = EINA_FALSE;
218 Eina_Stringshare *strshare;
218 double t = 0.0, tstart = 0.0; 219 double t = 0.0, tstart = 0.0;
219 char *s = NULL, buff[32]; 220 char *s = NULL, buff[32];
220 struct sigaction action; 221 struct sigaction action;
@@ -325,9 +326,15 @@ main(int argc, char **argv)
325 e_util_env_set("E_RESTART_OK", NULL); 326 e_util_env_set("E_RESTART_OK", NULL);
326 e_util_env_set("PANTS", "ON"); 327 e_util_env_set("PANTS", "ON");
327 e_util_env_set("DESKTOP", "Enlightenment"); 328 e_util_env_set("DESKTOP", "Enlightenment");
328 snprintf(buff, sizeof(buff), "%s/enlightenment_askpass", e_prefix_bin_get()); 329
329 e_util_env_set("SUDO_ASKPASS", buff); 330 strshare = eina_stringshare_printf("%s/enlightenment_askpass",
330 e_util_env_set("SSH_ASKPASS", buff); 331 e_prefix_bin_get());
332 if (strshare)
333 {
334 e_util_env_set("SUDO_ASKPASS", strshare);
335 e_util_env_set("SSH_ASKPASS", strshare);
336 eina_stringshare_del(strshare);
337 }
331 TS("Environment Variables Done"); 338 TS("Environment Variables Done");
332 339
333 /* KDE5 applications don't understand anything other then gnome or kde */ 340 /* KDE5 applications don't understand anything other then gnome or kde */