Commit a9b13c80 authored by Philip Carns's avatar Philip Carns

add --enable-group-readable-logs option


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@654 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 50b90b8f
......@@ -2,7 +2,7 @@
Darshan Release Change Log
--------------------------
darshan-2.2.5-pre2
darshan-2.2.5-pre3
=============
* 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
systems
* 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.
darshan-2.2.4
=============
......
......@@ -686,6 +686,7 @@ with_zlib_for_mpi
with_zlib
enable_cuserid
enable_ld_preload
enable_group_readable_logs
enable_stat_at_open
enable_st_dev_workaround
with_mem_align
......@@ -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
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
fi
fi
# 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,
fi]
,)
AC_ARG_ENABLE(group-readable-logs,
[ --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)
fi]
,)
AC_ARG_ENABLE(stat-at-open,
[ --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
#endif
/* Define if Darshan should set log files to be group readable */
#undef __CP_GROUP_READABLE_LOGS
/* Comma separated list of env. variables to use for log path */
#undef __CP_LOG_ENV
......
......@@ -110,6 +110,25 @@ as root.
darshan-mk-log-dirs.pl
----
.A note about log directory permissions
[NOTE]
====
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 darshan-mk-log-dirs.pl
* 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 */
#ifdef __CP_GROUP_READABLE_LOGS
chmod(new_logfile_name, (S_IRUSR|S_IRGRP));
#else
chmod(new_logfile_name, (S_IRUSR));
#endif
free(new_logfile_name);
}
}
......
Markdown is supported
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