From 156083828a74f0cb7c92701b3af5c35b415a102e Mon Sep 17 00:00:00 2001 From: Boris Shkolnik Date: Wed, 16 Feb 2011 18:46:54 +0000 Subject: [PATCH] HADOOP-6970. SecurityAuth.audit should be generated under /build. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1071359 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ bin/hadoop-config.sh | 1 + bin/hadoop-daemon.sh | 1 + conf/log4j.properties | 4 +++- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 92edb63f96..5f8053757e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -54,6 +54,8 @@ Trunk (unreleased changes) HADOOP-6995. Allow wildcards to be used in ProxyUsers configurations. (todd) + HADOOP-6970. SecurityAuth.audit should be generated under /build. (boryas) + OPTIMIZATIONS BUG FIXES diff --git a/bin/hadoop-config.sh b/bin/hadoop-config.sh index f9acdd87db..ae1bb41f23 100644 --- a/bin/hadoop-config.sh +++ b/bin/hadoop-config.sh @@ -215,6 +215,7 @@ HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.file=$HADOOP_LOGFILE" HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.home.dir=$HADOOP_COMMON_HOME" HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.id.str=$HADOOP_IDENT_STRING" HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.root.logger=${HADOOP_ROOT_LOGGER:-INFO,console}" +HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,console}" if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH" fi diff --git a/bin/hadoop-daemon.sh b/bin/hadoop-daemon.sh index 1839bb0e18..dcc5910c06 100755 --- a/bin/hadoop-daemon.sh +++ b/bin/hadoop-daemon.sh @@ -103,6 +103,7 @@ fi # some variables export HADOOP_LOGFILE=hadoop-$HADOOP_IDENT_STRING-$command-$HOSTNAME.log export HADOOP_ROOT_LOGGER="INFO,DRFA" +export HADOOP_SECURITY_LOGGER="INFO,DRFAS" log=$HADOOP_LOG_DIR/hadoop-$HADOOP_IDENT_STRING-$command-$HOSTNAME.out pid=$HADOOP_PID_DIR/hadoop-$HADOOP_IDENT_STRING-$command.pid diff --git a/conf/log4j.properties b/conf/log4j.properties index 55d2f6ea85..29f26a7320 100644 --- a/conf/log4j.properties +++ b/conf/log4j.properties @@ -79,7 +79,9 @@ log4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file} log4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout log4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n #new logger -log4j.category.SecurityLogger=INFO,DRFAS +# Define some default values that can be overridden by system properties +hadoop.security.logger=INFO,console +log4j.category.SecurityLogger=${hadoop.security.logger} # # Rolling File Appender