destroy bug [0000381]
author"Vladimir N. Oleynik" <dzo@simtreas.ru>
Mon, 5 Sep 2005 15:50:56 +0000 (15:50 -0000)
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>
Mon, 5 Sep 2005 15:50:56 +0000 (15:50 -0000)
miscutils/crond.c

index 257632f8fd0fc7a4e548329c43f489ab47b4edf8..eea34b963651c377437cdebd457783b7c027980a 100644 (file)
@@ -132,7 +132,7 @@ static void crondlog(const char *ctl, ...)
                if (LogFile == 0) {
                        vsyslog(type, fmt, va);
                } else {
-                       int logfd = open(LogFile, O_WRONLY | O_CREAT | O_APPEND, 600);
+                       int logfd = open(LogFile, O_WRONLY | O_CREAT | O_APPEND, 0600);
                        if (logfd >= 0) {
                                vdprintf(logfd, fmt, va);
                                close(logfd);
@@ -348,7 +348,7 @@ static void startlogger(void)
        else {                          /* test logfile */
                int logfd;
 
-               if ((logfd = open(LogFile, O_WRONLY | O_CREAT | O_APPEND, 600)) >= 0) {
+               if ((logfd = open(LogFile, O_WRONLY | O_CREAT | O_APPEND, 0600)) >= 0) {
                        close(logfd);
                } else {
                        bb_perror_msg("Failed to open log file '%s' reason", LogFile);