2019-11-12 01:51:21 +01:00
|
|
|
diff -uNr busybox-1.31.1/miscutils/crontab.c busybox-1.31.1.mod/miscutils/crontab.c
|
|
|
|
--- busybox-1.31.1/miscutils/crontab.c 2019-06-10 13:50:53.000000000 +0300
|
|
|
|
+++ busybox-1.31.1.mod/miscutils/crontab.c 2019-11-11 22:08:19.115118798 +0200
|
|
|
|
@@ -53,10 +53,12 @@
|
2015-06-13 01:03:31 +02:00
|
|
|
|
|
|
|
/* CHILD - change user and run editor */
|
|
|
|
/* initgroups, setgid, setuid */
|
|
|
|
+#ifndef __ANDROID__
|
|
|
|
change_identity(pas);
|
|
|
|
setup_environment(pas->pw_shell,
|
|
|
|
SETUP_ENV_CHANGEENV | SETUP_ENV_TO_TMP,
|
|
|
|
pas);
|
|
|
|
+#endif
|
|
|
|
ptr = getenv("VISUAL");
|
|
|
|
if (!ptr) {
|
|
|
|
ptr = getenv("EDITOR");
|
2019-11-12 01:51:21 +01:00
|
|
|
@@ -167,7 +169,8 @@
|
2017-10-15 00:59:29 +02:00
|
|
|
}
|
|
|
|
close_on_exec_on(src_fd); /* don't want editor to see this fd */
|
|
|
|
edit_file(pas, tmp_fname);
|
|
|
|
- /* fall through */
|
2019-11-12 01:51:21 +01:00
|
|
|
+ xrename(tmp_fname, pas->pw_name);
|
|
|
|
+ break;
|
2017-10-15 00:59:29 +02:00
|
|
|
|
|
|
|
case 0: /* Replace (no -l, -e, or -r were given) */
|
|
|
|
new_fname = xasprintf("%s.new", pas->pw_name);
|