diff options
-rw-r--r-- | include/applets.h | 2 | ||||
-rw-r--r-- | miscutils/crontab.c | 4 |
2 files changed, 3 insertions, 3 deletions
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 @@ | |||
111 | APPLET(crond, crond_main, _BB_DIR_USR_SBIN, _BB_SUID_NEVER) | 111 | APPLET(crond, crond_main, _BB_DIR_USR_SBIN, _BB_SUID_NEVER) |
112 | #endif | 112 | #endif |
113 | #ifdef CONFIG_CRONTAB | 113 | #ifdef CONFIG_CRONTAB |
114 | APPLET(crontab, crontab_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) | 114 | APPLET(crontab, crontab_main, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS) |
115 | #endif | 115 | #endif |
116 | #ifdef CONFIG_CUT | 116 | #ifdef CONFIG_CUT |
117 | APPLET(cut, cut_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) | 117 | 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) | |||
204 | int n; | 204 | int n; |
205 | 205 | ||
206 | snprintf(path, sizeof(path), "%s.new", pas->pw_name); | 206 | snprintf(path, sizeof(path), "%s.new", pas->pw_name); |
207 | if ((fd = open(path, O_CREAT|O_TRUNC|O_EXCL|O_APPEND|O_WRONLY, 0600)) >= 0) { | 207 | if ((fd = open(path, O_CREAT|O_TRUNC|O_APPEND|O_WRONLY, 0600)) >= 0) { |
208 | while ((n = read(repFd, buf, sizeof(buf))) > 0) { | 208 | while ((n = read(repFd, buf, sizeof(buf))) > 0) { |
209 | write(fd, buf, n); | 209 | write(fd, buf, n); |
210 | } | 210 | } |
211 | close(fd); | 211 | close(fd); |
212 | rename(path, pas->pw_name); | 212 | rename(path, pas->pw_name); |
213 | } else { | 213 | } else { |
214 | error_msg("unable to create %s/%s", CDir, buf); | 214 | error_msg("unable to create %s/%s", CDir, path); |
215 | } | 215 | } |
216 | close(repFd); | 216 | close(repFd); |
217 | } | 217 | } |