[jboss-cvs] JBossAS SVN: r60854 - branches/Branch_4_2/tomcat/src/main/org/jboss/web/tomcat/security.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Feb 23 16:10:02 EST 2007
Author: anil.saldhana at jboss.com
Date: 2007-02-23 16:10:02 -0500 (Fri, 23 Feb 2007)
New Revision: 60854
Modified:
branches/Branch_4_2/tomcat/src/main/org/jboss/web/tomcat/security/SecurityAssociationActions.java
Log:
JBAS:4149: method to return caller run-as-identity
Modified: branches/Branch_4_2/tomcat/src/main/org/jboss/web/tomcat/security/SecurityAssociationActions.java
===================================================================
--- branches/Branch_4_2/tomcat/src/main/org/jboss/web/tomcat/security/SecurityAssociationActions.java 2007-02-23 19:15:30 UTC (rev 60853)
+++ branches/Branch_4_2/tomcat/src/main/org/jboss/web/tomcat/security/SecurityAssociationActions.java 2007-02-23 21:10:02 UTC (rev 60854)
@@ -186,7 +186,17 @@
RunAsIdentity principal = (RunAsIdentity) AccessController.doPrivileged(PopRunAsRoleAction.ACTION);
return principal;
}
+
+ static RunAsIdentity getCallerRunAsIdentity()
+ {
+ return (RunAsIdentity) AccessController.doPrivileged(new PrivilegedAction(){
+ public Object run()
+ {
+ return SecurityAssociation.peekRunAsIdentity(1);
+ }});
+ }
+
static Throwable getAuthException()
{
Throwable ex = (Throwable) AccessController.doPrivileged(GetAuthExceptionAction.ACTION);
More information about the jboss-cvs-commits
mailing list