Commit a9b13c80 authored by Philip Carns's avatar Philip Carns
Browse files

add --enable-group-readable-logs option

git-svn-id: 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 50b90b8f
......@@ -2,7 +2,7 @@
Darshan Release Change Log
* Fix bug in mount point identification when --enable-stat-at-open option is
not used. In Darshan 2.2.4, some file entries were recorded as using the "/"
......@@ -11,6 +11,14 @@ darshan-2.2.5-pre2
any systems
* Fix unresolved symbols error when linking non-MPI programs with Cray
compiler. Reported by Yushu Yao.
* Use fstat() in place of stat() for detecting file information when
--enable-stat-at-open option is used
* Use statfs() at startup to detect default block size for supported file
* Added --enable-group-readable-logs configure option, which will cause
Darshan to to generate log files with the group read permission bit set.
This option is useful in conjunction with deployments that set the setgid
bit on log directories.
......@@ -686,6 +686,7 @@ with_zlib_for_mpi
......@@ -1314,6 +1315,7 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-cuserid Disables attempted use of cuserid() at run time
--disable-ld-preload Disables support for LD_PRELOAD library
--enable-group-readable-logs Set log files to be group readable
--enable-stat-at-open Perform stat() call at open time to gather extra statistics
--enable-st-dev-workaround Gather device id from parent directory instead of file
......@@ -3642,6 +3644,17 @@ fi
# Check whether --enable-group-readable-logs was given.
if test "${enable_group_readable_logs+set}" = set; then :
enableval=$enable_group_readable_logs; if test "x$enableval" = "xyes" ; then
$as_echo "#define __CP_GROUP_READABLE_LOGS 1" >>confdefs.h
# Check whether --enable-stat-at-open was given.
if test "${enable_stat_at_open+set}" = set; then :
enableval=$enable_stat_at_open; if test "x$enableval" = "xyes" ; then
......@@ -43,6 +43,13 @@ AC_ARG_ENABLE(ld-preload,
[ --enable-group-readable-logs Set log files to be group readable],
[if test "x$enableval" = "xyes" ; then
AC_DEFINE(__CP_GROUP_READABLE_LOGS, 1, Define if Darshan should set log files to be group readable)
[ --enable-stat-at-open Perform stat() call at open time to gather extra statistics],
[if test "x$enableval" = "xyes" ; then
......@@ -84,6 +84,9 @@
# endif
/* Define if Darshan should set log files to be group readable */
/* Comma separated list of env. variables to use for log path */
#undef __CP_LOG_ENV
......@@ -110,6 +110,25 @@ as root.
.A note about log directory permissions
All log files written by darshan have permissions set to only allow
read access by the owner of the file. You can modify this behavior,
however, by specifying the --enable-group-readable-logs option at
configure time. One notable deployment scenario would be to configure
Darshan and the log directories to allow all logs to be readable by both the
end user and a Darshan administrators group. This can be done with the
following steps:
* set the --enable-group-readable-logs option at configure time
* create the log directories with
* recursively set the group ownership of the log directories to the Darshan
administrators group
* recursively set the setgid bit on the log directories
=== Instrumentation method
The instrumentation method to use depends on whether the executables
......@@ -643,7 +643,11 @@ void darshan_shutdown(int timing_flag)
sprintf(mod_index, "_%d.darshan.gz", (int)(end_log_time-start_log_time+1));
rename(logfile_name, new_logfile_name);
/* set permissions on log file */
chmod(new_logfile_name, (S_IRUSR|S_IRGRP));
chmod(new_logfile_name, (S_IRUSR));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment