bugDotGNU Portable.NET - Bugs: bug #10047, Default By default,...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #10047: Default By default, System.Threading.Thread.CurrentPrincipal returns null.

Submitted by:  Carl-Adam Brengesjo <ptah>
Submitted on:  Wed 18 Aug 2004 12:13:43 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Thong Nguyen <tum>
Open/Closed: Closed

Wed 25 Aug 2004 07:27:53 AM UTC, comment #1:

fixed in cvs

Thong Nguyen <tum>
Project MemberIn charge of this item.
Wed 18 Aug 2004 12:13:43 AM UTC, original submission:

test.cs:
----------------------------
using System;
using System.Threading;
using System.Security.Principal;

class Class
{
[STAThread]
public static void Main(String[] args)
{
Console.WriteLine("\"{0}\"", Thread.CurrentPrincipal.Identity.Name);
Thread.CurrentPrincipal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
Console.WriteLine("\"{0}\"", Thread.CurrentPrincipal.Identity.Name);
}
}

output (windows):
----------------------------
C:\>test.exe
""
"HAMLET\carladam"

expected output (pnet):
----------------------------
carladam@hamlet:/cygdrive/c$ ilrun test.exe
""
"carladam"

output (pnet):
----------------------------
carladam@hamlet:/cygdrive/c$ ilrun test.exe
Uncaught exception: System.NullReferenceException: The value 'null' was found where an instance of an object was required
at Class.Main(String[])

And Thread.CurrentPrincipal == null evulates to true on pnet, while on m$ it's false.

Carl-Adam Brengesjo <ptah>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 25 Aug 2004 07:27:53 AM UTCtumStatusNone=>Fixed
  Assigned toNone=>tum
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1