diff options
author | Martin Ritchie <ritchiem@apache.org> | 2007-06-18 10:49:50 +0000 |
---|---|---|
committer | Martin Ritchie <ritchiem@apache.org> | 2007-06-18 10:49:50 +0000 |
commit | c41d9e7d947bcf5b313626184b7cb2eba5754a55 (patch) | |
tree | 3fdf317442269f8ea46a7e7d86235d1b76e3bc6f | |
parent | a6e6a26fece3dcea4251607e28f09cced880698d (diff) | |
download | qpid-python-c41d9e7d947bcf5b313626184b7cb2eba5754a55.tar.gz |
Various License header updates.
Update to PrincipalDatabase's to ensure they work correctly with # comments.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@548302 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/broker/etc/access | 18 | ||||
-rw-r--r-- | java/broker/etc/md5passwd | 22 | ||||
-rw-r--r-- | java/broker/etc/passwd | 18 | ||||
-rw-r--r-- | java/broker/etc/passwdVhost | 18 | ||||
-rw-r--r-- | java/broker/etc/qpid.passwd | 18 | ||||
-rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java | 15 | ||||
-rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java | 8 |
7 files changed, 104 insertions, 13 deletions
diff --git a/java/broker/etc/access b/java/broker/etc/access index a781ed8aa9..58b7443fa9 100644 --- a/java/broker/etc/access +++ b/java/broker/etc/access @@ -1 +1,19 @@ +#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# 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
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
guest:localhost(rw),test(rw)
\ No newline at end of file diff --git a/java/broker/etc/md5passwd b/java/broker/etc/md5passwd index f6839898bf..7984b742e0 100644 --- a/java/broker/etc/md5passwd +++ b/java/broker/etc/md5passwd @@ -1 +1,21 @@ -guest:qfgyy4ewnVMBg +#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# 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
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+guest:qfgyy4ewnVMBg
+admin:ISMvKXpXpadDiUoOSoAfww==
+user:aBzonUodYLhwSa8s9A10sA==
diff --git a/java/broker/etc/passwd b/java/broker/etc/passwd index 9e06cab884..966a16153d 100644 --- a/java/broker/etc/passwd +++ b/java/broker/etc/passwd @@ -1 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# 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 +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# guest:guest diff --git a/java/broker/etc/passwdVhost b/java/broker/etc/passwdVhost index 5db304e12c..48ce8299b6 100644 --- a/java/broker/etc/passwdVhost +++ b/java/broker/etc/passwdVhost @@ -1 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# 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 +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# guest:guest:localhost,test diff --git a/java/broker/etc/qpid.passwd b/java/broker/etc/qpid.passwd index 05068fb3a1..79b5e11777 100644 --- a/java/broker/etc/qpid.passwd +++ b/java/broker/etc/qpid.passwd @@ -1,3 +1,21 @@ +#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# 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
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
guest:CE4DQ6BIb/BVMN9scFyLtA==
admin:ISMvKXpXpadDiUoOSoAfww==
user:CE4DQ6BIb/BVMN9scFyLtA==
diff --git a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java index c49f4e2a33..b29ea66bfc 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java +++ b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java @@ -29,18 +29,17 @@ import org.apache.qpid.server.security.auth.sasl.plain.PlainInitialiser; import javax.security.auth.callback.PasswordCallback; import javax.security.auth.login.AccountNotFoundException; +import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.BufferedReader; import java.io.FileReader; -import java.io.UnsupportedEncodingException; -import java.util.regex.Pattern; -import java.util.Map; +import java.io.IOException; +import java.security.Principal; import java.util.HashMap; -import java.util.List; import java.util.LinkedList; -import java.security.Principal; +import java.util.List; +import java.util.Map; +import java.util.regex.Pattern; /** * Represents a user database where the account information is stored in a simple flat file. @@ -212,7 +211,7 @@ public class PlainPasswordFilePrincipalDatabase implements PrincipalDatabase reader = new BufferedReader(new FileReader(_passwordFile)); String line; - while ((line = reader.readLine()) != null) + while ((line = reader.readLine()) != null && !line.startsWith("#")) { String[] result = _regexp.split(line); if (result == null || result.length < 2) diff --git a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java index 598f8f8b4c..f4f3385c75 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java +++ b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java @@ -20,17 +20,17 @@ */ package org.apache.qpid.server.security.auth.database; +import org.apache.log4j.Logger; import org.apache.qpid.server.security.access.AccessManager; import org.apache.qpid.server.security.access.AccessResult; -import org.apache.qpid.server.security.access.Accessable; import org.apache.qpid.server.security.access.AccessRights; +import org.apache.qpid.server.security.access.Accessable; import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal; import org.apache.qpid.server.virtualhost.VirtualHost; -import org.apache.log4j.Logger; -import java.io.IOException; import java.io.BufferedReader; import java.io.FileReader; +import java.io.IOException; import java.security.Principal; /** @@ -61,7 +61,7 @@ public class PlainPasswordVhostFilePrincipalDatabase extends PlainPasswordFilePr reader = new BufferedReader(new FileReader(_passwordFile)); String line; - while ((line = reader.readLine()) != null) + while ((line = reader.readLine()) != null && !line.startsWith("#")) { String[] result = _regexp.split(line); if (result == null || result.length < 3) |