From: Glenn L McGrath Date: Sun, 10 Nov 2002 21:28:13 +0000 (-0000) Subject: last_patch64 from Vladimir N. Oleynik X-Git-Tag: 1_00_pre1~462 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5a7ec22c493a02106d892effeef78e65a4e6b4a0;p=oweals%2Fbusybox.git last_patch64 from Vladimir N. Oleynik --- diff --git a/include/applets.h b/include/applets.h index 317344511..a9f93cc49 100644 --- a/include/applets.h +++ b/include/applets.h @@ -111,7 +111,7 @@ APPLET(crond, crond_main, _BB_DIR_USR_SBIN, _BB_SUID_NEVER) #endif #ifdef CONFIG_CRONTAB - APPLET(crontab, crontab_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) + APPLET(crontab, crontab_main, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS) #endif #ifdef CONFIG_CUT APPLET(cut, cut_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) diff --git a/miscutils/crontab.c b/miscutils/crontab.c index 4263d48dd..5bd7db6e5 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c @@ -204,14 +204,14 @@ crontab_main(int ac, char **av) int n; snprintf(path, sizeof(path), "%s.new", pas->pw_name); - if ((fd = open(path, O_CREAT|O_TRUNC|O_EXCL|O_APPEND|O_WRONLY, 0600)) >= 0) { + if ((fd = open(path, O_CREAT|O_TRUNC|O_APPEND|O_WRONLY, 0600)) >= 0) { while ((n = read(repFd, buf, sizeof(buf))) > 0) { write(fd, buf, n); } close(fd); rename(path, pas->pw_name); } else { - error_msg("unable to create %s/%s", CDir, buf); + error_msg("unable to create %s/%s", CDir, path); } close(repFd); }