diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-11-10 21:28:13 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-11-10 21:28:13 +0000 |
commit | d9a4f2edb68e2900955ca0646b7681f6c7be99e7 (patch) | |
tree | c778c0ba94a65cb9b5baf733f0867ff6edd27422 /miscutils/crontab.c | |
parent | 79392f6168090747adb86e6df4869215ed0c6ef7 (diff) | |
download | busybox-w32-d9a4f2edb68e2900955ca0646b7681f6c7be99e7.tar.gz busybox-w32-d9a4f2edb68e2900955ca0646b7681f6c7be99e7.tar.bz2 busybox-w32-d9a4f2edb68e2900955ca0646b7681f6c7be99e7.zip |
last_patch64 from Vladimir N. Oleynik <dzo@simtreas.ru>
git-svn-id: svn://busybox.net/trunk/busybox@5899 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'miscutils/crontab.c')
-rw-r--r-- | miscutils/crontab.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 | } |