HDFS-6823. dfs.web.authentication.kerberos.principal shows up in logs for insecure HDFS

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1616845 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ravi Prakash 2014-08-08 18:21:18 +00:00
parent 70d453602c
commit 6da830cfdf
1 changed files with 5 additions and 3 deletions

View File

@ -1668,9 +1668,11 @@ public class DFSUtil {
.setKeytabConfKey(getSpnegoKeytabKey(conf, spnegoKeytabFileKey)); .setKeytabConfKey(getSpnegoKeytabKey(conf, spnegoKeytabFileKey));
// initialize the webserver for uploading/downloading files. // initialize the webserver for uploading/downloading files.
LOG.info("Starting web server as: " if (UserGroupInformation.isSecurityEnabled()) {
+ SecurityUtil.getServerPrincipal(conf.get(spnegoUserNameKey), LOG.info("Starting web server as: "
httpAddr.getHostName())); + SecurityUtil.getServerPrincipal(conf.get(spnegoUserNameKey),
httpAddr.getHostName()));
}
if (policy.isHttpEnabled()) { if (policy.isHttpEnabled()) {
if (httpAddr.getPort() == 0) { if (httpAddr.getPort() == 0) {