You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
845 B

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 @@
/* 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");
@@ -167,7 +169,8 @@
}
close_on_exec_on(src_fd); /* don't want editor to see this fd */
edit_file(pas, tmp_fname);
- /* fall through */
+ xrename(tmp_fname, pas->pw_name);
+ break;
case 0: /* Replace (no -l, -e, or -r were given) */
new_fname = xasprintf("%s.new", pas->pw_name);