last_patch64 from Vladimir N. Oleynik <dzo@simtreas.ru>
authorGlenn L McGrath <bug1@ihug.co.nz>
Sun, 10 Nov 2002 21:28:13 +0000 (21:28 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Sun, 10 Nov 2002 21:28:13 +0000 (21:28 -0000)
include/applets.h
miscutils/crontab.c

index 31734451168504acef7784e2d7a519deb36d4617..a9f93cc49529e4241503a27d44b8201633048075 100644 (file)
        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)
index 4263d48dde3a9d9a70137bb56f9770f17634e50d..5bd7db6e5ddc9c740d91d1ac0b1591c0b0e104e2 100644 (file)
@@ -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);
        }