RE: [nant-dev] NUnit security

2003-09-10 Thread Lorphelin Yves
Title: [nant-dev] NUnit security






Hi Martin,

If you have no special need for your service to run under a privileged 
account, let it then run with aless privilegedaccount.


Otherwise you can use the built-in .Net runtime security 
features:
Let your nant script copy everithing you need to a special folder (incl 
Nunit assemblies).
 configure the .Net runtime on the build server so that everithing 
that is runned from this folder is granted less privileges.
If your running W*S go to the administrative tools, .net Framework 
Configuration 
Runtime Security policyMachine code groups  all Code  
My_computer_zone  make a new code group who's 
condition types is url and use "file://some 
directory/*.*"  the choose the permission set you want to use. (this can be 
done via the cmd line caspol)


Hope this helps.
Yves


  -Oorspronkelijk bericht- Van: Martin 
  Aliger [mailto:[EMAIL PROTECTED] Verzonden: wo 9/10/2003 
  4:43 PM Aan: ! nant CC: Onderwerp: [nant-dev] 
  NUnit security
  Hi all,I found serious security problem. My build 
  server, which use NAntinternally, runs as windows service (as all build 
  servers I know runs). Thisservice runs as priviliged user. Nothing wrong 
  with that unless you runtest-cases with NUnit. It runs user code, which 
  could contain maligioustests... It is not big problem for us, since I 
  trust mycoleagues, but it could be problem in some scenarios.What 
  about limit somehow permitions in NUnitTask? Or is something done inNUnit 
  itself?Regards,Martin---This 
  sf.net email is sponsored by:ThinkGeekWelcome to geek heaven.http://thinkgeek.com/sf___nant-developers 
  mailing list[EMAIL PROTECTED]https://lists.sourceforge.net/lists/listinfo/nant-developers




[nant-dev] RE: [Nant-users] Strange behaviour of NAnt+NUnit2

2003-06-03 Thread Lorphelin Yves

Hi Jaroslaw 

Here is my 2 cent. Shoot me if I got it wrong
 
Versionning for 1.0  1.1 is basically this:
An executable tries to run  within it's own runtime.


 
so Nunit (compiled on 1.0) tries to run a some library of test compiled on 1.0 - 
nunit tries to loads someting from mscorlib (1.0 version)  it runs fine.

Then you try to run Nunit (compiled on 1.0)  run some library of test compiled on 
(1.1). Thus following the basic rule; nant ( nunit) loads classes from mscorlib (.Net 
1.0)  everything is running under runtime 1.0.
Then your tests  ask for mscorlib ( .Net version 1.1) and then Bang. There is no way 
for the runtime to know what it should do here.

You just got a dependency problem here. By default the runtime won't allow something 
compile on 1.0 to run under 1.1

So, when you use
   startup
supportedRuntime version=v1.1.4322 /
supportedRuntime version=v1.0.3705 /
/startup
Your basically saying to the runtime try to run everything under version 1.1 of the 
.net framework.  then it works fine because nant( nunit) are then running under the 
1.1 version of the runtime.

Hope this helps ( accurate enough)
Yves

 



From: Jaroslaw Kowalski [mailto:[EMAIL PROTECTED]
Sent: lundi 2 juin 2003 15:40
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]


 
I have an application that I compile for both net-1.0 and net-1.1. For
my unit tests I'm linking to binary NUnit.Framework.dll that is provided
by NAnt (as in the following snippet)
 
--
copy file=${nant.location}/NUnit.Framework.dll
tofile=${outdir}/NUnit.Framework.dll /
csc ...
references  
includes name=${outdir}/NUnit.Framework.dll /
/references
/csc
--
 
One of my tests relies on ConfigurationSettings.AppSettings[] to get
some configuration. When I compile it on net-1.1 and run nunit2 on it
I get this strange error when getting some setting.
 
Error loading XML file
c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config Request
for the permission of type
System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
(c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config)
 
When the DLL is compiled for net-1.0, the test runs just fine.
 
Digging through the internet I've found a solution: I had to swap the
two supportedRuntime lines in nant.exe.config file, so that v1.1.4322
is before v1.0.3705:
 
--
startup
supportedRuntime version=v1.1.4322 /
supportedRuntime version=v1.0.3705 /
/startup
--
 
Now the tests compiled with net-1.0 and net-1.1 run just fine (which is
big a surprise to me as I don't understand this behaviour)
 
Is it a bug in NAnt or NUnit - or maybe a Microsoft general versioning
problem? Can some MS guru explain this behaviour?
 
Maybe an option is needed that will force nunit2 to run under
specified runtime? Maybe it should make use of
nant.settings.currentframework?
 
Jarek

BTW. NUnit-console.exe and nunit-gui.exe themselves have similar
problems. I had to modify startup section to make it run under
net-1.1.



---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


RE: [nant-dev] Novice C# Resource Troubles ?

2003-01-14 Thread Lorphelin, Yves
Title: RE: [nant-dev] Novice C# Resource Troubles ?





Hi Shawn, 
You can check if nant has found some resource by browsing your source code directory, 
Nant automagically generate .resource file for each .rsx found in your includes name=*.resx/ but does not delete them afterwards. 

I see also that your includes for the sources fileset grab the following directory
*.cs
.\Configuration\*.cs
.\Diagnostics\*.cs
.\IO\*.cs


Maybe your includes for the resources should look like this ?


 
 resources
   includes name=*.resx/
   includes name=.\Configuration\*.resx/
   includes name=.\Diagnostics\*.resx/
   includes name=.\IO\*.resx/
  /resources





Yves


 -Original Message-
 From: Shawn Parslow [mailto:[EMAIL PROTECTED]] 
 Sent: 14 January 2003 18:42
 To: [EMAIL PROTECTED]
 Subject: [nant-dev] Novice C# Resource Troubles ?
 
 
 Hey folks,
 
 I am new to NAnt and am trying to build a simple independent 
 C# dll project. Here is my lnl.build file so far, it work but 
 the compiled file seems to be missing the resource 
 information in my .resx file?
 
 ?xml version=1.0?
 project name=Lnl default=build basedir=.
 property name=release value=true/
 target name=clean description=remove all generated files
 delete file=../release/Lnl.dll failonerror=false/
 /target
 target name=build description=compiles the source code 
 csc target=module output=../release/lnl.dll 
 release=${release}
 sources
includes name=*.cs/
includes name=.\Configuration\*.cs/
includes name=.\Diagnostics\*.cs/
includes name=.\IO\*.cs/
 /sources
 resources
includes name=*.resx/
   /resources
 /csc
 /target
 /project
 
 
 ***
 The information contained in this e-mail and any files 
 transmitted with it may be confidential, is intended only for 
 the use of the recipient named above, and may be privileged. 
 If the reader of this message is not the intended recipient, 
 you are hereby notified that any dissemination, distribution, 
 or copying of this communication, or any of its contents, is 
 strictly prohibited. If you have received this communication 
 in error, please notify the sender immediately by e-mail and 
 delete the original message and any copy of it from your 
 computer system. Thank you.
 ***
 
 
 
 ---
 This SF.NET email is sponsored by: FREE SSL Guide from 
 Thawte are you planning your Web Server Security? Click here 
 to get a FREE Thawte SSL guide and find the answers to all 
 your SSL security issues. 
 http://ads.sourceforge.net/cgi- bin/redirect.pl?thaw0026en
 
 
 ___
 Nant-developers mailing list [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers