You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Andrew Zhang <zh...@gmail.com> on 2006/08/22 03:13:25 UTC
[classlib][security] SecurityManager.checkPropertyAccess(String) bug?
Hi all,
I noticed that Harmony security manager throws unexpected security exception
even when policy file allows the permission. I have raised HARMONY-1242(
http://issues.apache.org/jira/browse/HARMONY-1242) for record. Would
anybody help have a look? Thanks!
On 8/21/06, Andrew Zhang (JIRA) <ji...@apache.org> wrote:
>
> [classlib][security] SecurityManager.checkPropertyAccess("java.version")
> throws unexpected exception.
>
> ------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1242
> URL: http://issues.apache.org/jira/browse/HARMONY-1242
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Andrew Zhang
>
>
> Following test reproduces the bug:
>
> public void test_checkPropertyAccess() throws Exception {
> SecurityManager manager = new SecurityManager();
> manager.checkPropertyAccess("java.version");
> }
>
> The test passes against RI while fails against Harmony.
> I have checked "java.policy" security file, which also allows "permission
> java.util.PropertyPermission "java.version","read";" by default.
>
> Would any security guys help investigate this issue? Thanks a lot!
>
> Best regards,
> Andrew
>
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
--
Andrew Zhang
China Software Development Lab, IBM
Re: [classlib][security] SecurityManager.checkPropertyAccess(String) bug?
Posted by Alexey Varlamov <al...@gmail.com>.
The o.a.h.security.DefaultPolicyScanner is configured by default to
support both style comments:
protected StreamTokenizer configure(StreamTokenizer st) {
st.slashSlashComments(true);
st.slashStarComments(true);
st.wordChars('_', '_');
st.wordChars('$', '$');
return st;
}
Maybe this is a bug in StreamTokenizer ?
--
Alexey
2006/8/23, Andrew Zhang <zh...@gmail.com>:
> Reversion 433575 solves the bug, but seems Harmony still doesn't support
> /** */ style comment while RI does?
> I think it's a workaround rather than fix. :)
> Will we plan to fix the problem by supporting /* */ style comment ? Thanks!
>
> On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> >
> > Done
> >
> > 2006/8/22, Andrew Zhang <zh...@gmail.com>:
> > > It works! Thanks Mikhail!
> > >
> > > Another cool bug. :-)
> > >
> > >
> > > On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> > > >
> > > > Be patient :)
> > > >
> > > > I'm running the tests...
> > > >
> > > > If you want it right now, remove copyright from the java.policy file
> > > >
> > > > Thanks,
> > > > Mikhail
> > > >
> > > > 2006/8/22, Andrew Zhang <zh...@gmail.com>:
> > > > > Any solutions?
> > > > >
> > > > > On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> > > > > >
> > > > > > No
> > > > > >
> > > > > > The reason is these lines behave differently
> > > > > >
> > > > > > import java.security.*;
> > > > > > import java.util.*;
> > > > > > public class a {
> > > > > > static public void main(String[] args) throws Exception {
> > > > > > Permission p = new PropertyPermission("java.version",
> > "read");
> > > > > > ProtectionDomain d = a.class.getProtectionDomain();
> > > > > > System.out.println( "== " + d.implies(p));
> > > > > > }
> > > > > > }
> > > > > >
> > > > > > 2006/8/22, Paulex Yang <pa...@gmail.com>:
> > > > > > > Andrew Zhang wrote:
> > > > > > > > Hi all,
> > > > > > > >
> > > > > > > > I noticed that Harmony security manager throws unexpected
> > security
> > > > > > > > exception
> > > > > > > > even when policy file allows the permission. I have raised
> > > > > > HARMONY-1242(
> > > > > > > > http://issues.apache.org/jira/browse/HARMONY-1242) for
> > > > record. Would
> > > > > > > > anybody help have a look? Thanks!
> > > > > > > >
> > > > > > > Seems SecurityManager pass correct permission instance to
> > > > > > > AccessController, should it be AccessController's issue?
> > > > > > > >
> > > > > > > >
> > > > > > > > On 8/21/06, Andrew Zhang (JIRA) <ji...@apache.org> wrote:
> > > > > > > >>
> > > > > > > >> [classlib][security] SecurityManager.checkPropertyAccess("
> > > > > > java.version")
> > > > > > > >> throws unexpected exception.
> > > > > > > >>
> > > > > > > >>
> > > > > >
> > > >
> > ------------------------------------------------------------------------------------------------------
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> Key: HARMONY-1242
> > > > > > > >> URL:
> > > > > > http://issues.apache.org/jira/browse/HARMONY-1242
> > > > > > > >> Project: Harmony
> > > > > > > >> Issue Type: Bug
> > > > > > > >> Components: Classlib
> > > > > > > >> Reporter: Andrew Zhang
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> Following test reproduces the bug:
> > > > > > > >>
> > > > > > > >> public void test_checkPropertyAccess() throws Exception {
> > > > > > > >> SecurityManager manager = new SecurityManager();
> > > > > > > >> manager.checkPropertyAccess("java.version");
> > > > > > > >> }
> > > > > > > >>
> > > > > > > >> The test passes against RI while fails against Harmony.
> > > > > > > >> I have checked "java.policy" security file, which also
> > allows
> > > > > > > >> "permission
> > > > > > > >> java.util.PropertyPermission "java.version","read";" by
> > default.
> > > > > > > >>
> > > > > > > >> Would any security guys help investigate this issue? Thanks a
> > > > lot!
> > > > > > > >>
> > > > > > > >> Best regards,
> > > > > > > >> Andrew
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> --
> > > > > > > >> This message is automatically generated by JIRA.
> > > > > > > >> -
> > > > > > > >> If you think it was sent incorrectly contact one of the
> > > > > > administrators:
> > > > > > > >> http://issues.apache.org/jira/secure/Administrators.jspa
> > > > > > > >> -
> > > > > > > >> For more information on JIRA, see:
> > > > > > > >> http://www.atlassian.com/software/jira
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Paulex Yang
> > > > > > > China Software Development Lab
> > > > > > > IBM
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > > > > To unsubscribe, e-mail:
> > harmony-dev-unsubscribe@incubator.apache.org
> > > > > > > For additional commands, e-mail:
> > > > harmony-dev-help@incubator.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > > > To unsubscribe, e-mail:
> > harmony-dev-unsubscribe@incubator.apache.org
> > > > > > For additional commands, e-mail:
> > harmony-dev-help@incubator.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Andrew Zhang
> > > > > China Software Development Lab, IBM
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Andrew Zhang
> > > China Software Development Lab, IBM
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> Andrew Zhang
> China Software Development Lab, IBM
>
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [classlib][security] SecurityManager.checkPropertyAccess(String) bug?
Posted by Mikhail Loenko <ml...@gmail.com>.
My bad. I should have checked that RI accepts block comments.
The bug seems to be caused by HARMONY-1262
Thanks,
Mikhail
2006/8/23, Andrew Zhang <zh...@gmail.com>:
> Reversion 433575 solves the bug, but seems Harmony still doesn't support
> /** */ style comment while RI does?
> I think it's a workaround rather than fix. :)
> Will we plan to fix the problem by supporting /* */ style comment ? Thanks!
>
> On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> >
> > Done
> >
> > 2006/8/22, Andrew Zhang <zh...@gmail.com>:
> > > It works! Thanks Mikhail!
> > >
> > > Another cool bug. :-)
> > >
> > >
> > > On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> > > >
> > > > Be patient :)
> > > >
> > > > I'm running the tests...
> > > >
> > > > If you want it right now, remove copyright from the java.policy file
> > > >
> > > > Thanks,
> > > > Mikhail
> > > >
> > > > 2006/8/22, Andrew Zhang <zh...@gmail.com>:
> > > > > Any solutions?
> > > > >
> > > > > On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> > > > > >
> > > > > > No
> > > > > >
> > > > > > The reason is these lines behave differently
> > > > > >
> > > > > > import java.security.*;
> > > > > > import java.util.*;
> > > > > > public class a {
> > > > > > static public void main(String[] args) throws Exception {
> > > > > > Permission p = new PropertyPermission("java.version",
> > "read");
> > > > > > ProtectionDomain d = a.class.getProtectionDomain();
> > > > > > System.out.println( "== " + d.implies(p));
> > > > > > }
> > > > > > }
> > > > > >
> > > > > > 2006/8/22, Paulex Yang <pa...@gmail.com>:
> > > > > > > Andrew Zhang wrote:
> > > > > > > > Hi all,
> > > > > > > >
> > > > > > > > I noticed that Harmony security manager throws unexpected
> > security
> > > > > > > > exception
> > > > > > > > even when policy file allows the permission. I have raised
> > > > > > HARMONY-1242(
> > > > > > > > http://issues.apache.org/jira/browse/HARMONY-1242) for
> > > > record. Would
> > > > > > > > anybody help have a look? Thanks!
> > > > > > > >
> > > > > > > Seems SecurityManager pass correct permission instance to
> > > > > > > AccessController, should it be AccessController's issue?
> > > > > > > >
> > > > > > > >
> > > > > > > > On 8/21/06, Andrew Zhang (JIRA) <ji...@apache.org> wrote:
> > > > > > > >>
> > > > > > > >> [classlib][security] SecurityManager.checkPropertyAccess("
> > > > > > java.version")
> > > > > > > >> throws unexpected exception.
> > > > > > > >>
> > > > > > > >>
> > > > > >
> > > >
> > ------------------------------------------------------------------------------------------------------
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> Key: HARMONY-1242
> > > > > > > >> URL:
> > > > > > http://issues.apache.org/jira/browse/HARMONY-1242
> > > > > > > >> Project: Harmony
> > > > > > > >> Issue Type: Bug
> > > > > > > >> Components: Classlib
> > > > > > > >> Reporter: Andrew Zhang
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> Following test reproduces the bug:
> > > > > > > >>
> > > > > > > >> public void test_checkPropertyAccess() throws Exception {
> > > > > > > >> SecurityManager manager = new SecurityManager();
> > > > > > > >> manager.checkPropertyAccess("java.version");
> > > > > > > >> }
> > > > > > > >>
> > > > > > > >> The test passes against RI while fails against Harmony.
> > > > > > > >> I have checked "java.policy" security file, which also
> > allows
> > > > > > > >> "permission
> > > > > > > >> java.util.PropertyPermission "java.version","read";" by
> > default.
> > > > > > > >>
> > > > > > > >> Would any security guys help investigate this issue? Thanks a
> > > > lot!
> > > > > > > >>
> > > > > > > >> Best regards,
> > > > > > > >> Andrew
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> --
> > > > > > > >> This message is automatically generated by JIRA.
> > > > > > > >> -
> > > > > > > >> If you think it was sent incorrectly contact one of the
> > > > > > administrators:
> > > > > > > >> http://issues.apache.org/jira/secure/Administrators.jspa
> > > > > > > >> -
> > > > > > > >> For more information on JIRA, see:
> > > > > > > >> http://www.atlassian.com/software/jira
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Paulex Yang
> > > > > > > China Software Development Lab
> > > > > > > IBM
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > > > > To unsubscribe, e-mail:
> > harmony-dev-unsubscribe@incubator.apache.org
> > > > > > > For additional commands, e-mail:
> > > > harmony-dev-help@incubator.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > > > To unsubscribe, e-mail:
> > harmony-dev-unsubscribe@incubator.apache.org
> > > > > > For additional commands, e-mail:
> > harmony-dev-help@incubator.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Andrew Zhang
> > > > > China Software Development Lab, IBM
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Andrew Zhang
> > > China Software Development Lab, IBM
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> Andrew Zhang
> China Software Development Lab, IBM
>
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [classlib][security] SecurityManager.checkPropertyAccess(String) bug?
Posted by Andrew Zhang <zh...@gmail.com>.
Reversion 433575 solves the bug, but seems Harmony still doesn't support
/** */ style comment while RI does?
I think it's a workaround rather than fix. :)
Will we plan to fix the problem by supporting /* */ style comment ? Thanks!
On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
>
> Done
>
> 2006/8/22, Andrew Zhang <zh...@gmail.com>:
> > It works! Thanks Mikhail!
> >
> > Another cool bug. :-)
> >
> >
> > On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> > >
> > > Be patient :)
> > >
> > > I'm running the tests...
> > >
> > > If you want it right now, remove copyright from the java.policy file
> > >
> > > Thanks,
> > > Mikhail
> > >
> > > 2006/8/22, Andrew Zhang <zh...@gmail.com>:
> > > > Any solutions?
> > > >
> > > > On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> > > > >
> > > > > No
> > > > >
> > > > > The reason is these lines behave differently
> > > > >
> > > > > import java.security.*;
> > > > > import java.util.*;
> > > > > public class a {
> > > > > static public void main(String[] args) throws Exception {
> > > > > Permission p = new PropertyPermission("java.version",
> "read");
> > > > > ProtectionDomain d = a.class.getProtectionDomain();
> > > > > System.out.println( "== " + d.implies(p));
> > > > > }
> > > > > }
> > > > >
> > > > > 2006/8/22, Paulex Yang <pa...@gmail.com>:
> > > > > > Andrew Zhang wrote:
> > > > > > > Hi all,
> > > > > > >
> > > > > > > I noticed that Harmony security manager throws unexpected
> security
> > > > > > > exception
> > > > > > > even when policy file allows the permission. I have raised
> > > > > HARMONY-1242(
> > > > > > > http://issues.apache.org/jira/browse/HARMONY-1242) for
> > > record. Would
> > > > > > > anybody help have a look? Thanks!
> > > > > > >
> > > > > > Seems SecurityManager pass correct permission instance to
> > > > > > AccessController, should it be AccessController's issue?
> > > > > > >
> > > > > > >
> > > > > > > On 8/21/06, Andrew Zhang (JIRA) <ji...@apache.org> wrote:
> > > > > > >>
> > > > > > >> [classlib][security] SecurityManager.checkPropertyAccess("
> > > > > java.version")
> > > > > > >> throws unexpected exception.
> > > > > > >>
> > > > > > >>
> > > > >
> > >
> ------------------------------------------------------------------------------------------------------
> > > > > > >>
> > > > > > >>
> > > > > > >> Key: HARMONY-1242
> > > > > > >> URL:
> > > > > http://issues.apache.org/jira/browse/HARMONY-1242
> > > > > > >> Project: Harmony
> > > > > > >> Issue Type: Bug
> > > > > > >> Components: Classlib
> > > > > > >> Reporter: Andrew Zhang
> > > > > > >>
> > > > > > >>
> > > > > > >> Following test reproduces the bug:
> > > > > > >>
> > > > > > >> public void test_checkPropertyAccess() throws Exception {
> > > > > > >> SecurityManager manager = new SecurityManager();
> > > > > > >> manager.checkPropertyAccess("java.version");
> > > > > > >> }
> > > > > > >>
> > > > > > >> The test passes against RI while fails against Harmony.
> > > > > > >> I have checked "java.policy" security file, which also
> allows
> > > > > > >> "permission
> > > > > > >> java.util.PropertyPermission "java.version","read";" by
> default.
> > > > > > >>
> > > > > > >> Would any security guys help investigate this issue? Thanks a
> > > lot!
> > > > > > >>
> > > > > > >> Best regards,
> > > > > > >> Andrew
> > > > > > >>
> > > > > > >>
> > > > > > >> --
> > > > > > >> This message is automatically generated by JIRA.
> > > > > > >> -
> > > > > > >> If you think it was sent incorrectly contact one of the
> > > > > administrators:
> > > > > > >> http://issues.apache.org/jira/secure/Administrators.jspa
> > > > > > >> -
> > > > > > >> For more information on JIRA, see:
> > > > > > >> http://www.atlassian.com/software/jira
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Paulex Yang
> > > > > > China Software Development Lab
> > > > > > IBM
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > > > To unsubscribe, e-mail:
> harmony-dev-unsubscribe@incubator.apache.org
> > > > > > For additional commands, e-mail:
> > > harmony-dev-help@incubator.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > > To unsubscribe, e-mail:
> harmony-dev-unsubscribe@incubator.apache.org
> > > > > For additional commands, e-mail:
> harmony-dev-help@incubator.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Andrew Zhang
> > > > China Software Development Lab, IBM
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> > >
> > >
> >
> >
> > --
> > Andrew Zhang
> > China Software Development Lab, IBM
> >
> >
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
--
Andrew Zhang
China Software Development Lab, IBM
Re: [classlib][security] SecurityManager.checkPropertyAccess(String) bug?
Posted by Mikhail Loenko <ml...@gmail.com>.
Done
2006/8/22, Andrew Zhang <zh...@gmail.com>:
> It works! Thanks Mikhail!
>
> Another cool bug. :-)
>
>
> On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> >
> > Be patient :)
> >
> > I'm running the tests...
> >
> > If you want it right now, remove copyright from the java.policy file
> >
> > Thanks,
> > Mikhail
> >
> > 2006/8/22, Andrew Zhang <zh...@gmail.com>:
> > > Any solutions?
> > >
> > > On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> > > >
> > > > No
> > > >
> > > > The reason is these lines behave differently
> > > >
> > > > import java.security.*;
> > > > import java.util.*;
> > > > public class a {
> > > > static public void main(String[] args) throws Exception {
> > > > Permission p = new PropertyPermission("java.version", "read");
> > > > ProtectionDomain d = a.class.getProtectionDomain();
> > > > System.out.println( "== " + d.implies(p));
> > > > }
> > > > }
> > > >
> > > > 2006/8/22, Paulex Yang <pa...@gmail.com>:
> > > > > Andrew Zhang wrote:
> > > > > > Hi all,
> > > > > >
> > > > > > I noticed that Harmony security manager throws unexpected security
> > > > > > exception
> > > > > > even when policy file allows the permission. I have raised
> > > > HARMONY-1242(
> > > > > > http://issues.apache.org/jira/browse/HARMONY-1242) for
> > record. Would
> > > > > > anybody help have a look? Thanks!
> > > > > >
> > > > > Seems SecurityManager pass correct permission instance to
> > > > > AccessController, should it be AccessController's issue?
> > > > > >
> > > > > >
> > > > > > On 8/21/06, Andrew Zhang (JIRA) <ji...@apache.org> wrote:
> > > > > >>
> > > > > >> [classlib][security] SecurityManager.checkPropertyAccess("
> > > > java.version")
> > > > > >> throws unexpected exception.
> > > > > >>
> > > > > >>
> > > >
> > ------------------------------------------------------------------------------------------------------
> > > > > >>
> > > > > >>
> > > > > >> Key: HARMONY-1242
> > > > > >> URL:
> > > > http://issues.apache.org/jira/browse/HARMONY-1242
> > > > > >> Project: Harmony
> > > > > >> Issue Type: Bug
> > > > > >> Components: Classlib
> > > > > >> Reporter: Andrew Zhang
> > > > > >>
> > > > > >>
> > > > > >> Following test reproduces the bug:
> > > > > >>
> > > > > >> public void test_checkPropertyAccess() throws Exception {
> > > > > >> SecurityManager manager = new SecurityManager();
> > > > > >> manager.checkPropertyAccess("java.version");
> > > > > >> }
> > > > > >>
> > > > > >> The test passes against RI while fails against Harmony.
> > > > > >> I have checked "java.policy" security file, which also allows
> > > > > >> "permission
> > > > > >> java.util.PropertyPermission "java.version","read";" by default.
> > > > > >>
> > > > > >> Would any security guys help investigate this issue? Thanks a
> > lot!
> > > > > >>
> > > > > >> Best regards,
> > > > > >> Andrew
> > > > > >>
> > > > > >>
> > > > > >> --
> > > > > >> This message is automatically generated by JIRA.
> > > > > >> -
> > > > > >> If you think it was sent incorrectly contact one of the
> > > > administrators:
> > > > > >> http://issues.apache.org/jira/secure/Administrators.jspa
> > > > > >> -
> > > > > >> For more information on JIRA, see:
> > > > > >> http://www.atlassian.com/software/jira
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Paulex Yang
> > > > > China Software Development Lab
> > > > > IBM
> > > > >
> > > > >
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > > > For additional commands, e-mail:
> > harmony-dev-help@incubator.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Andrew Zhang
> > > China Software Development Lab, IBM
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> Andrew Zhang
> China Software Development Lab, IBM
>
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [classlib][security] SecurityManager.checkPropertyAccess(String) bug?
Posted by Andrew Zhang <zh...@gmail.com>.
It works! Thanks Mikhail!
Another cool bug. :-)
On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
>
> Be patient :)
>
> I'm running the tests...
>
> If you want it right now, remove copyright from the java.policy file
>
> Thanks,
> Mikhail
>
> 2006/8/22, Andrew Zhang <zh...@gmail.com>:
> > Any solutions?
> >
> > On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> > >
> > > No
> > >
> > > The reason is these lines behave differently
> > >
> > > import java.security.*;
> > > import java.util.*;
> > > public class a {
> > > static public void main(String[] args) throws Exception {
> > > Permission p = new PropertyPermission("java.version", "read");
> > > ProtectionDomain d = a.class.getProtectionDomain();
> > > System.out.println( "== " + d.implies(p));
> > > }
> > > }
> > >
> > > 2006/8/22, Paulex Yang <pa...@gmail.com>:
> > > > Andrew Zhang wrote:
> > > > > Hi all,
> > > > >
> > > > > I noticed that Harmony security manager throws unexpected security
> > > > > exception
> > > > > even when policy file allows the permission. I have raised
> > > HARMONY-1242(
> > > > > http://issues.apache.org/jira/browse/HARMONY-1242) for
> record. Would
> > > > > anybody help have a look? Thanks!
> > > > >
> > > > Seems SecurityManager pass correct permission instance to
> > > > AccessController, should it be AccessController's issue?
> > > > >
> > > > >
> > > > > On 8/21/06, Andrew Zhang (JIRA) <ji...@apache.org> wrote:
> > > > >>
> > > > >> [classlib][security] SecurityManager.checkPropertyAccess("
> > > java.version")
> > > > >> throws unexpected exception.
> > > > >>
> > > > >>
> > >
> ------------------------------------------------------------------------------------------------------
> > > > >>
> > > > >>
> > > > >> Key: HARMONY-1242
> > > > >> URL:
> > > http://issues.apache.org/jira/browse/HARMONY-1242
> > > > >> Project: Harmony
> > > > >> Issue Type: Bug
> > > > >> Components: Classlib
> > > > >> Reporter: Andrew Zhang
> > > > >>
> > > > >>
> > > > >> Following test reproduces the bug:
> > > > >>
> > > > >> public void test_checkPropertyAccess() throws Exception {
> > > > >> SecurityManager manager = new SecurityManager();
> > > > >> manager.checkPropertyAccess("java.version");
> > > > >> }
> > > > >>
> > > > >> The test passes against RI while fails against Harmony.
> > > > >> I have checked "java.policy" security file, which also allows
> > > > >> "permission
> > > > >> java.util.PropertyPermission "java.version","read";" by default.
> > > > >>
> > > > >> Would any security guys help investigate this issue? Thanks a
> lot!
> > > > >>
> > > > >> Best regards,
> > > > >> Andrew
> > > > >>
> > > > >>
> > > > >> --
> > > > >> This message is automatically generated by JIRA.
> > > > >> -
> > > > >> If you think it was sent incorrectly contact one of the
> > > administrators:
> > > > >> http://issues.apache.org/jira/secure/Administrators.jspa
> > > > >> -
> > > > >> For more information on JIRA, see:
> > > > >> http://www.atlassian.com/software/jira
> > > > >>
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Paulex Yang
> > > > China Software Development Lab
> > > > IBM
> > > >
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > > For additional commands, e-mail:
> harmony-dev-help@incubator.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> > >
> > >
> >
> >
> > --
> > Andrew Zhang
> > China Software Development Lab, IBM
> >
> >
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
--
Andrew Zhang
China Software Development Lab, IBM
Re: [classlib][security] SecurityManager.checkPropertyAccess(String) bug?
Posted by Mikhail Loenko <ml...@gmail.com>.
Be patient :)
I'm running the tests...
If you want it right now, remove copyright from the java.policy file
Thanks,
Mikhail
2006/8/22, Andrew Zhang <zh...@gmail.com>:
> Any solutions?
>
> On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
> >
> > No
> >
> > The reason is these lines behave differently
> >
> > import java.security.*;
> > import java.util.*;
> > public class a {
> > static public void main(String[] args) throws Exception {
> > Permission p = new PropertyPermission("java.version", "read");
> > ProtectionDomain d = a.class.getProtectionDomain();
> > System.out.println( "== " + d.implies(p));
> > }
> > }
> >
> > 2006/8/22, Paulex Yang <pa...@gmail.com>:
> > > Andrew Zhang wrote:
> > > > Hi all,
> > > >
> > > > I noticed that Harmony security manager throws unexpected security
> > > > exception
> > > > even when policy file allows the permission. I have raised
> > HARMONY-1242(
> > > > http://issues.apache.org/jira/browse/HARMONY-1242) for record. Would
> > > > anybody help have a look? Thanks!
> > > >
> > > Seems SecurityManager pass correct permission instance to
> > > AccessController, should it be AccessController's issue?
> > > >
> > > >
> > > > On 8/21/06, Andrew Zhang (JIRA) <ji...@apache.org> wrote:
> > > >>
> > > >> [classlib][security] SecurityManager.checkPropertyAccess("
> > java.version")
> > > >> throws unexpected exception.
> > > >>
> > > >>
> > ------------------------------------------------------------------------------------------------------
> > > >>
> > > >>
> > > >> Key: HARMONY-1242
> > > >> URL:
> > http://issues.apache.org/jira/browse/HARMONY-1242
> > > >> Project: Harmony
> > > >> Issue Type: Bug
> > > >> Components: Classlib
> > > >> Reporter: Andrew Zhang
> > > >>
> > > >>
> > > >> Following test reproduces the bug:
> > > >>
> > > >> public void test_checkPropertyAccess() throws Exception {
> > > >> SecurityManager manager = new SecurityManager();
> > > >> manager.checkPropertyAccess("java.version");
> > > >> }
> > > >>
> > > >> The test passes against RI while fails against Harmony.
> > > >> I have checked "java.policy" security file, which also allows
> > > >> "permission
> > > >> java.util.PropertyPermission "java.version","read";" by default.
> > > >>
> > > >> Would any security guys help investigate this issue? Thanks a lot!
> > > >>
> > > >> Best regards,
> > > >> Andrew
> > > >>
> > > >>
> > > >> --
> > > >> This message is automatically generated by JIRA.
> > > >> -
> > > >> If you think it was sent incorrectly contact one of the
> > administrators:
> > > >> http://issues.apache.org/jira/secure/Administrators.jspa
> > > >> -
> > > >> For more information on JIRA, see:
> > > >> http://www.atlassian.com/software/jira
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> > > --
> > > Paulex Yang
> > > China Software Development Lab
> > > IBM
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> Andrew Zhang
> China Software Development Lab, IBM
>
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [classlib][security] SecurityManager.checkPropertyAccess(String) bug?
Posted by Andrew Zhang <zh...@gmail.com>.
Any solutions?
On 8/22/06, Mikhail Loenko <ml...@gmail.com> wrote:
>
> No
>
> The reason is these lines behave differently
>
> import java.security.*;
> import java.util.*;
> public class a {
> static public void main(String[] args) throws Exception {
> Permission p = new PropertyPermission("java.version", "read");
> ProtectionDomain d = a.class.getProtectionDomain();
> System.out.println( "== " + d.implies(p));
> }
> }
>
> 2006/8/22, Paulex Yang <pa...@gmail.com>:
> > Andrew Zhang wrote:
> > > Hi all,
> > >
> > > I noticed that Harmony security manager throws unexpected security
> > > exception
> > > even when policy file allows the permission. I have raised
> HARMONY-1242(
> > > http://issues.apache.org/jira/browse/HARMONY-1242) for record. Would
> > > anybody help have a look? Thanks!
> > >
> > Seems SecurityManager pass correct permission instance to
> > AccessController, should it be AccessController's issue?
> > >
> > >
> > > On 8/21/06, Andrew Zhang (JIRA) <ji...@apache.org> wrote:
> > >>
> > >> [classlib][security] SecurityManager.checkPropertyAccess("
> java.version")
> > >> throws unexpected exception.
> > >>
> > >>
> ------------------------------------------------------------------------------------------------------
> > >>
> > >>
> > >> Key: HARMONY-1242
> > >> URL:
> http://issues.apache.org/jira/browse/HARMONY-1242
> > >> Project: Harmony
> > >> Issue Type: Bug
> > >> Components: Classlib
> > >> Reporter: Andrew Zhang
> > >>
> > >>
> > >> Following test reproduces the bug:
> > >>
> > >> public void test_checkPropertyAccess() throws Exception {
> > >> SecurityManager manager = new SecurityManager();
> > >> manager.checkPropertyAccess("java.version");
> > >> }
> > >>
> > >> The test passes against RI while fails against Harmony.
> > >> I have checked "java.policy" security file, which also allows
> > >> "permission
> > >> java.util.PropertyPermission "java.version","read";" by default.
> > >>
> > >> Would any security guys help investigate this issue? Thanks a lot!
> > >>
> > >> Best regards,
> > >> Andrew
> > >>
> > >>
> > >> --
> > >> This message is automatically generated by JIRA.
> > >> -
> > >> If you think it was sent incorrectly contact one of the
> administrators:
> > >> http://issues.apache.org/jira/secure/Administrators.jspa
> > >> -
> > >> For more information on JIRA, see:
> > >> http://www.atlassian.com/software/jira
> > >>
> > >>
> > >>
> > >
> > >
> >
> >
> > --
> > Paulex Yang
> > China Software Development Lab
> > IBM
> >
> >
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
--
Andrew Zhang
China Software Development Lab, IBM
Re: [classlib][security] SecurityManager.checkPropertyAccess(String)
bug?
Posted by Paulex Yang <pa...@gmail.com>.
Mikhail Loenko wrote:
> No
>
> The reason is these lines behave differently
>
> import java.security.*;
> import java.util.*;
> public class a {
> static public void main(String[] args) throws Exception {
> Permission p = new PropertyPermission("java.version", "read");
> ProtectionDomain d = a.class.getProtectionDomain();
> System.out.println( "== " + d.implies(p));
> }
> }
Good catch! :-)
>
> 2006/8/22, Paulex Yang <pa...@gmail.com>:
>>
>> Seems SecurityManager pass correct permission instance to
>> AccessController, should it be AccessController's issue?
>>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
--
Paulex Yang
China Software Development Lab
IBM
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [classlib][security] SecurityManager.checkPropertyAccess(String) bug?
Posted by Mikhail Loenko <ml...@gmail.com>.
No
The reason is these lines behave differently
import java.security.*;
import java.util.*;
public class a {
static public void main(String[] args) throws Exception {
Permission p = new PropertyPermission("java.version", "read");
ProtectionDomain d = a.class.getProtectionDomain();
System.out.println( "== " + d.implies(p));
}
}
2006/8/22, Paulex Yang <pa...@gmail.com>:
> Andrew Zhang wrote:
> > Hi all,
> >
> > I noticed that Harmony security manager throws unexpected security
> > exception
> > even when policy file allows the permission. I have raised HARMONY-1242(
> > http://issues.apache.org/jira/browse/HARMONY-1242) for record. Would
> > anybody help have a look? Thanks!
> >
> Seems SecurityManager pass correct permission instance to
> AccessController, should it be AccessController's issue?
> >
> >
> > On 8/21/06, Andrew Zhang (JIRA) <ji...@apache.org> wrote:
> >>
> >> [classlib][security] SecurityManager.checkPropertyAccess("java.version")
> >> throws unexpected exception.
> >>
> >> ------------------------------------------------------------------------------------------------------
> >>
> >>
> >> Key: HARMONY-1242
> >> URL: http://issues.apache.org/jira/browse/HARMONY-1242
> >> Project: Harmony
> >> Issue Type: Bug
> >> Components: Classlib
> >> Reporter: Andrew Zhang
> >>
> >>
> >> Following test reproduces the bug:
> >>
> >> public void test_checkPropertyAccess() throws Exception {
> >> SecurityManager manager = new SecurityManager();
> >> manager.checkPropertyAccess("java.version");
> >> }
> >>
> >> The test passes against RI while fails against Harmony.
> >> I have checked "java.policy" security file, which also allows
> >> "permission
> >> java.util.PropertyPermission "java.version","read";" by default.
> >>
> >> Would any security guys help investigate this issue? Thanks a lot!
> >>
> >> Best regards,
> >> Andrew
> >>
> >>
> >> --
> >> This message is automatically generated by JIRA.
> >> -
> >> If you think it was sent incorrectly contact one of the administrators:
> >> http://issues.apache.org/jira/secure/Administrators.jspa
> >> -
> >> For more information on JIRA, see:
> >> http://www.atlassian.com/software/jira
> >>
> >>
> >>
> >
> >
>
>
> --
> Paulex Yang
> China Software Development Lab
> IBM
>
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [classlib][security] SecurityManager.checkPropertyAccess(String)
bug?
Posted by Paulex Yang <pa...@gmail.com>.
Andrew Zhang wrote:
> Hi all,
>
> I noticed that Harmony security manager throws unexpected security
> exception
> even when policy file allows the permission. I have raised HARMONY-1242(
> http://issues.apache.org/jira/browse/HARMONY-1242) for record. Would
> anybody help have a look? Thanks!
>
Seems SecurityManager pass correct permission instance to
AccessController, should it be AccessController's issue?
>
>
> On 8/21/06, Andrew Zhang (JIRA) <ji...@apache.org> wrote:
>>
>> [classlib][security] SecurityManager.checkPropertyAccess("java.version")
>> throws unexpected exception.
>>
>> ------------------------------------------------------------------------------------------------------
>>
>>
>> Key: HARMONY-1242
>> URL: http://issues.apache.org/jira/browse/HARMONY-1242
>> Project: Harmony
>> Issue Type: Bug
>> Components: Classlib
>> Reporter: Andrew Zhang
>>
>>
>> Following test reproduces the bug:
>>
>> public void test_checkPropertyAccess() throws Exception {
>> SecurityManager manager = new SecurityManager();
>> manager.checkPropertyAccess("java.version");
>> }
>>
>> The test passes against RI while fails against Harmony.
>> I have checked "java.policy" security file, which also allows
>> "permission
>> java.util.PropertyPermission "java.version","read";" by default.
>>
>> Would any security guys help investigate this issue? Thanks a lot!
>>
>> Best regards,
>> Andrew
>>
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> If you think it was sent incorrectly contact one of the administrators:
>> http://issues.apache.org/jira/secure/Administrators.jspa
>> -
>> For more information on JIRA, see:
>> http://www.atlassian.com/software/jira
>>
>>
>>
>
>
--
Paulex Yang
China Software Development Lab
IBM
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [classlib][security] SecurityManager.checkPropertyAccess(String) bug?
Posted by Mikhail Loenko <ml...@gmail.com>.
Looking
2006/8/22, Andrew Zhang <zh...@gmail.com>:
> Hi all,
>
> I noticed that Harmony security manager throws unexpected security exception
> even when policy file allows the permission. I have raised HARMONY-1242(
> http://issues.apache.org/jira/browse/HARMONY-1242) for record. Would
> anybody help have a look? Thanks!
>
>
>
> On 8/21/06, Andrew Zhang (JIRA) <ji...@apache.org> wrote:
> >
> > [classlib][security] SecurityManager.checkPropertyAccess("java.version")
> > throws unexpected exception.
> >
> > ------------------------------------------------------------------------------------------------------
> >
> > Key: HARMONY-1242
> > URL: http://issues.apache.org/jira/browse/HARMONY-1242
> > Project: Harmony
> > Issue Type: Bug
> > Components: Classlib
> > Reporter: Andrew Zhang
> >
> >
> > Following test reproduces the bug:
> >
> > public void test_checkPropertyAccess() throws Exception {
> > SecurityManager manager = new SecurityManager();
> > manager.checkPropertyAccess("java.version");
> > }
> >
> > The test passes against RI while fails against Harmony.
> > I have checked "java.policy" security file, which also allows "permission
> > java.util.PropertyPermission "java.version","read";" by default.
> >
> > Would any security guys help investigate this issue? Thanks a lot!
> >
> > Best regards,
> > Andrew
> >
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the administrators:
> > http://issues.apache.org/jira/secure/Administrators.jspa
> > -
> > For more information on JIRA, see: http://www.atlassian.com/software/jira
> >
> >
> >
>
>
> --
> Andrew Zhang
> China Software Development Lab, IBM
>
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org