mono.git
11 years agoImplemented PipeSecurity. GetAccessControl, SetAccessControl, and ACL-containing...
James Bellinger [Sun, 8 Jul 2012 17:44:50 +0000 (13:44 -0400)]
Implemented PipeSecurity. GetAccessControl, SetAccessControl, and ACL-containing constructor overrides now work on pipes.

On another note, after writing a test I discovered Asynchronous pipes appear to be completely broken on Win32.
The class does not correctly handle overlapped I/O. This patch doesn't fix that.

One other fix in this patch, the DllImports for Win32 pipes did not have SetLastError set.
So, they were unable to return a meaningful error in the event of failure. This is now fixed, and
UnauthorizedAccessException correctly throws for pipe connects denied by ACL (necessary for PipeSecurity test).

11 years agoImplement SemaphoreSecurity.
James Bellinger [Sun, 8 Jul 2012 11:46:43 +0000 (07:46 -0400)]
Implement SemaphoreSecurity.

11 years agoMerge pull request #381 from JamesB7/system-security6
Marek Safar [Sun, 8 Jul 2012 18:40:48 +0000 (11:40 -0700)]
Merge pull request #381 from JamesB7/system-security6

Fix ObjectSecurityTest on .NET 2.0. The test no longer uses AccessRule<T> and AuditRule<T>.

11 years agoFix ObjectSecurityTest on .NET 2.0. The test no longer uses AccessRule<T> and AuditRu...
James Bellinger [Sun, 8 Jul 2012 18:33:39 +0000 (14:33 -0400)]
Fix ObjectSecurityTest on .NET 2.0. The test no longer uses AccessRule<T> and AuditRule<T>.

11 years agoMerge pull request #378 from miraclespain/master
Marek Safar [Sun, 8 Jul 2012 08:54:17 +0000 (01:54 -0700)]
Merge pull request #378 from miraclespain/master

Fix to problem with CheckboxList when running .NET 4.0

11 years agoMerge pull request #380 from JamesB7/enum-fix
Marek Safar [Sun, 8 Jul 2012 08:53:08 +0000 (01:53 -0700)]
Merge pull request #380 from JamesB7/enum-fix

Fixed Type.GetEnumNames sort order (it's specified on MSDN). Previously ...

11 years agoMerge pull request #379 from JamesB7/system-security6
Marek Safar [Sun, 8 Jul 2012 08:49:01 +0000 (01:49 -0700)]
Merge pull request #379 from JamesB7/system-security6

ACLs! (File, Directory, Mutex, EventWaitHandle, RegistryKey)

11 years agoFixed Type.GetEnumNames sort order (it's specified on MSDN). Previously this method...
James Bellinger [Sun, 8 Jul 2012 04:31:57 +0000 (00:31 -0400)]
Fixed Type.GetEnumNames sort order (it's specified on MSDN). Previously this method was returning in GetFields (declaration) order. It now returns sorted by the unsigned value of the enum as is correct.

Ran into this while calling Type.GetEnumNames and Type.GetEnumValues.
To my surprise the pairs didn't match up. Anyway, here's a fix.

11 years agoRegistrySecurity now working!
James Bellinger [Sat, 7 Jul 2012 22:09:27 +0000 (18:09 -0400)]
RegistrySecurity now working!

11 years agoMutexes and event wait handles now work, with tests included. Fixed the exception...
James Bellinger [Sat, 7 Jul 2012 20:21:37 +0000 (16:21 -0400)]
Mutexes and event wait handles now work, with tests included. Fixed the exception on failure for MutexSecurity.

11 years agoACLs now work on Windows. Tests all the way up to DirectorySecurityTest and FileSecur...
James Bellinger [Tue, 3 Jul 2012 22:57:27 +0000 (18:57 -0400)]
ACLs now work on Windows. Tests all the way up to DirectorySecurityTest and FileSecurityTest.

NativeObjectSecurity is implemented.
I've done it in such a way that, for OSes that do not have a unified API for all ACLs,
overrides can be done in subclasses such as FileSystemSecurity without trouble.

ObjectSecurity, CommonObjectSecurity, and DirectoryObjectSecurity all implemented.
MutexSecurity, PipeSecurity, etc. all just add type specialization and nothing else. Implemented all of these as well.

Access and Audit rules now correctly use NTAccount in their string overloads (see unit tests).
The constructors all provide correct AccessMasks now. In other words, these classes are all now un-broken/no longer stubs.

More unit tests for CommonSecurityDescriptor and fixes to pass them.
A few had checks that were redundant (implemented by (Authorization|Audit|Access)Rule) as well. These have been removed.
The Allow Everyone Full Access default for null DiscretionaryAcls in CommonSecurityDescriptor is, I think,
properly implemented. This required some changes to GenericSecurityDescriptor as well, but now Mono matches
MS.NET on GetSddl/GetBinaryForm for null DiscretionaryAcl including roundtrip.

What's still missing:
(1) CommonAcl's RemoveAccess/RemoveAudit. RemoveAll and RemoveSpecific work so it's not a big issue.
(2) CommonAcl merging will not yet try to merge a CommonAce together with an ObjectAce.
(3) The various *Security constructors. Get/SetAccessControl work on files and directories.
However, you still have to create and then set. I am not too familiar with Mono runtime internal
calls, but to someone who is: If the SECURITY_ATTRIBUTES parameter to Create*'s lpSecurityDescriptor
pointed to the output of GenericSecurityDescriptor's GetBinaryForm, that would be a complete
implementation.

11 years agoCommonSecurityDescriptor!
James Bellinger [Tue, 3 Jul 2012 22:28:51 +0000 (18:28 -0400)]
CommonSecurityDescriptor!

11 years agoFix to compare to actual value as this is what is used in 4.0 since changeset d8838a64
Jakob Andersen [Sat, 7 Jul 2012 20:06:53 +0000 (22:06 +0200)]
Fix to compare to actual value as this is what is used in 4.0 since changeset d8838a64

11 years agoHtmlEncode the path
Gonzalo Paniagua Javier [Fri, 6 Jul 2012 17:42:43 +0000 (13:42 -0400)]
HtmlEncode the path

Fixes Novell bug #769799.

11 years ago[sgen] Fix a race condition.
Mark Probst [Thu, 5 Jul 2012 13:58:43 +0000 (15:58 +0200)]
[sgen] Fix a race condition.

When a worker thread is looking for a job in the queue the collection
might already be over.  Don't call code that assumes it's still running
until we're sure.

11 years agoRework RectangleF.Contains to not do equality comparison on floating point values...
Rolf Bjarne Kvinge [Thu, 5 Jul 2012 12:54:19 +0000 (14:54 +0200)]
Rework RectangleF.Contains to not do equality comparison on floating point values. Fixes #5985.

11 years agoFix failing dns tests
Marek Safar [Thu, 5 Jul 2012 08:00:46 +0000 (09:00 +0100)]
Fix failing dns tests

11 years agoFix Order property to throw on no value
Marek Safar [Thu, 5 Jul 2012 07:21:55 +0000 (08:21 +0100)]
Fix Order property to throw on no value

11 years agoFix an assert in the arm backend if an offset is too large.
Zoltan Varga [Thu, 5 Jul 2012 02:59:11 +0000 (04:59 +0200)]
Fix an assert in the arm backend if an offset is too large.

11 years agoMerge pull request #373 from QuickJack/master
Marek Safar [Wed, 4 Jul 2012 16:21:36 +0000 (09:21 -0700)]
Merge pull request #373 from QuickJack/master

Removed a number of warnings

11 years ago[Microsoft.Build.Tasks] Remove an overly verbose informational message
Alan McGovern [Wed, 4 Jul 2012 14:42:17 +0000 (15:42 +0100)]
[Microsoft.Build.Tasks] Remove an overly verbose informational message

This warning really pollutes the monodevelop build, so lets nuke it
for now.

11 years ago[Microsoft.Build.Tasks] Fix some simple caching to improve build times
Alan McGovern [Sun, 1 Jul 2012 20:37:03 +0000 (16:37 -0400)]
[Microsoft.Build.Tasks] Fix some simple caching to improve build times

Large projects now have significantly less overhead when calculating
assembly references and referencing gac assemblies.

11 years agoApplied Marek's suggestions so remove CS0067 from certain event handler declarations
QuickJack [Wed, 4 Jul 2012 14:09:47 +0000 (16:09 +0200)]
Applied Marek's suggestions so remove CS0067 from certain event handler declarations

11 years agoMerge pull request #376 from atomia/master
Marek Safar [Wed, 4 Jul 2012 11:49:01 +0000 (04:49 -0700)]
Merge pull request #376 from atomia/master

Allow parsing of config files for for enterprise library.

11 years agoNot validating if null value is null
Thorsten Tarrach [Wed, 4 Jul 2012 11:46:34 +0000 (13:46 +0200)]
Not validating if null value is null

This allows parsing of enterprise library config extensions and is in line with the way MS .net handles things.

11 years agoMerge pull request #375 from atomia/master
Marek Safar [Wed, 4 Jul 2012 11:30:47 +0000 (04:30 -0700)]
Merge pull request #375 from atomia/master

Improved exception messages in case of configuration errors

11 years agoImproved error messages so that it becomes clear where configuration errors come...
Thorsten Tarrach [Wed, 4 Jul 2012 09:37:05 +0000 (11:37 +0200)]
Improved error messages so that it becomes clear where configuration errors come from

11 years agoMerge pull request #372 from JamesB7/system-security5
Marek Safar [Wed, 4 Jul 2012 07:11:36 +0000 (00:11 -0700)]
Merge pull request #372 from JamesB7/system-security5

Implemented DiscretionaryAcl and SystemAcl except for RemoveAccess

11 years agoFixes a number of warnings in System.Windows.Forms.dll
QuickJack [Tue, 3 Jul 2012 20:54:31 +0000 (22:54 +0200)]
Fixes a number of warnings in System.Windows.Forms.dll

11 years agoImplemented SystemAcl. Common shared functionality moved to CommonAcl. Only missing...
James Bellinger [Tue, 3 Jul 2012 19:32:49 +0000 (15:32 -0400)]
Implemented SystemAcl. Common shared functionality moved to CommonAcl. Only missing implementation now is RemoveAccess/RemoveAudit.

Unit tests included - for SystemAcl they are based on DiscretionaryAcl's mostly,
with one extra and one somewhat changed since AuditFlags merge together unlike Allow/Deny.

Anyway, it should be practical to implement CommonSecurityDescriptor and friends with these classes working.

11 years agoFixes a number of warnings in System.Web.dll
QuickJack [Tue, 3 Jul 2012 18:38:53 +0000 (20:38 +0200)]
Fixes a number of warnings in System.Web.dll

11 years agoImplemented all of DiscretionaryAcl except for RemoveAccess. Unit tests are included.
James Bellinger [Tue, 3 Jul 2012 17:56:55 +0000 (13:56 -0400)]
Implemented all of DiscretionaryAcl except for RemoveAccess. Unit tests are included.

Also fixed:
CommonAcl's merging now filters out AceFlags.InheritedFlags when !IsContainer.
For matching AccessMask, CommonAcl will now correctly merge ContainerInherit and ObjectInherit.
GenericAcl's SyncRoot is now virtual as per spec.
SecurityIdentifier.CompareTo throws ArgumentNullException, not NullReferenceException, on null parameter.

Miscellaneous unit tests:
Verify that RawAcl throws for negative capacity.

11 years agoMerge pull request #370 from sblom/master
Marek Safar [Tue, 3 Jul 2012 08:14:46 +0000 (01:14 -0700)]
Merge pull request #370 from sblom/master

Needed to add more precise checking of dimensions on array initializers

11 years agoMerge pull request #369 from JamesB7/system-security4
Marek Safar [Tue, 3 Jul 2012 07:23:40 +0000 (00:23 -0700)]
Merge pull request #369 from JamesB7/system-security4

Completely implemented System.Security.AccessControl.CommonAcl

11 years agoFix dimension checking for array initializer expressions
Scott Blomquist [Tue, 3 Jul 2012 06:56:21 +0000 (23:56 -0700)]
Fix dimension checking for array initializer expressions

11 years agoBug fix: Merging occurs after sorting ACE groups by SecurityIdentifier not before...
James Bellinger [Tue, 3 Jul 2012 03:35:14 +0000 (23:35 -0400)]
Bug fix: Merging occurs after sorting ACE groups by SecurityIdentifier not before. Added a unit test for this behavior.

Also, fixed the namespace for the ObjectAce unit test.

11 years agoCommonAcl is now essentially fully functional. Its descendants DiscretionaryAcl
James Bellinger [Tue, 3 Jul 2012 02:56:31 +0000 (22:56 -0400)]
CommonAcl is now essentially fully functional. Its descendants DiscretionaryAcl
and SystemAcl need work, but CommonAcl can be manipulated using RawAcls nicely
now and will test canonicity, merge ACEs, remove meaningless ACEs, sort explicit
deny/allow ACEs by SecurityIdentifier... all the nice things CommonAcl is supposed
to do.

Anyway, this patch... Off the top of my head...
Fixed CommonAce and ObjectAce deserialization/roundtripping with opaque data.
Fixed ObjectAce having the wrong BinaryLength depending on ObjectAceFlags.
GenericAce had two protected static SDDL methods which should be internal.

Added some unit tests for the above. One of the tests compares the binary
output with a blob I produced using the *same unit test* on MS.NET (with a
File.WriteAllText creating the byte array to paste in, naturally), and
happily, it produces identical binary output. Very nice.

11 years agoSecurityIdentifier's CompareTo now works like MS.Net. CommonAcl is supposed to sort...
James Bellinger [Mon, 2 Jul 2012 23:55:09 +0000 (19:55 -0400)]
SecurityIdentifier's CompareTo now works like MS.Net. CommonAcl is supposed to sort groupings of canonical ACEs using SecurityIdentifier's CompareTo, so this was important to do.

I determined the behavior of CompareTo by first writing unit tests for
CommonAcl (instantiated as DiscretionaryAcl but using RawAcl instead of
DiscretionaryAcl methods to do the manipulation to keep DiscretionaryAcl
out of the loop). I developed and ran these unit tests on MS.NET using
MonoDevelop...

Anyway, CompareTo appears to compare authority, then the *number* of
subauthorities, and lastly the subauthorities. I'd be curious if there
is more detail, but so far this seems to cover it. It's definitely
*not* just a comparison of the string.

This patch also modifies CommonAcl to take advantage of this new sorting,
so now it should sort groups of explicit ACEs (access deny, access allow)
in canonical ACLs correctly.

With that down, I've got two unit tests that still fail on Mono.

11 years agoImplemented much of CommonAcl.cs
James Bellinger [Mon, 2 Jul 2012 18:16:01 +0000 (14:16 -0400)]
Implemented much of CommonAcl.cs
Some tests still fail because sorting is not implemented yet.
I'll need to alter SecurityIdentifier CompareTo.

11 years agoAdd new gc options to the man page.
Rodrigo Kumpera [Mon, 2 Jul 2012 20:51:49 +0000 (17:51 -0300)]
Add new gc options to the man page.

11 years agoAdd two heap growth knobs: save-target-ratio and default-allowance-ratio.
Rodrigo Kumpera [Mon, 2 Jul 2012 20:33:15 +0000 (17:33 -0300)]
Add two heap growth knobs: save-target-ratio and default-allowance-ratio.

11 years agoSimply a bit the memgov code. Kill a duplicated header declaration.
Rodrigo Kumpera [Mon, 2 Jul 2012 19:55:32 +0000 (16:55 -0300)]
Simply a bit the memgov code. Kill a duplicated header declaration.

11 years agoFix allowance calculation and introduce a constant in place of a magic number.
Rodrigo Kumpera [Mon, 2 Jul 2012 18:53:41 +0000 (15:53 -0300)]
Fix allowance calculation and introduce a constant in place of a magic number.

* sgen-conf.h: Introduce SGEN_DEFAULT_SAVE_TARGET_RATIO tunnable.

* sgen-memory-governor.c: Fix allowance calculation to use the
right size of the los space.

11 years agoExtract the nursery allowance heuristics to a memgov API.
Rodrigo Kumpera [Mon, 2 Jul 2012 18:07:32 +0000 (15:07 -0300)]
Extract the nursery allowance heuristics to a memgov API.

11 years agoMove the sgen_*_os_memory APIs to memgov.
Rodrigo Kumpera [Mon, 2 Jul 2012 15:32:36 +0000 (12:32 -0300)]
Move the sgen_*_os_memory APIs to memgov.

11 years agoUse new atomis with allocated_heap.
Rodrigo Kumpera [Mon, 2 Jul 2012 15:32:02 +0000 (12:32 -0300)]
Use new atomis with allocated_heap.

11 years agoAdd SGEN_ATOMIC_ADD_P for pointer sized integers.
Rodrigo Kumpera [Mon, 2 Jul 2012 15:22:04 +0000 (12:22 -0300)]
Add SGEN_ATOMIC_ADD_P for pointer sized integers.

11 years agoAdd some FIXME.
Rodrigo Kumpera [Fri, 29 Jun 2012 15:25:37 +0000 (12:25 -0300)]
Add some FIXME.

11 years agoMove the heap limits code to the memgov file.
Rodrigo Kumpera [Thu, 21 Jun 2012 13:45:31 +0000 (10:45 -0300)]
Move the heap limits code to the memgov file.

11 years agoAdd new memory governor files.
Rodrigo Kumpera [Wed, 20 Jun 2012 18:51:52 +0000 (15:51 -0300)]
Add new memory governor files.

11 years agoFix #5169: Environment.ExpandEnvironmentVariables().
Martin Baulig [Mon, 2 Jul 2012 18:42:21 +0000 (20:42 +0200)]
Fix #5169: Environment.ExpandEnvironmentVariables().

11 years agoRe-enable CSharpCodeProviderTest on the Mac.
Martin Baulig [Mon, 2 Jul 2012 17:06:43 +0000 (19:06 +0200)]
Re-enable CSharpCodeProviderTest on the Mac.

I just had a look at these and can't reproduce the problem anymore,
these tests are now working fine on my Mac.

This reverts commit 58ae80aa5e28610c26cb7472e58e156b1db6735b.

11 years agoWebRequestTest.cs: Add workaround for t-online.de's DNS server.
Martin Baulig [Mon, 2 Jul 2012 16:52:40 +0000 (18:52 +0200)]
WebRequestTest.cs: Add workaround for t-online.de's DNS server.

11 years agoDnsTest.cs: Add workaround for t-online.de's DNS server.
Martin Baulig [Mon, 2 Jul 2012 16:42:24 +0000 (18:42 +0200)]
DnsTest.cs: Add workaround for t-online.de's DNS server.

11 years agoFix go-mono.com's IP address in DnsTest.cs.
Martin Baulig [Mon, 2 Jul 2012 16:31:56 +0000 (18:31 +0200)]
Fix go-mono.com's IP address in DnsTest.cs.

go-mono.com has 50.21.183.68, not 74.208.222.19.

12 years agoUse isfinite instead of finite as newer xcode removed it.
Rodrigo Kumpera [Mon, 2 Jul 2012 14:20:43 +0000 (11:20 -0300)]
Use isfinite instead of finite as newer xcode removed it.

12 years agoMerge branch 'master' of github.com:mono/mono
Rodrigo Kumpera [Mon, 2 Jul 2012 14:17:08 +0000 (11:17 -0300)]
Merge branch 'master' of github.com:mono/mono

12 years agoMake mkbundle bundle assemblies a lot faster.
Rolf Bjarne Kvinge [Mon, 2 Jul 2012 13:42:58 +0000 (15:42 +0200)]
Make mkbundle bundle assemblies a lot faster.

Preallocate the 256 different lines we might write to the assembly file
instead of allocating several strings for every line.

With compression mkbundle is about twice as fast now (since compression
speed hasn't changed), without compression it's 5-10x faster, depending
on the number of assemblies to embed.

12 years agoMerge branch 'master' of github.com:mono/mono
Rodrigo Kumpera [Mon, 2 Jul 2012 13:21:18 +0000 (10:21 -0300)]
Merge branch 'master' of github.com:mono/mono

12 years ago[sgen] Make heavy statistics compile again.
Mark Probst [Fri, 29 Jun 2012 17:28:19 +0000 (19:28 +0200)]
[sgen] Make heavy statistics compile again.

12 years agoUpdate corcompare
Marek Safar [Mon, 2 Jul 2012 10:51:06 +0000 (11:51 +0100)]
Update corcompare

12 years agoAdd missing attribute classes
Marek Safar [Mon, 2 Jul 2012 10:50:39 +0000 (11:50 +0100)]
Add missing attribute classes

12 years agoMerge pull request #362 from JamesB7/system-security
Marek Safar [Mon, 2 Jul 2012 07:37:18 +0000 (00:37 -0700)]
Merge pull request #362 from JamesB7/system-security

Fix System.Security.AccessControl.MutexAccessRule's constructor.

12 years agoMerge pull request #367 from robwilkens/work1
Marek Safar [Mon, 2 Jul 2012 06:54:22 +0000 (23:54 -0700)]
Merge pull request #367 from robwilkens/work1

Fixes a problem that was preventing mono from compiling

12 years agoFixes a problem that was preventing mono from compiling
Rob Wilkens [Mon, 2 Jul 2012 02:02:21 +0000 (22:02 -0400)]
Fixes a problem that was preventing mono from compiling

Somehow the compiler became more strict, and a not-implemented class is now
causing mono to fail to build.

The attached patch doesn't really fix anything besides letting it compile.

I was nice enough to throw a NotImplementedException() on the default
constructor.

The compile time error was:
System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs(35,15): error CS0122:
`System.Security.AccessControl.ObjectSecurity
<System.IO.MemoryMappedFiles.MemoryMappedFileRights>.ObjectSecurity()' is
inaccessible due to its protection level

Feel free to reject this patch if I am the only one seeing this problem (on
Linux x86_64 build) after most recent git clone of mono/master.

12 years agoAdded a unit test for the bug this is fixing -- previously the constructor just crash...
James Bellinger [Sun, 1 Jul 2012 04:59:14 +0000 (00:59 -0400)]
Added a unit test for the bug this is fixing -- previously the constructor just crashed, always.
So, this constructs with valid MutexAccessRights, and also makes sure that the rights are correct.

12 years agoMutexAccessRule... previously entirely broken as it passed 0 for accessMask.
James Bellinger [Sat, 30 Jun 2012 11:16:56 +0000 (07:16 -0400)]
MutexAccessRule... previously entirely broken as it passed 0 for accessMask.
Now, accessMask matches the MutexRules passed in. The MutexRules enum is a bitmask
corresponding to Win32 ACE accessMasks and the two match.

I verified that accessMask corresponds directly to the MutexRules passed in the
constructor on Win32 using Reflection. It stands to reason, and it turns out to be
the case. System.Security.AccessControl is still mostly broken but this at least
corrects MutexAccessRule.

12 years agoMerge pull request #363 from JamesB7/system-security2
Marek Safar [Sun, 1 Jul 2012 16:05:58 +0000 (09:05 -0700)]
Merge pull request #363 from JamesB7/system-security2

Implemented the .NET 4.0 generic versions of AccessRule and AuditRule.

12 years agoAdded unit test.
James Bellinger [Sun, 1 Jul 2012 15:06:23 +0000 (11:06 -0400)]
Added unit test.

Also added constructors to ObjectSecurity<T>.
It's supposed to have them (they just pass to NativeObjectSecurity),
but the only user in Mono is MemoryMappedFileSecurity so this is
just for completeness's sake. Also, this lets the test depend on neither
System.Core nor internal methods.

12 years agoMerge pull request #365 from JamesB7/system-security3
Marek Safar [Sun, 1 Jul 2012 13:26:06 +0000 (06:26 -0700)]
Merge pull request #365 from JamesB7/system-security3

AuthorizationRule now accepts NTAccount like it should. Provided a unit test.

12 years agoAuthorizationRule now accepts NTAccount like it should. Provided a unit test.
James Bellinger [Sun, 1 Jul 2012 13:17:05 +0000 (09:17 -0400)]
AuthorizationRule now accepts NTAccount like it should. Provided a unit test.

Many derived classes of AuthorizationRule have string overloads which pass
'new NTAccount (identity)'. The exception docs state "can be cast as a
SecurityIdentifier" not "is a SecurityIdentifier". Anyway, this fixes all the
string constructors in System.Security.AccessControl.

Also, I added checking for inheritanceFlags and propagationFlags parameters.

While building the unit test, I found accessMask == 0 throws ArgumentException,
not ArgumentOutOfRangeException, on MS.NET 4.0 (contrary to docs). So,
I've made this match.

12 years agoFix altstack on osx/amd64. Fixes #5933.
Zoltan Varga [Sat, 30 Jun 2012 23:30:02 +0000 (01:30 +0200)]
Fix altstack on osx/amd64. Fixes #5933.

12 years ago[Xbuild] Use OrdinalIgnoreCase not InvariantCultureIgnoreCase
Alan McGovern [Sat, 30 Jun 2012 22:55:38 +0000 (18:55 -0400)]
[Xbuild] Use OrdinalIgnoreCase not InvariantCultureIgnoreCase

It's chewing up a fair bit of CPU time and buys us nothing. We only care
about ordinal ignore case for these scenarios.

12 years agoImplemented the .NET 4.0 generic versions of AccessRule and AuditRule.
James Bellinger [Sat, 30 Jun 2012 17:21:46 +0000 (13:21 -0400)]
Implemented the .NET 4.0 generic versions of AccessRule and AuditRule.

Details worth being aware of, that aren't well documented in MS.NET:

(1) The Rights property is just a casted AccessMask.
I've checked this by testing with MS.NET -- if you use AccessRule<Test>
with an arbitrary struct Test { }, MS.NET has an InvalidCastException
on the Rights getter if you create with ObjectSecurity's factory method
(which is passed an int), and in the constructor if you use AccessRule's
constructor.

(2) The string constructor overloads call 'new NTAccount(identity)'.
What these methods do for AccessRule is not documented by MS.NET,
but this *is* documented for SemaphoreAccessRule, and my testing
with C# shows AccessRule does the same thing. So, I've implemented
this behavior to match.

I will submit a separate patch afterwards to make AuthorizationRule's
accept NTAccount, which is required for the string overloads to work.
Contrary to the MS.NET *documentation* (which Mono follows), AuthorizationRule
actually accepts NTAccount as well as (the documented) SecurityIdentifier.
I verified this by deriving a class from AuthorizationRule.

12 years agoFix UdpClientTest.CloseInReceive() on Mac OS.
Martin Baulig [Sat, 30 Jun 2012 04:40:54 +0000 (06:40 +0200)]
Fix UdpClientTest.CloseInReceive() on Mac OS.

On my Mac, somethig is already listening on port 50000; use
a random one instead.

12 years agoDisable failing tests on the Mac; filed bug #5934 about it.
Martin Baulig [Sat, 30 Jun 2012 04:10:09 +0000 (06:10 +0200)]
Disable failing tests on the Mac; filed bug #5934 about it.

12 years agoImprove SocketTests.EndConnect().
Martin Baulig [Sat, 30 Jun 2012 02:43:34 +0000 (04:43 +0200)]
Improve SocketTests.EndConnect().

Rename to BogusEndConnect() and accept a few more error codes.

12 years agoSocketTest.ConnectMultiple() for Mac OS.
Martin Baulig [Sat, 30 Jun 2012 01:21:00 +0000 (03:21 +0200)]
SocketTest.ConnectMultiple() for Mac OS.

12 years agoAdd test for pinned gc handle.
Rodrigo Kumpera [Fri, 29 Jun 2012 21:27:18 +0000 (18:27 -0300)]
Add test for pinned gc handle.

12 years agoFix a pair of bugs in the gchandle code.
Rodrigo Kumpera [Fri, 29 Jun 2012 21:25:39 +0000 (18:25 -0300)]
Fix a pair of bugs in the gchandle code.

* gc.c: Make sure pinned handles actually pin on sgen.
* gc.c: Use gc_memmove and gc_bzero when dealing with memory
that has managed references.

12 years agoRevert the fix for #5747 from 8b5f71ef60146590193298cc870bf72e14b47950, it broke...
Miguel de Icaza [Fri, 29 Jun 2012 19:11:55 +0000 (15:11 -0400)]
Revert the fix for #5747 from 8b5f71ef60146590193298cc870bf72e14b47950, it broke XSP monitoring of the file system

12 years agoRemove empty log files when using test-wrench.
Zoltan Varga [Fri, 29 Jun 2012 18:39:00 +0000 (20:39 +0200)]
Remove empty log files when using test-wrench.

12 years agoRemove some assembly from mkbundle which doesn't work on osx 64 bit.
Zoltan Varga [Fri, 29 Jun 2012 18:09:55 +0000 (20:09 +0200)]
Remove some assembly from mkbundle which doesn't work on osx 64 bit.

12 years agoFix race condition in static's inialization of mono_message_init.
Rodrigo Kumpera [Fri, 29 Jun 2012 15:46:39 +0000 (12:46 -0300)]
Fix race condition in static's inialization of mono_message_init.

* object.c (mono_message_init): Make sure the static field
we test fo check for initialization is the last to init or
we risk an abort due to others been null.

12 years agoRemove all ifdefs
Marek Safar [Fri, 29 Jun 2012 10:30:47 +0000 (11:30 +0100)]
Remove all ifdefs

12 years agoUse correct iterator return type for XPathEvaluate. Fixes #5902
Marek Safar [Fri, 29 Jun 2012 10:01:44 +0000 (11:01 +0100)]
Use correct iterator return type for XPathEvaluate. Fixes #5902

12 years agoFix the test-messages test.
Zoltan Varga [Thu, 28 Jun 2012 23:59:25 +0000 (01:59 +0200)]
Fix the test-messages test.

12 years agoFix warnings.
Zoltan Varga [Thu, 28 Jun 2012 23:35:06 +0000 (01:35 +0200)]
Fix warnings.

12 years agoAttempt to fix #1553
Gonzalo Paniagua Javier [Thu, 28 Jun 2012 19:48:57 +0000 (15:48 -0400)]
Attempt to fix #1553

This should prevent a popular exception to happen again.

12 years agoEnable the multicast socket tests on the Mac.
Martin Baulig [Thu, 28 Jun 2012 18:41:50 +0000 (20:41 +0200)]
Enable the multicast socket tests on the Mac.

12 years agoFix #5504: UdpClient.JoinMulticastGroup().
Martin Baulig [Thu, 28 Jun 2012 17:43:19 +0000 (19:43 +0200)]
Fix #5504: UdpClient.JoinMulticastGroup().

* configure.in: Check for if_nametoindex().

* socket-io.c (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
  Mac OS doesn't allow interface = 0; use the interface id from the first
  non-loopback interface.

* UdpClientTest.cs: Enable JoinMulticastGroup1_IPv6,
  JoinMulticastGroup2_IPv6 and JoinMulticastGroup3_IPv6 on the Mac.

12 years agosocket-io: Fix endianess in ipaddress_to_struct_in6_addr.
Martin Baulig [Thu, 28 Jun 2012 17:34:45 +0000 (19:34 +0200)]
socket-io: Fix endianess in ipaddress_to_struct_in6_addr.

12 years agoAdd new test
Marek Safar [Thu, 28 Jun 2012 17:14:13 +0000 (18:14 +0100)]
Add new test

12 years agoRemove NET_2_0
Marek Safar [Thu, 28 Jun 2012 08:52:26 +0000 (09:52 +0100)]
Remove NET_2_0

12 years agoFix posix build.
Rodrigo Kumpera [Thu, 28 Jun 2012 15:38:11 +0000 (12:38 -0300)]
Fix posix build.

12 years agoMake the thread abort code multi-thread safe.
Rodrigo Kumpera [Wed, 27 Jun 2012 22:57:35 +0000 (19:57 -0300)]
Make the thread abort code multi-thread safe.

12 years agoWith Socket:Dispose from using Thread.Abort to less agressive alternative.
Rodrigo Kumpera [Wed, 27 Jun 2012 20:36:54 +0000 (17:36 -0300)]
With Socket:Dispose from using Thread.Abort to less agressive alternative.

* Socket_2_1.cs: When closing a socket we need to abort any
pending syscalls to that socket. For most syscalls the kernel
does it for us. But accept/connect on linux requires extra
love.

We previously used Thread.Abort to implement that, but this
is a pretty radical solution with very complicated ramifications.
So instead now we use a new icall cancel_blocking_socket_operation
that makes sure we only abort the syscall and do nothing else.

This reduces the trouble surface a lot given how tricky
Thread.Abort is.

12 years agoAsync close on mac raises ECONNABORTED for connect().
Rodrigo Kumpera [Wed, 27 Jun 2012 20:22:18 +0000 (17:22 -0300)]
Async close on mac raises ECONNABORTED for connect().

12 years agoAdd new cancel_blocking_socket_operation icall to Socket.
Rodrigo Kumpera [Wed, 27 Jun 2012 20:20:29 +0000 (17:20 -0300)]
Add new cancel_blocking_socket_operation icall to Socket.

* socket-io.c: Add cancel_blocking_socket_operation icall
to Socket so we can abort socket syscalls on other threads
when we decide to close a socket.

12 years agoRespect the new signal ignore flag.
Rodrigo Kumpera [Wed, 27 Jun 2012 20:18:37 +0000 (17:18 -0300)]
Respect the new signal ignore flag.

* mini-posix.c: If ignore_next_signal is set, we ignore the
current USR1. This is used to abort syscalls.