aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorAndrew Ash <andrew@andrewash.com>2014-09-11 17:28:36 -0700
committerAndrew Or <andrewor14@gmail.com>2014-09-11 17:28:36 -0700
commitce59725b8703d18988e495dbaaf86ddde4bdfc5a (patch)
tree46137e645403359e8803fb1757b30514cf071477 /core/src/main
parent6324eb7b5b0ae005cb2e913e36b1508bd6f1b9b8 (diff)
downloadspark-ce59725b8703d18988e495dbaaf86ddde4bdfc5a.tar.gz
spark-ce59725b8703d18988e495dbaaf86ddde4bdfc5a.tar.bz2
spark-ce59725b8703d18988e495dbaaf86ddde4bdfc5a.zip
[SPARK-3429] Don't include the empty string "" as a defaultAclUser
Changes logging from ``` 14/09/05 02:01:08 INFO SecurityManager: Changing view acls to: aash, 14/09/05 02:01:08 INFO SecurityManager: Changing modify acls to: aash, 14/09/05 02:01:08 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(aash, ); users with modify permissions: Set(aash, ) ``` to ``` 14/09/05 02:28:28 INFO SecurityManager: Changing view acls to: aash 14/09/05 02:28:28 INFO SecurityManager: Changing modify acls to: aash 14/09/05 02:28:28 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(aash); users with modify permissions: Set(aash) ``` Note that the first set of logs have a Set of size 2 containing "aash" and the empty string "" cc tgravescs Author: Andrew Ash <andrew@andrewash.com> Closes #2286 from ash211/empty-default-acl and squashes the following commits: 18cc612 [Andrew Ash] Use .isEmpty instead of =="" cf973a1 [Andrew Ash] Don't include the empty string "" as a defaultAclUser
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/scala/org/apache/spark/SecurityManager.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/SecurityManager.scala b/core/src/main/scala/org/apache/spark/SecurityManager.scala
index 12b15fe081..3832a780ec 100644
--- a/core/src/main/scala/org/apache/spark/SecurityManager.scala
+++ b/core/src/main/scala/org/apache/spark/SecurityManager.scala
@@ -162,7 +162,7 @@ private[spark] class SecurityManager(sparkConf: SparkConf) extends Logging {
// always add the current user and SPARK_USER to the viewAcls
private val defaultAclUsers = Set[String](System.getProperty("user.name", ""),
- Option(System.getenv("SPARK_USER")).getOrElse(""))
+ Option(System.getenv("SPARK_USER")).getOrElse("")).filter(!_.isEmpty)
setViewAcls(defaultAclUsers, sparkConf.get("spark.ui.view.acls", ""))
setModifyAcls(defaultAclUsers, sparkConf.get("spark.modify.acls", ""))