Made changes to deal with Greg's recommendations as a result of his

code review.

Fixed the problem that was preventing us from associating a PID file
with the ATS service.

Stopped deleting the "casaatsd" user during RPM un-install to avoid
problems with orphaned files.

Added code to protect against zero length passwords in the Pwd
authentication mechanism.
This commit is contained in:
Juan Carlos Luciani
2007-02-13 23:54:27 +00:00
parent d5f2ad902e
commit 06225de129
30 changed files with 194 additions and 598 deletions

View File

@@ -126,10 +126,10 @@ public final class CasaLoginModule implements LoginModule
// Do not perform the username check unless configured to do it.
boolean performUsernameCheck = false;
if (m_options != null
&& m_options.containsKey("PerformUsernameCheck") == true)
&& m_options.containsKey("PerformUsernameCheck"))
{
String keyVal = (String) m_options.get("PerformUsernameCheck");
if (keyVal != null && keyVal.equals("true"))
if (keyVal != null && keyVal.equalsIgnoreCase("true"))
performUsernameCheck = true;
}
@@ -163,14 +163,14 @@ public final class CasaLoginModule implements LoginModule
{
// Save the retrieved username in the shared state and then check it.
m_sharedState.put("javax.security.auth.login.name", username);
if (username.equals(casaUsername) == false)
if (username.equalsIgnoreCase(casaUsername) == false)
return false;
}
}
else
{
// Check the username
if (username.equals(casaUsername) == false)
if (username.equalsIgnoreCase(casaUsername) == false)
return false;
}
}

View File

@@ -103,7 +103,7 @@ public final class SampleApp
System.out.println();
System.out.println("Authenticated Identity Information");
System.out.println();
while (principalIter.hasNext() == true)
while (principalIter.hasNext())
{
CasaPrincipal principal = (CasaPrincipal) principalIter.next();