Initial push
[termux-packages] / packages / busybox / crond.c.patch
1 diff -u -r ../busybox-1.23.1/miscutils/crond.c ./miscutils/crond.c
2 --- ../busybox-1.23.1/miscutils/crond.c 2015-01-27 03:48:58.000000000 -0500
3 +++ ./miscutils/crond.c 2015-02-06 16:43:24.238473247 -0500
4 @@ -415,7 +415,7 @@
5
6 maxLines = (strcmp(fileName, "root") == 0) ? 65535 : MAXLINES;
7
8 - if (fstat(fileno(parser->fp), &sbuf) == 0 && sbuf.st_uid == DAEMON_UID) {
9 + if (fstat(fileno(parser->fp), &sbuf) == 0) {
10 CronFile *file = xzalloc(sizeof(CronFile));
11 CronLine **pline;
12 int n;
13 @@ -571,6 +571,7 @@
14
15 static void set_env_vars(struct passwd *pas, const char *shell)
16 {
17 +#ifndef __ANDROID__
18 /* POSIX requires crond to set up at least HOME, LOGNAME, PATH, SHELL.
19 * We assume crond inherited suitable PATH.
20 */
21 @@ -585,6 +586,7 @@
22 xsetenv("HOME", pas->pw_dir);
23 xsetenv("SHELL", shell);
24 #endif
25 +#endif
26 }
27
28 static void change_user(struct passwd *pas)