cronolog.org
flexible web log rotation
HOME
DOWNLOAD
FEATURES
USAGE
FAQ
BLOG
KNOWN BUGS
SECURITY
PATCHES
USERS
TO DO
HISTORY
LINKS
FEEDBACK
MAILING LIST
ADVERTISING

support cronolog development



Google   HELP


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cronolog jumbo patch fix



Hi there,

I just started using cronolog in combination with the jumbo patch provided by Matthew Grosso. I immediately spotted one problem: the jumbo patch ignores the FILE_MODE define when creating new log files. As a result, all files are created with mode 700. It's a trivial fix, but I could not find any reports of it, so here it is.

Sincerely,

--
Richard van den Berg, CISSP

Trust Factory B.V.      | http://www.trust-factory.com/
Bazarstraat 44a         | Phone: +31 70 3620684
NL-2518AK The Hague     | Fax  : +31 70 3603009
The Netherlands         |
*** cronolog.c.org	Wed Aug 18 15:14:16 2004
--- cronolog.c	Wed Aug 18 17:24:22 2004
***************
*** 668,679 ****
      int ret;
      if( use_handler !=1 )
      {
!         return open(ofilename, OPEN_SHARED, S_IRWXU );
      }
!     ret = open(ofilename, OPEN_EXCLUSIVE, S_IRWXU );
      if( ret < 0 )
      {
!         ret = open(ofilename, OPEN_SHARED, S_IRWXU );
          i_am_handler= 0;
      }
      else
--- 668,679 ----
      int ret;
      if( use_handler !=1 )
      {
!         return open(ofilename, OPEN_SHARED, FILE_MODE );
      }
!     ret = open(ofilename, OPEN_EXCLUSIVE, FILE_MODE );
      if( ret < 0 )
      {
!         ret = open(ofilename, OPEN_SHARED, FILE_MODE );
          i_am_handler= 0;
      }
      else

Copyright © 1996-2004 Andrew Ford and Ford & Mason Ltd