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.

Submitter:  Carl-Adam Brengesjo <ptah>
Submitted:  Wed 18 Aug 2004 12:13:43 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  tum
Open/Closed:  Closed

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

fixed in cvs

Thong Nguyen <tum>
Group Member
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>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-08-25 tum StatusNone Fixed
    Assigned toNone tum
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code