diff options
| author | William Jon McCann <jmccann@redhat.com> | 2008-02-13 11:37:20 -0500 | 
|---|---|---|
| committer | William Jon McCann <jmccann@redhat.com> | 2008-02-13 11:37:20 -0500 | 
| commit | 190aed4effbfb9a982f46250c82994f58f4e5fb5 (patch) | |
| tree | 9d8d71afad032f56ac69d860ea8b745b635dea89 | |
| parent | 6dda865f8fbe87a10a6047eb2db2c4fd1c94af17 (diff) | |
create the log file with S_IROTH and don't touch the log on build
| -rw-r--r-- | src/Makefile.am | 2 | ||||
| -rw-r--r-- | src/ck-event-logger.c | 3 | 
2 files changed, 2 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 3712cff..8d5d83b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -202,5 +202,3 @@ install-data-local:  	-mkdir -p $(DESTDIR)$(libdir)/ConsoleKit/run-session.d  	-mkdir -p $(DESTDIR)$(localstatedir)/run/ConsoleKit  	-mkdir -p $(DESTDIR)$(localstatedir)/log/ConsoleKit -	-umask 022 -	-touch $(DESTDIR)$(localstatedir)/log/ConsoleKit/history diff --git a/src/ck-event-logger.c b/src/ck-event-logger.c index 5e4a212..6bbc1d9 100644 --- a/src/ck-event-logger.c +++ b/src/ck-event-logger.c @@ -109,13 +109,14 @@ open_log_file (CkEventLogger *event_logger)  #endif  retry: +        errno = 0;          fd = g_open (event_logger->priv->log_filename, flags, 0600);          if (fd < 0) {                  if (errno == ENOENT) {                          /* FIXME: should we just skip if file doesn't exist? */                          fd = g_open (event_logger->priv->log_filename,                                       O_CREAT | O_EXCL | O_APPEND, -                                     S_IRUSR | S_IWUSR | S_IRGRP); +                                     S_IRUSR | S_IWUSR | S_IRGRP | S_IRGRP | S_IROTH);                          if (fd < 0) {                                  g_warning ("Couldn't create log file %s (%s)",                                             event_logger->priv->log_filename,  | 
