gnu: icecat: Update to 68.4.1-guix0-preview1 [fixes CVE-2019-17026].
[jackhill/guix/guix.git] / gnu / packages / patches / enlightenment-fix-setuid-path.patch
CommitLineData
122f91bd
EF
1diff --git a/src/bin/e_auth.c b/src/bin/e_auth.c
2index 00b0e5d84..98ab4518f 100644
3--- a/src/bin/e_auth.c
4+++ b/src/bin/e_auth.c
5@@ -9,8 +9,7 @@ e_auth_begin(char *passwd)
6
7 if (strlen(passwd) == 0) goto out;
8
9- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_ckpasswd",
10- e_prefix_lib_get());
11+ snprintf(buf, sizeof(buf), "/run/setuid-programs/enlightenment_ckpasswd");
12
13 exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL);
14 if (ecore_exe_send(exe, passwd, strlen(passwd)) != EINA_TRUE) goto out;
15diff --git a/src/bin/e_backlight.c b/src/bin/e_backlight.c
16index 2bced6766..208e583ba 100644
17--- a/src/bin/e_backlight.c
18+++ b/src/bin/e_backlight.c
19@@ -521,8 +521,8 @@ _bl_sys_level_set(double val)
20 }
21 // fprintf(stderr, "SET: %1.3f\n", val);
22 snprintf(buf, sizeof(buf),
23- "%s/enlightenment/utils/enlightenment_backlight %i %s",
24- e_prefix_lib_get(), (int)(val * 1000.0), bl_sysval);
25+ "/run/setuid-programs/enlightenment_backlight %i %s",
26+ (int)(val * 1000.0), bl_sysval);
27 bl_sys_set_exe = ecore_exe_run(buf, NULL);
28 }
29 #endif // HAVE_EEZE || __FreeBSD_kernel__
30diff --git a/src/bin/e_fm/e_fm_main_eeze.c b/src/bin/e_fm/e_fm_main_eeze.c
dd203116 31index 0fcffa249..c1921121d 100644
122f91bd
EF
32--- a/src/bin/e_fm/e_fm_main_eeze.c
33+++ b/src/bin/e_fm/e_fm_main_eeze.c
34@@ -318,7 +318,7 @@ _e_fm_main_eeze_volume_eject(E_Volume *v)
35 {
36 char buf[PATH_MAX];
37
38- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx));
39+ snprintf(buf, sizeof(buf), "/run/setuid-programs/enlightenment_sys");
40 eeze_disk_mount_wrapper_set(v->disk, buf);
41 }
42 v->guard = ecore_timer_loop_add(E_FM_EJECT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_eject_timeout, v);
43@@ -512,7 +512,7 @@ _e_fm_main_eeze_volume_unmount(E_Volume *v)
44 {
45 char buf[PATH_MAX];
46
47- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx));
48+ snprintf(buf, sizeof(buf), "/run/setuid-programs/enlightenment_sys");
49 eeze_disk_mount_wrapper_set(v->disk, buf);
50 }
51 v->guard = ecore_timer_loop_add(E_FM_UNMOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_unmount_timeout, v);
52@@ -548,7 +548,7 @@ _e_fm_main_eeze_volume_mount(E_Volume *v)
53 {
54 char buf2[PATH_MAX];
55
56- snprintf(buf2, sizeof(buf2), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx));
57+ snprintf(buf2, sizeof(buf2), "/run/setuid-programs/enlightenment_sys");
58 eeze_disk_mount_wrapper_set(v->disk, buf2);
59 }
60 v->guard = ecore_timer_loop_add(E_FM_MOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_mount_timeout, v);
61diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c
dd203116 62index 671fbcd9a..90ee04cf1 100644
122f91bd
EF
63--- a/src/bin/e_sys.c
64+++ b/src/bin/e_sys.c
dd203116 65@@ -702,20 +702,16 @@ _e_sys_cb_timer(void *data EINA_UNUSED)
122f91bd
EF
66
67 e_init_status_set(_("Checking System Permissions"));
68 snprintf(buf, sizeof(buf),
69- "%s/enlightenment/utils/enlightenment_sys -t halt",
70- e_prefix_lib_get());
71+ "/run/setuid-programs/enlightenment_sys -t halt");
72 _e_sys_halt_check_exe = ecore_exe_run(buf, NULL);
73 snprintf(buf, sizeof(buf),
74- "%s/enlightenment/utils/enlightenment_sys -t reboot",
75- e_prefix_lib_get());
76+ "/run/setuid-programs/enlightenment_sys -t reboot");
77 _e_sys_reboot_check_exe = ecore_exe_run(buf, NULL);
78 snprintf(buf, sizeof(buf),
79- "%s/enlightenment/utils/enlightenment_sys -t suspend",
80- e_prefix_lib_get());
81+ "/run/setuid-programs/enlightenment_sys -t suspend");
82 _e_sys_suspend_check_exe = ecore_exe_run(buf, NULL);
83 snprintf(buf, sizeof(buf),
84- "%s/enlightenment/utils/enlightenment_sys -t hibernate",
85- e_prefix_lib_get());
86+ "/run/setuid-programs/enlightenment_sys -t hibernate");
87 _e_sys_hibernate_check_exe = ecore_exe_run(buf, NULL);
88 return ECORE_CALLBACK_CANCEL;
89 }
dd203116 90@@ -1134,8 +1130,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
122f91bd 91 if (e_util_immortal_check()) return 0;
dd203116 92 e_fm2_die();
122f91bd
EF
93 snprintf(buf, sizeof(buf),
94- "%s/enlightenment/utils/enlightenment_sys halt",
95- e_prefix_lib_get());
96+ "/run/setuid-programs/enlightenment_sys halt");
97 if (_e_sys_exe)
98 {
99 if ((ecore_time_get() - _e_sys_begin_time) > 2.0)
dd203116 100@@ -1170,8 +1165,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
122f91bd 101 if (e_util_immortal_check()) return 0;
dd203116 102 e_fm2_die();
122f91bd
EF
103 snprintf(buf, sizeof(buf),
104- "%s/enlightenment/utils/enlightenment_sys reboot",
105- e_prefix_lib_get());
106+ "/run/setuid-programs/enlightenment_sys reboot");
107 if (_e_sys_exe)
108 {
109 if ((ecore_time_get() - _e_sys_begin_time) > 2.0)
dd203116 110@@ -1204,8 +1198,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
122f91bd
EF
111 case E_SYS_SUSPEND:
112 /* /etc/acpi/sleep.sh force */
113 snprintf(buf, sizeof(buf),
114- "%s/enlightenment/utils/enlightenment_sys suspend",
115- e_prefix_lib_get());
116+ "/run/setuid-programs/enlightenment_sys suspend");
117 if (_e_sys_exe)
118 {
119 if ((ecore_time_get() - _e_sys_begin_time) > 2.0)
dd203116 120@@ -1265,8 +1258,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
122f91bd
EF
121 case E_SYS_HIBERNATE:
122 /* /etc/acpi/hibernate.sh force */
123 snprintf(buf, sizeof(buf),
124- "%s/enlightenment/utils/enlightenment_sys hibernate",
125- e_prefix_lib_get());
126+ "/run/setuid-programs/enlightenment_sys hibernate");
127 if (_e_sys_exe)
128 {
129 if ((ecore_time_get() - _e_sys_begin_time) > 2.0)
130diff --git a/src/modules/bluez4/e_mod_main.c b/src/modules/bluez4/e_mod_main.c
131index 4b5148634..47d34b07f 100644
132--- a/src/modules/bluez4/e_mod_main.c
133+++ b/src/modules/bluez4/e_mod_main.c
134@@ -49,8 +49,8 @@ _ebluez_l2ping_poller(void *data EINA_UNUSED)
135
136 if (tmp)
137 {
138- eina_strbuf_append_printf(buf, "%s/enlightenment/utils/enlightenment_sys l2ping %s",
139- e_prefix_lib_get(), tmp);
140+ eina_strbuf_append_printf(buf, "/run/setuid-programs/enlightenment_sys l2ping %s",
141+ tmp);
142 autolock_exe = ecore_exe_run(eina_strbuf_string_get(buf), NULL);
143 }
144
145@@ -692,8 +692,7 @@ e_modapi_init(E_Module *m)
146 autolock_desklock = ecore_event_handler_add(E_EVENT_DESKLOCK, _ebluez_desklock, NULL);
147
148 buf = eina_strbuf_new();
149- eina_strbuf_append_printf(buf, "%s/enlightenment/utils/enlightenment_sys -t l2ping",
150- e_prefix_lib_get());
151+ eina_strbuf_append_printf(buf, "/run/setuid-programs/enlightenment_sys -t l2ping");
152 autolock_exe = ecore_exe_run(eina_strbuf_string_get(buf), NULL);
153 eina_strbuf_free(buf);
154
dd203116
EF
155diff --git a/src/modules/bluez5/e_mod_main.c b/src/modules/bluez5/e_mod_main.c
156index a581c466c..095d8f360 100644
157--- a/src/modules/bluez5/e_mod_main.c
158+++ b/src/modules/bluez5/e_mod_main.c
159@@ -321,8 +321,8 @@ ebluez5_rfkill_unblock(const char *name)
160 if (buf)
161 {
162 eina_strbuf_append_printf
163- (buf, "%s/enlightenment/utils/enlightenment_sys rfkill-unblock %s",
164- e_prefix_lib_get(), name);
165+ (buf, "/run/setuid-programs/enlightenment_sys rfkill-unblock %s",
166+ name);
167 _rfkill_exe = ecore_exe_run(eina_strbuf_string_get(buf), NULL);
168 eina_strbuf_free(buf);
169 }
122f91bd 170diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c
dd203116 171index b66b365d8..bab0802cc 100644
122f91bd
EF
172--- a/src/modules/cpufreq/e_mod_main.c
173+++ b/src/modules/cpufreq/e_mod_main.c
dd203116 174@@ -1452,8 +1452,7 @@ e_modapi_init(E_Module *m)
122f91bd
EF
175 }
176 E_CONFIG_LIMIT(cpufreq_config->poll_interval, 1, 1024);
177
178- snprintf(buf, sizeof(buf), "%s/%s/freqset",
179- e_module_dir_get(m), MODULE_ARCH);
180+ snprintf(buf, sizeof(buf), "/run/setuid-programs/freqset");
181 cpufreq_config->set_exe_path = strdup(buf);
182
183 if (stat(buf, &st) < 0)
dd203116
EF
184diff --git a/src/modules/sysinfo/cpuclock/cpuclock.c b/src/modules/sysinfo/cpuclock/cpuclock.c
185index 938916e53..00d5067d0 100644
186--- a/src/modules/sysinfo/cpuclock/cpuclock.c
187+++ b/src/modules/sysinfo/cpuclock/cpuclock.c
188@@ -80,8 +80,7 @@ _cpuclock_set_governor(const char *governor)
189 char buf[4096 + 100], exe[4096];
190 struct stat st;
191
192- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs",
193- e_module_dir_get(sysinfo_config->module), MODULE_ARCH);
194+ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs");
195 if (stat(exe, &st) < 0) return;
196
197 snprintf(buf, sizeof(buf),
198@@ -108,8 +107,7 @@ _cpuclock_set_frequency(int frequency)
199 if (system(buf) != 0)
200 ERR("Error code from trying to run \"%s\"", buf);
201 #else
202- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs",
203- e_module_dir_get(sysinfo_config->module), MODULE_ARCH);
204+ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs");
205 if (stat(exe, &st) < 0) return;
206 snprintf(buf, sizeof(buf),
207 "%s %s %i", exe, "frequency", frequency);
208@@ -127,8 +125,7 @@ _cpuclock_set_pstate(int min, int max, int turbo)
209 char buf[4096 + 100], exe[4096];
210 struct stat st;
211
212- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs",
213- e_module_dir_get(sysinfo_config->module), MODULE_ARCH);
214+ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs");
215 if (stat(exe, &st) < 0) return;
216 snprintf(buf, sizeof(buf),
217 "%s %s %i %i %i", exe, "pstate", min, max, turbo);
218--
2192.23.0
220