Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task

2003-08-28 Thread Stefan Bodewig
On Thu, 28 Aug 2003, Antoine Levy-Lambert <[EMAIL PROTECTED]>
wrote:

> does gump start ant builds in a new VM ?

Each project in a VM of its own, yes.

> Can it be that the security manager which gump is using is
> preventing these permissions from being granted in ant ?

I don't think that there are any different permissions around in that
case.  The only difference between the nightly Gump runs and running
Ant in a terminal are the environment variables AFAICT.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task

2003-08-28 Thread Antoine Levy-Lambert
Hi Stefan,

does gump start ant builds in a new VM ?
Can it be that the security manager which gump is using is preventing these
permissions from being granted in ant ?
I am not an expert about permissions, but I do not think that the locale
would explain these problems ?
Antoine
- Original Message -
From: "Stefan Bodewig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 28, 2003 9:39 AM
Subject: Re: [VOTE] Adding Permissions / Security Manager to Java task and
JUnit task


> On 28 Aug 2003, Stefan Bodewig <[EMAIL PROTECTED]> wrote:
>
> > While you are at it, PermissionsTest fails in Gump for me.
>
> the gory details (it doesn't fail if I run it interactively, my locale
> settings are different when using Gump which runs via cron, I don't
> see any other difference at first glance):
>
> 
>
> [junit] Testsuite:
org.apache.tools.ant.taskdefs.optional.EchoPropertiesTest
> [junit] Tests run: 13, Failures: 0, Errors: 0, Time elapsed: 0.515 sec
>
> [junit] - Standard Output ---
> [junit] -- listing properties --
> [junit] java.runtime.name=Java(TM) 2 Runtime Environment, Stand...
> [junit] sun.boot.library.path=/usr/local/java/j2sdk1.4.1_02/jre/lib...
> [junit] java.vm.version=1.4.1_02-b06
> [junit] ant.java.version=1.4
> [junit] ant.file.test=/javastuff/gump/ant/src/etc/testcases...
> [junit] java.vm.vendor=Sun Microsystems Inc.
> [junit] java.vendor.url=http://java.sun.com/
> [junit] path.separator=:
> [junit] java.vm.name=Java HotSpot(TM) Client VM
> [junit] file.encoding.pkg=sun.io
> [junit] user.country=US
> [junit] sun.os.patch.level=unknown
> [junit] java.vm.specification.name=Java Virtual Machine Specification
> [junit] user.dir=/javastuff/gump/ant
> [junit] java.runtime.version=1.4.1_02-b06
> [junit] java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
> [junit] basedir=/javastuff/gump/ant/src/etc/testcases...
> [junit] java.endorsed.dirs=/usr/local/java/j2sdk1.4.1_02/jre/lib...
> [junit] os.arch=i386
> [junit] java.io.tmpdir=/tmp
> [junit] line.separator=
>
> [junit] java.vm.specification.vendor=Sun Microsystems Inc.
> [junit] os.name=Linux
> [junit] ant.home=${ant.home}
> [junit] sun.java2d.fontpath=
> [junit] ant.project.name=test
> [junit] java.library.path=/usr/local/java/j2sdk1.4.1_02/jre/lib...
> [junit] test.property=isSet
> [junit] java.specification.name=Java Platform API Specification
> [junit] java.class.version=48.0
> [junit]
java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferences...
> [junit] os.version=2.4.20-20.7
> [junit] ant.file=/javastuff/gump/ant/src/etc/testcases...
> [junit] user.home=/home/bodewig
> [junit] b.set=false
> [junit] user.timezone=Europe/Berlin
> [junit] java.awt.printerjob=sun.print.PSPrinterJob
> [junit] java.specification.version=1.4
> [junit] build.tests=build/testcases
> [junit] file.encoding=ANSI_X3.4-1968
> [junit] tests-classpath.value=/javastuff/gump/ant/build/classes:/ja...
> [junit] user.name=bodewig
> [junit] java.class.path=/home/bodewig/dev/gump/xml-xerces2/ja...
> [junit] java.vm.specification.version=1.0
> [junit] sun.arch.data.model=32
> [junit] java.home=/usr/local/java/j2sdk1.4.1_02/jre
> [junit] java.specification.vendor=Sun Microsystems Inc.
> [junit] user.language=en
> [junit] java.vm.info=mixed mode
> [junit] java.version=1.4.1_02
> [junit] java.ext.dirs=/usr/local/java/j2sdk1.4.1_02/jre/lib...
> [junit] sun.boot.class.path=/home/bodewig/dev/gump/xml-commons/ja...
> [junit] java.vendor=Sun Microsystems Inc.
> [junit] a.set=true
> [junit] file.separator=/
> [junit] java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...
> [junit] sun.cpu.endian=little
> [junit] sun.io.unicode.encoding=UnicodeLittle
> [junit] sun.cpu.isalist=
>
> 
>
> [junit] Testsuite: org.apache.tools.ant.types.PermissionsTest
> [junit] Tests run: 6, Failures: 0, Errors: 1, Time elapsed: 0.035 sec
>
> [junit] Testcase:
testExit(org.apache.tools.ant.types.PermissionsTest): Caused an ERROR
> [junit] Permission (java.util.PropertyPermission file.encoding read)
was not granted.
> [junit] java.lang.SecurityException: Permission
(java.util.PropertyPermission file.encoding read) was not granted.
> [junit] at
org.apache.tools.ant.types.Permissions$MySM.checkPermission(Permissions.java
:201)
> [junit] at
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
> [junit] at java.lang.System.getProperty(System.java:572)
>  

Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task

2003-08-28 Thread Stefan Bodewig
On 28 Aug 2003, Stefan Bodewig <[EMAIL PROTECTED]> wrote:

> While you are at it, PermissionsTest fails in Gump for me.

the gory details (it doesn't fail if I run it interactively, my locale
settings are different when using Gump which runs via cron, I don't
see any other difference at first glance):



[junit] Testsuite: org.apache.tools.ant.taskdefs.optional.EchoPropertiesTest
[junit] Tests run: 13, Failures: 0, Errors: 0, Time elapsed: 0.515 sec

[junit] - Standard Output ---
[junit] -- listing properties --
[junit] java.runtime.name=Java(TM) 2 Runtime Environment, Stand...
[junit] sun.boot.library.path=/usr/local/java/j2sdk1.4.1_02/jre/lib...
[junit] java.vm.version=1.4.1_02-b06
[junit] ant.java.version=1.4
[junit] ant.file.test=/javastuff/gump/ant/src/etc/testcases...
[junit] java.vm.vendor=Sun Microsystems Inc.
[junit] java.vendor.url=http://java.sun.com/
[junit] path.separator=:
[junit] java.vm.name=Java HotSpot(TM) Client VM
[junit] file.encoding.pkg=sun.io
[junit] user.country=US
[junit] sun.os.patch.level=unknown
[junit] java.vm.specification.name=Java Virtual Machine Specification
[junit] user.dir=/javastuff/gump/ant
[junit] java.runtime.version=1.4.1_02-b06
[junit] java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
[junit] basedir=/javastuff/gump/ant/src/etc/testcases...
[junit] java.endorsed.dirs=/usr/local/java/j2sdk1.4.1_02/jre/lib...
[junit] os.arch=i386
[junit] java.io.tmpdir=/tmp
[junit] line.separator=

[junit] java.vm.specification.vendor=Sun Microsystems Inc.
[junit] os.name=Linux
[junit] ant.home=${ant.home}
[junit] sun.java2d.fontpath=
[junit] ant.project.name=test
[junit] java.library.path=/usr/local/java/j2sdk1.4.1_02/jre/lib...
[junit] test.property=isSet
[junit] java.specification.name=Java Platform API Specification
[junit] java.class.version=48.0
[junit] 
java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferences...
[junit] os.version=2.4.20-20.7
[junit] ant.file=/javastuff/gump/ant/src/etc/testcases...
[junit] user.home=/home/bodewig
[junit] b.set=false
[junit] user.timezone=Europe/Berlin
[junit] java.awt.printerjob=sun.print.PSPrinterJob
[junit] java.specification.version=1.4
[junit] build.tests=build/testcases
[junit] file.encoding=ANSI_X3.4-1968
[junit] tests-classpath.value=/javastuff/gump/ant/build/classes:/ja...
[junit] user.name=bodewig
[junit] java.class.path=/home/bodewig/dev/gump/xml-xerces2/ja...
[junit] java.vm.specification.version=1.0
[junit] sun.arch.data.model=32
[junit] java.home=/usr/local/java/j2sdk1.4.1_02/jre
[junit] java.specification.vendor=Sun Microsystems Inc.
[junit] user.language=en
[junit] java.vm.info=mixed mode
[junit] java.version=1.4.1_02
[junit] java.ext.dirs=/usr/local/java/j2sdk1.4.1_02/jre/lib...
[junit] sun.boot.class.path=/home/bodewig/dev/gump/xml-commons/ja...
[junit] java.vendor=Sun Microsystems Inc.
[junit] a.set=true
[junit] file.separator=/
[junit] java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...
[junit] sun.cpu.endian=little
[junit] sun.io.unicode.encoding=UnicodeLittle
[junit] sun.cpu.isalist=



[junit] Testsuite: org.apache.tools.ant.types.PermissionsTest
[junit] Tests run: 6, Failures: 0, Errors: 1, Time elapsed: 0.035 sec

[junit] Testcase: testExit(org.apache.tools.ant.types.PermissionsTest): 
Caused an ERROR
[junit] Permission (java.util.PropertyPermission file.encoding read) was 
not granted.
[junit] java.lang.SecurityException: Permission 
(java.util.PropertyPermission file.encoding read) was not granted.
[junit] at 
org.apache.tools.ant.types.Permissions$MySM.checkPermission(Permissions.java:201)
[junit] at 
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
[junit] at java.lang.System.getProperty(System.java:572)
[junit] at 
sun.security.action.GetPropertyAction.run(GetPropertyAction.java:66)
[junit] at java.security.AccessController.doPrivileged(Native Method)
[junit] at sun.io.Converters.getDefaultEncodingName(Converters.java:66)
[junit] at java.lang.StringCoding.decode(StringCoding.java:226)
[junit] at java.lang.String.(String.java:383)
[junit] at 
java.io.ByteArrayOutputStream.toString(ByteArrayOutputStream.java:160)
[junit] at 
org.apache.tools.ant.DemuxOutputStream.processBuffer(DemuxOutputStream.java:208)
[junit] at 
org.apache.tools.ant.DemuxOutputStream.write(DemuxOutputStream.java:184)
[junit] at 
org.apache.tools.ant.DemuxOutputStream.write(DemuxOutputStream.java:278)
[junit] at java.io.PrintStream.write(PrintStream.java:258)
[junit] at 
sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:334)
[junit] at 
sun.nio.cs.StreamEncoder$Charset

Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task

2003-08-28 Thread Stefan Bodewig
On Wed, 27 Aug 2003, Antoine Levy-Lambert <[EMAIL PROTECTED]>
wrote:

> JavaTest fails under IDEA with the new CVS HEAD.  I need to have a
> look to see what is happening.

While you are at it, PermissionsTest fails in Gump for me.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task

2003-08-27 Thread Antoine Levy-Lambert
Forget this email.
I had not seen that the JavaTest needs the tests-classpath.value property,
which is defined in the main build.xml.
So in IDEA, I guess I just need to set this property on the command line.
Antoine
- Original Message -
From: "Antoine Levy-Lambert" <[EMAIL PROTECTED]>
To: "Ant Developers List" <[EMAIL PROTECTED]>
Sent: Wednesday, August 27, 2003 8:26 PM
Subject: Re: [VOTE] Adding Permissions / Security Manager to Java task and
JUnit task


> Hi,
> Stefan,
> you are right
> JavaTest fails under IDEA with the new CVS HEAD.
> I need to have a look to see what is happening.
> Cheers,
> Antoine



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task

2003-08-27 Thread Darin Swanson
I am planning to take a look at how this impacts Eclipse's Ant integration 
later today or tomorrow.
We set a SecurityManager as well.

FYI
Darins





"Antoine Levy-Lambert" <[EMAIL PROTECTED]>
08/27/03 11:26 AM
Please respond to "Ant Developers List"

 
To: "Ant Developers List" <[EMAIL PROTECTED]>
    cc: 
    Subject:    Re: [VOTE] Adding Permissions / Security Manager to 
Java task and JUnit 
task



Hi,
Stefan,
you are right
JavaTest fails under IDEA with the new CVS HEAD.
I need to have a look to see what is happening.
Cheers,
Antoine
- Original Message -
From: "Stefan Bodewig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 25, 2003 6:14 PM
Subject: Re: [VOTE] Adding Permissions / Security Manager to Java task and
JUnit task


> On Mon, 25 Aug 2003, Steve Loughran <[EMAIL PROTECTED]> wrote:
>
> > I am +1. Indeed, I have patched my own copy and been playing with
> > it.
>
> Fine, I didn't have the time to do the same, yet.
>
> I'm mainly concerned about how this would affect IDE integration (I
> know NetBeans has already set a SecurityManager before starting Ant),
> an area where I'd have to install an IDE just to test it. 8-(
>
> > One option could be to say that the combination of fork==false &&
> > failonerror!=null turns on the security manager,
>
> Fine with me.
>
> Stefan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task

2003-08-27 Thread Antoine Levy-Lambert
Hi,
Stefan,
you are right
JavaTest fails under IDEA with the new CVS HEAD.
I need to have a look to see what is happening.
Cheers,
Antoine
- Original Message -
From: "Stefan Bodewig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 25, 2003 6:14 PM
Subject: Re: [VOTE] Adding Permissions / Security Manager to Java task and
JUnit task


> On Mon, 25 Aug 2003, Steve Loughran <[EMAIL PROTECTED]> wrote:
>
> > I am +1. Indeed, I have patched my own copy and been playing with
> > it.
>
> Fine, I didn't have the time to do the same, yet.
>
> I'm mainly concerned about how this would affect IDE integration (I
> know NetBeans has already set a SecurityManager before starting Ant),
> an area where I'd have to install an IDE just to test it. 8-(
>
> > One option could be to say that the combination of fork==false &&
> > failonerror!=null turns on the security manager,
>
> Fine with me.
>
> Stefan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task

2003-08-27 Thread Antoine Levy-Lambert
Steve Loughran wrote :

>One option could be to say that the combination of fork==false && 
>failonerror!=null turns on the security manager, as setting the 
>failonerror flag in a non-forked  was meaningless till now -we 
>couldnt catch the failure to decide whether or not to act on it.

I still need to take care about this point. 

Cheers,

Antoine


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task

2003-08-25 Thread Stefan Bodewig
On Mon, 25 Aug 2003, Steve Loughran <[EMAIL PROTECTED]> wrote:

> I am +1. Indeed, I have patched my own copy and been playing with
> it.

Fine, I didn't have the time to do the same, yet.

I'm mainly concerned about how this would affect IDE integration (I
know NetBeans has already set a SecurityManager before starting Ant),
an area where I'd have to install an IDE just to test it. 8-(

> One option could be to say that the combination of fork==false &&
> failonerror!=null turns on the security manager,

Fine with me.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task

2003-08-25 Thread Steve Loughran
Antoine Levy-Lambert wrote:
See :
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22533
I am quoting Martijn Kruithof :
The following bug reports are associated with Security Manager issues:
http://issues.apache.org/bugzilla/show_bug.cgi?id=6323 and
http://issues.apache.org/bugzilla/show_bug.cgi?id=11459
I have written an patch / contribution to add permission handling to the
code
run inside the Java and JUnit tasks via a common permissions type.
The reason no specific permission task has been made with in there nested
the
JUnit or Java task is that the tasks may need permissions that the code run
by
these tasks may not have.
Manual testing has been performed under JDK 1.4.2 and automated test cases
have
been added.
The build of dist-lite and test is verified to succeed under JDK 1.4.2
The new and modified test cases have been verified to succeed under JDK
1.2.2.
(Lots of Failures/Errors there in base!)
I will start with my +1
I am +1. Indeed, I have patched my own copy and been playing with it.
I still think it would be nice to turn on exit catching in  
classic, so that non-forking exits get caught. But it is hard to do that 
without risking backwards compatibility.

One option could be to say that the combination of fork==false && 
failonerror!=null turns on the security manager, as setting the 
failonerror flag in a non-forked  was meaningless till now -we 
couldnt catch the failure to decide whether or not to act on it.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [VOTE] Adding Permissions / Security Manager to Java task and JUnit task

2003-08-22 Thread Costin Manolache
+1

Costin


Antoine Levy-Lambert wrote:

> See :
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22533
> 
> I am quoting Martijn Kruithof :
> 
> The following bug reports are associated with Security Manager issues:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=6323 and
> http://issues.apache.org/bugzilla/show_bug.cgi?id=11459
> I have written an patch / contribution to add permission handling to the
> code
> run inside the Java and JUnit tasks via a common permissions type.
> The reason no specific permission task has been made with in there nested
> the
> JUnit or Java task is that the tasks may need permissions that the code
> run by
> these tasks may not have.
> Manual testing has been performed under JDK 1.4.2 and automated test cases
> have
> been added.
> The build of dist-lite and test is verified to succeed under JDK 1.4.2
> The new and modified test cases have been verified to succeed under JDK
> 1.2.2.
> (Lots of Failures/Errors there in base!)
> 
> I will start with my +1
> 
> Cheers,
> Antoine



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]