You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by co...@apache.org on 2016/09/28 09:32:55 UTC
[02/19] incubator-ranger git commit: Removing trailing whitespace
(via sed)
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/model/XUserGroupInfo.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/model/XUserGroupInfo.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/model/XUserGroupInfo.java
index fe56d26..0efcb68 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/model/XUserGroupInfo.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/model/XUserGroupInfo.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName;
public class XUserGroupInfo {
private String userId ;
- @SerializedName("name")
+ @SerializedName("name")
private String groupName ;
private String parentGroupId ;
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/model/XUserInfo.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/model/XUserInfo.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/model/XUserInfo.java
index babaf46..732e35b 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/model/XUserInfo.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/model/XUserInfo.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/InvalidGroupException.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/InvalidGroupException.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/InvalidGroupException.java
index 8a9d7d4..f68541e 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/InvalidGroupException.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/InvalidGroupException.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/InvalidUserException.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/InvalidUserException.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/InvalidUserException.java
index eccec31..225523e 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/InvalidUserException.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/InvalidUserException.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListRangerUser.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListRangerUser.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListRangerUser.java
index 8637478..85af261 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListRangerUser.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListRangerUser.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListRangerUserGroup.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListRangerUserGroup.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListRangerUserGroup.java
index b14ae28..8eb9131 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListRangerUserGroup.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListRangerUserGroup.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListUserGroupTest.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListUserGroupTest.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListUserGroupTest.java
index f691a44..94d569a 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListUserGroupTest.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/ListUserGroupTest.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerJSONParser.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerJSONParser.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerJSONParser.java
index 4ade872..6c8205e 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerJSONParser.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerJSONParser.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUpdateUserGroupMapping.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUpdateUserGroupMapping.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUpdateUserGroupMapping.java
index 01541db..2af4d5e 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUpdateUserGroupMapping.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUpdateUserGroupMapping.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUserGroupMapping.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUserGroupMapping.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUserGroupMapping.java
index b222a4c..5aa60f0 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUserGroupMapping.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUserGroupMapping.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RestClientPost.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RestClientPost.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RestClientPost.java
index 0b2fc3b..bbe9f1a 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RestClientPost.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RestClientPost.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/process/FileSourceUserGroupBuilder.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/process/FileSourceUserGroupBuilder.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/process/FileSourceUserGroupBuilder.java
index e41bb68..e9163e5 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/process/FileSourceUserGroupBuilder.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/process/FileSourceUserGroupBuilder.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -64,7 +64,7 @@ public class FileSourceUserGroupBuilder extends AbstractUserGroupSource {
filesourceUGBuilder.updateSink(ugSink);
if ( LOG.isDebugEnabled()) {
- filesourceUGBuilder.print();
+ filesourceUGBuilder.print();
}
}
@@ -137,7 +137,7 @@ public class FileSourceUserGroupBuilder extends AbstractUserGroupSource {
public void buildUserGroupInfo() throws Throwable {
buildUserGroupList();
if ( LOG.isDebugEnabled()) {
- print();
+ print();
}
}
@@ -197,7 +197,7 @@ public class FileSourceUserGroupBuilder extends AbstractUserGroupSource {
Map<String, List<String>> ret = new HashMap<String, List<String>>();
String delimiter = config.getUserSyncFileSourceDelimiter();
-
+
CSVFormat csvFormat = CSVFormat.newFormat(delimiter.charAt(0));
CSVParser csvParser = new CSVParser(new BufferedReader(new FileReader(textFile)), csvFormat);
@@ -216,12 +216,12 @@ public class FileSourceUserGroupBuilder extends AbstractUserGroupSource {
for (int j = 1; j < i; j ++) {
String group = csvRecord.get(j);
if ( group != null && !group.isEmpty()) {
- group = group.replaceAll("^\"|\"$", "");
+ group = group.replaceAll("^\"|\"$", "");
groups.add(group);
}
}
ret.put(user,groups);
- }
+ }
}
csvParser.close();
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java
index 17faec1..13a99ee 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -111,7 +111,7 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
private HashMap<String,XGroupInfo> groupName2XGroupInfoMap = new HashMap<String,XGroupInfo>() ;
private String keyStoreFile = null ;
- private String keyStoreFilepwd = null;
+ private String keyStoreFilepwd = null;
private String trustStoreFile = null ;
private String trustStoreFilepwd = null ;
private String keyStoreType = null ;
@@ -129,7 +129,7 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
LOCAL_HOSTNAME = java.net.InetAddress.getLocalHost().getCanonicalHostName();
} catch (UnknownHostException e) {
LOCAL_HOSTNAME = "unknown" ;
- }
+ }
}
@@ -157,7 +157,7 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
}
keyStoreFile = config.getSSLKeyStorePath() ;
- keyStoreFilepwd = config.getSSLKeyStorePathPassword() ;
+ keyStoreFilepwd = config.getSSLKeyStorePathPassword() ;
trustStoreFile = config.getSSLTrustStorePath() ;
trustStoreFilepwd = config.getSSLTrustStorePathPassword() ;
keyStoreType = KeyStore.getDefaultType() ;
@@ -187,7 +187,7 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
@Override
public Void run() {
try {
- buildGroupList();
+ buildGroupList();
buildUserList();
buildUserGroupLinkList() ;
rebuildUserGroupMap() ;
@@ -201,12 +201,12 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
LOG.error("Failed to Authenticate Using given Principal and Keytab : ",e);
}
} else {
- buildGroupList();
+ buildGroupList();
buildUserList();
buildUserGroupLinkList() ;
rebuildUserGroupMap() ;
if (LOG.isDebugEnabled()) {
- this.print();
+ this.print();
}
}
}
@@ -408,20 +408,20 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
int totalCount = 100 ;
int retrievedCount = 0 ;
-
+
while (retrievedCount < totalCount) {
WebResource r = c.resource(getURL(PM_GROUP_LIST_URI))
.queryParam("pageSize", recordsToPullPerCall)
.queryParam("startIndex", String.valueOf(retrievedCount)) ;
String response = r.accept(MediaType.APPLICATION_JSON_TYPE).get(String.class);
-
+
LOG.debug("RESPONSE: [" + response + "]") ;
-
+
Gson gson = new GsonBuilder().create() ;
GetXGroupListResponse groupList = gson.fromJson(response, GetXGroupListResponse.class) ;
-
+
totalCount = groupList.getTotalCount() ;
if (groupList.getXgroupInfoList() != null) {
@@ -440,26 +440,26 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
LOG.debug("==> PolicyMgrUserGroupBuilder.buildUserList");
}
Client c = getClient() ;
-
+
int totalCount = 100 ;
int retrievedCount = 0 ;
-
+
while (retrievedCount < totalCount) {
-
+
WebResource r = c.resource(getURL(PM_USER_LIST_URI))
.queryParam("pageSize", recordsToPullPerCall)
.queryParam("startIndex", String.valueOf(retrievedCount)) ;
-
+
String response = r.accept(MediaType.APPLICATION_JSON_TYPE).get(String.class);
-
+
Gson gson = new GsonBuilder().create() ;
LOG.debug("RESPONSE: [" + response + "]") ;
GetXUserListResponse userList = gson.fromJson(response, GetXUserListResponse.class) ;
-
+
totalCount = userList.getTotalCount() ;
-
+
if (userList.getXuserInfoList() != null) {
xuserList.addAll(userList.getXuserInfoList()) ;
retrievedCount = xuserList.size() ;
@@ -476,26 +476,26 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
LOG.debug("==> PolicyMgrUserGroupBuilder.buildUserGroupLinkList");
}
Client c = getClient() ;
-
+
int totalCount = 100 ;
int retrievedCount = 0 ;
-
+
while (retrievedCount < totalCount) {
-
+
WebResource r = c.resource(getURL(PM_USER_GROUP_MAP_LIST_URI))
.queryParam("pageSize", recordsToPullPerCall)
.queryParam("startIndex", String.valueOf(retrievedCount)) ;
-
+
String response = r.accept(MediaType.APPLICATION_JSON_TYPE).get(String.class);
-
+
LOG.debug("RESPONSE: [" + response + "]") ;
-
+
Gson gson = new GsonBuilder().create() ;
GetXUserGroupListResponse usergroupList = gson.fromJson(response, GetXUserGroupListResponse.class) ;
-
+
totalCount = usergroupList.getTotalCount() ;
-
+
if (usergroupList.getXusergroupInfoList() != null) {
xusergroupList.addAll(usergroupList.getXusergroupInfoList()) ;
retrievedCount = xusergroupList.size() ;
@@ -522,7 +522,7 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
for(String g : groups) {
LOG.debug("INFO: addPMXAGroupToUser(" + userName + "," + g + ")" ) ;
}
- if (! isMockRun ) {
+ if (! isMockRun ) {
addXUserGroupInfo(user, groups) ;
}
if (authenticationType != null && AUTH_KERBEROS.equalsIgnoreCase(authenticationType) && SecureClientLogin.isKerberosCredentialExists(principal, keytab)){
@@ -714,7 +714,7 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
private XUserGroupInfo addXUserGroupInfo(XUserInfo aUserInfo, XGroupInfo aGroupInfo) {
-
+
XUserGroupInfo ugInfo = new XUserGroupInfo() ;
ugInfo.setUserId(aUserInfo.getId());
@@ -766,7 +766,7 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
Client c = getClient() ;
- String uri = PM_DEL_USER_GROUP_LINK_URI.replaceAll(Pattern.quote("${groupName}"),
+ String uri = PM_DEL_USER_GROUP_LINK_URI.replaceAll(Pattern.quote("${groupName}"),
UserSyncUtil.encodeURIParam(groupName)).replaceAll(Pattern.quote("${userName}"), UserSyncUtil.encodeURIParam(userName));
WebResource r = c.resource(getURL(uri)) ;
@@ -780,7 +780,7 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
if (response.getStatus() == 200) {
delUserGroupFromList(aUserInfo, aGroupInfo) ;
}
-
+
} catch (Exception e) {
LOG.warn( "ERROR: Unable to delete GROUP: " + groupName + " from USER:" + userName , e) ;
@@ -825,19 +825,19 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
private MUserInfo getMUser(MUserInfo userInfo, MUserInfo ret) {
Client c = getClient() ;
-
+
WebResource r = c.resource(getURL(PM_ADD_LOGIN_USER_URI)) ;
-
+
Gson gson = new GsonBuilder().create() ;
String jsonString = gson.toJson(userInfo) ;
-
+
String response = r.accept(MediaType.APPLICATION_JSON_TYPE).type(MediaType.APPLICATION_JSON_TYPE).post(String.class, jsonString) ;
-
+
LOG.debug("RESPONSE[" + response + "]") ;
-
+
ret = gson.fromJson(response, MUserInfo.class) ;
-
+
LOG.debug("MUser Creation successful " + ret);
return ret ;
@@ -845,7 +845,7 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
private synchronized Client getClient() {
- Client ret = null;
+ Client ret = null;
if (policyMgrBaseUrl.startsWith("https://")) {
@@ -875,10 +875,10 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink {
}
finally {
if (in != null) {
- in.close();
+ in.close();
}
}
-
+
}
if (trustStoreFile != null && trustStoreFilepwd != null) {
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java
index c71bc90..e5abd08 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -84,7 +84,7 @@ public class UnixUserGroupBuilder implements UserGroupSource {
public static void main(String[] args) throws Throwable {
UnixUserGroupBuilder ugbuilder = new UnixUserGroupBuilder() ;
ugbuilder.init();
- ugbuilder.print();
+ ugbuilder.print();
}
public UnixUserGroupBuilder() {
@@ -135,7 +135,7 @@ public class UnixUserGroupBuilder implements UserGroupSource {
for (Map.Entry<String, List<String>> entry : user2GroupListMap.entrySet()) {
String user = entry.getKey();
List<String> groups = entry.getValue();
-
+
try{
sink.addOrUpdateUser(user, groups);
}catch (Throwable t) {
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/usergroupsync/AbstractMapper.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/usergroupsync/AbstractMapper.java b/ugsync/src/main/java/org/apache/ranger/usergroupsync/AbstractMapper.java
index fc5d10b..86b621b 100644
--- a/ugsync/src/main/java/org/apache/ranger/usergroupsync/AbstractMapper.java
+++ b/ugsync/src/main/java/org/apache/ranger/usergroupsync/AbstractMapper.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/usergroupsync/Mapper.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/usergroupsync/Mapper.java b/ugsync/src/main/java/org/apache/ranger/usergroupsync/Mapper.java
index 94675da..696c665 100644
--- a/ugsync/src/main/java/org/apache/ranger/usergroupsync/Mapper.java
+++ b/ugsync/src/main/java/org/apache/ranger/usergroupsync/Mapper.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/usergroupsync/RegEx.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/usergroupsync/RegEx.java b/ugsync/src/main/java/org/apache/ranger/usergroupsync/RegEx.java
index 4bf452a..626df04 100644
--- a/ugsync/src/main/java/org/apache/ranger/usergroupsync/RegEx.java
+++ b/ugsync/src/main/java/org/apache/ranger/usergroupsync/RegEx.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSink.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSink.java b/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSink.java
index 9ee6d95..6cce36f 100644
--- a/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSink.java
+++ b/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSink.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSource.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSource.java b/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSource.java
index 776cdcb..81a546e 100644
--- a/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSource.java
+++ b/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSource.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSync.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSync.java b/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSync.java
index cd610a1..30b891c 100644
--- a/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSync.java
+++ b/ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSync.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/main/java/org/apache/ranger/usersync/util/UserSyncUtil.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/usersync/util/UserSyncUtil.java b/ugsync/src/main/java/org/apache/ranger/usersync/util/UserSyncUtil.java
index 1ac2da2..a33576b 100644
--- a/ugsync/src/main/java/org/apache/ranger/usersync/util/UserSyncUtil.java
+++ b/ugsync/src/main/java/org/apache/ranger/usersync/util/UserSyncUtil.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/test/java/org/apache/ranger/usergroupsync/LdapUserGroupTest.java
----------------------------------------------------------------------
diff --git a/ugsync/src/test/java/org/apache/ranger/usergroupsync/LdapUserGroupTest.java b/ugsync/src/test/java/org/apache/ranger/usergroupsync/LdapUserGroupTest.java
index 673a88e..86ce40e 100644
--- a/ugsync/src/test/java/org/apache/ranger/usergroupsync/LdapUserGroupTest.java
+++ b/ugsync/src/test/java/org/apache/ranger/usergroupsync/LdapUserGroupTest.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -77,12 +77,12 @@ public class LdapUserGroupTest extends AbstractLdapTestUnit{
@Before
public void setup() throws Exception {
- LdapServer ldapServer = new LdapServer();
+ LdapServer ldapServer = new LdapServer();
ldapServer.setSaslHost("127.0.0.1");
- ldapServer.setSearchBaseDn("DC=ranger,DC=qe,DC=hortonworks,DC=com");
+ ldapServer.setSearchBaseDn("DC=ranger,DC=qe,DC=hortonworks,DC=com");
String ldapPort = System.getProperty("ldap.port");
Assert.assertNotNull("Property 'ldap.port' null", ldapPort);
- ldapServer.setTransports(new TcpTransport("127.0.0.1", Integer.parseInt(ldapPort)));
+ ldapServer.setTransports(new TcpTransport("127.0.0.1", Integer.parseInt(ldapPort)));
ldapServer.setDirectoryService(getService());
ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
setLdapServer(ldapServer);
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/test/java/org/apache/ranger/usergroupsync/PolicyMgrUserGroupBuilderTest.java
----------------------------------------------------------------------
diff --git a/ugsync/src/test/java/org/apache/ranger/usergroupsync/PolicyMgrUserGroupBuilderTest.java b/ugsync/src/test/java/org/apache/ranger/usergroupsync/PolicyMgrUserGroupBuilderTest.java
index 2880bcb..312ea9b 100644
--- a/ugsync/src/test/java/org/apache/ranger/usergroupsync/PolicyMgrUserGroupBuilderTest.java
+++ b/ugsync/src/test/java/org/apache/ranger/usergroupsync/PolicyMgrUserGroupBuilderTest.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -41,7 +41,7 @@ public class PolicyMgrUserGroupBuilderTest extends PolicyMgrUserGroupBuilder {
allUsers.add(user);
//System.out.println("Username: " + user + " and associated groups: " + groups);
}
-
+
@Override
public void addOrUpdateGroup(String group) {
allGroups.add(group);
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/ugsync/src/test/java/org/apache/ranger/usergroupsync/RegExTest.java
----------------------------------------------------------------------
diff --git a/ugsync/src/test/java/org/apache/ranger/usergroupsync/RegExTest.java b/ugsync/src/test/java/org/apache/ranger/usergroupsync/RegExTest.java
index 2c1e023..a93cfe7 100644
--- a/ugsync/src/test/java/org/apache/ranger/usergroupsync/RegExTest.java
+++ b/ugsync/src/test/java/org/apache/ranger/usergroupsync/RegExTest.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/ConsolePromptCallbackHandler.java
----------------------------------------------------------------------
diff --git a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/ConsolePromptCallbackHandler.java b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/ConsolePromptCallbackHandler.java
index f1400b2..e960fed 100644
--- a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/ConsolePromptCallbackHandler.java
+++ b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/ConsolePromptCallbackHandler.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java
----------------------------------------------------------------------
diff --git a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java
index fb52a02..c0f136c 100644
--- a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java
+++ b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UnixGroupPrincipal.java
----------------------------------------------------------------------
diff --git a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UnixGroupPrincipal.java b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UnixGroupPrincipal.java
index a707a2a..5c2e838 100644
--- a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UnixGroupPrincipal.java
+++ b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UnixGroupPrincipal.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UnixUserPrincipal.java
----------------------------------------------------------------------
diff --git a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UnixUserPrincipal.java b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UnixUserPrincipal.java
index a690e5b..e71a965 100644
--- a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UnixUserPrincipal.java
+++ b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/UnixUserPrincipal.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/unixauthclient/src/test/com/xasecure/test/authentication/UnixAuthenticationTester.java
----------------------------------------------------------------------
diff --git a/unixauthclient/src/test/com/xasecure/test/authentication/UnixAuthenticationTester.java b/unixauthclient/src/test/com/xasecure/test/authentication/UnixAuthenticationTester.java
index 54032ba..2dd2804 100644
--- a/unixauthclient/src/test/com/xasecure/test/authentication/UnixAuthenticationTester.java
+++ b/unixauthclient/src/test/com/xasecure/test/authentication/UnixAuthenticationTester.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -30,9 +30,9 @@ public class UnixAuthenticationTester {
public void run() throws Throwable {
LoginContext loginContext = new LoginContext("PolicyManager") ;
System.err.println("After login ...") ;
- loginContext.login();
+ loginContext.login();
System.err.println("Subject:" + loginContext.getSubject() ) ;
- loginContext.logout();
+ loginContext.logout();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/unixauthservice/src/main/java/org/apache/ranger/authentication/PasswordValidator.java
----------------------------------------------------------------------
diff --git a/unixauthservice/src/main/java/org/apache/ranger/authentication/PasswordValidator.java b/unixauthservice/src/main/java/org/apache/ranger/authentication/PasswordValidator.java
index b8cfbcc..dd0e7d5 100644
--- a/unixauthservice/src/main/java/org/apache/ranger/authentication/PasswordValidator.java
+++ b/unixauthservice/src/main/java/org/apache/ranger/authentication/PasswordValidator.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -68,7 +68,7 @@ public class PasswordValidator implements Runnable {
if (validatorProgram == null) {
String res = "FAILED: Unable to validate credentials." ;
writer.println(res) ;
- writer.flush();
+ writer.flush();
LOG.error("Response [" + res + "] for user: " + userName + " as ValidatorProgram is not defined in configuration.") ;
}
@@ -85,7 +85,7 @@ public class PasswordValidator implements Runnable {
pWriter = new PrintWriter(new OutputStreamWriter(p.getOutputStream())) ;
- pWriter.println(request) ; pWriter.flush();
+ pWriter.println(request) ; pWriter.flush();
String res = pReader.readLine() ;
@@ -100,7 +100,7 @@ public class PasswordValidator implements Runnable {
LOG.info("Response [" + res + "] for user: " + userName);
- writer.println(res) ; writer.flush();
+ writer.println(res) ; writer.flush();
}
finally {
if (p != null) {
@@ -120,7 +120,7 @@ public class PasswordValidator implements Runnable {
finally {
try {
if (client != null) {
- client.close();
+ client.close();
}
}
catch(IOException ioe){
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/09700f35/unixauthservice/src/main/java/org/apache/ranger/authentication/UnixAuthenticationService.java
----------------------------------------------------------------------
diff --git a/unixauthservice/src/main/java/org/apache/ranger/authentication/UnixAuthenticationService.java b/unixauthservice/src/main/java/org/apache/ranger/authentication/UnixAuthenticationService.java
index 863a56a..86a56f3 100644
--- a/unixauthservice/src/main/java/org/apache/ranger/authentication/UnixAuthenticationService.java
+++ b/unixauthservice/src/main/java/org/apache/ranger/authentication/UnixAuthenticationService.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -87,7 +87,7 @@ public class UnixAuthenticationService {
static private boolean enableUnixAuth = false;
- private static final String[] UGSYNC_CONFIG_XML_FILES = { "ranger-ugsync-default.xml", "ranger-ugsync-site.xml" } ;
+ private static final String[] UGSYNC_CONFIG_XML_FILES = { "ranger-ugsync-default.xml", "ranger-ugsync-site.xml" } ;
private static final String PROPERTY_ELEMENT_TAGNAME = "property" ;
private static final String NAME_ELEMENT_TAGNAME = "name" ;
private static final String VALUE_ELEMENT_TAGNAME = "value" ;
@@ -137,7 +137,7 @@ public class UnixAuthenticationService {
Thread newSyncProcThread = new Thread(syncProc) ;
newSyncProcThread.setName("UnixUserSyncThread");
newSyncProcThread.setDaemon(false);
- newSyncProcThread.start();
+ newSyncProcThread.start();
}
@@ -230,7 +230,7 @@ public class UnixAuthenticationService {
PasswordValidator.setValidatorProgram(validatorProg);
}
- String adminUsers = prop.getProperty(ADMIN_USER_LIST_PARAM) ;
+ String adminUsers = prop.getProperty(ADMIN_USER_LIST_PARAM) ;
if (adminUsers != null && adminUsers.trim().length() > 0) {
for(String u : adminUsers.split(",")) {
@@ -283,7 +283,7 @@ public class UnixAuthenticationService {
}
finally {
if (in != null) {
- in.close();
+ in.close();
}
}
@@ -293,7 +293,7 @@ public class UnixAuthenticationService {
}
- TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+ TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
KeyStore trustStoreKeyStore = null ;
@@ -312,12 +312,12 @@ public class UnixAuthenticationService {
}
finally {
if (in != null) {
- in.close();
+ in.close();
}
}
}
- trustManagerFactory.init(trustStoreKeyStore);
+ trustManagerFactory.init(trustStoreKeyStore);
TrustManager[] tm = trustManagerFactory.getTrustManagers() ;
@@ -325,7 +325,7 @@ public class UnixAuthenticationService {
context.init(km, tm, random);
- SSLServerSocketFactory sf = context.getServerSocketFactory() ;
+ SSLServerSocketFactory sf = context.getServerSocketFactory() ;
ServerSocket socket = (SSLEnabled ? sf.createServerSocket(portNum) : new ServerSocket(portNum) ) ;
@@ -355,7 +355,7 @@ public class UnixAuthenticationService {
while ( (client = socket.accept()) != null ) {
Thread clientValidatorThread = new Thread(new PasswordValidator(client)) ;
- clientValidatorThread.start();
+ clientValidatorThread.start();
}
} catch (IOException e) {
socket.close();