![]() |
![]() |
|
December 10, 2003ACL Security Management in C#Ok, so I had a need today to do some serious access control work in C# and decided to google the early morning away trying to figure out how to work with security descriptors in C#. Not much luck. I get to a point that I decide I will need to use the system APIs that are available in C. So I take the entire day and port all the SDDL, ACE and ACL stuff over from C into C#, marshalling all required functions to P/Invoke nice and pretty like. I rip my hair out while I try to map the SECURITY_DESCRIPTOR struct correctly, and get it all working in about 8 hours. I am impressed with myself. Works great on checking DACL on a file. Then hell breaks loose. The world comes to a halt when for some reason I can't WRITE to the DACL. Ok, I spend more time googling to see if I can find the answer. So what do I find after another hour of googling? That Renaud Paquay, a Microsoft employee that is active on gotdotnet.com has already fully ported all I want in the Microsoft.Win32.Security namespace. 10 minutes after downloading the source, not only is everything working, but I have access to even more features then my own port. Arggggggggg!!! Gotta write today up as a learning experience with marshalling and P/Invoke, as it was a totally unproductive day otherwise. Then again... I do now have wicked access control in my latest app. On the fly DACL manipulation, oh ya baby. So, if you are writing code in C# and need access to the Windows security APIs, check out Renaud's port. Thanks Renaud! Posted by SilverStr at December 10, 2003 06:39 PM | TrackBack |
![]() ![]()
My 5 Favorite Books
Writing Secure Code
Secure Programming Cookbook Security Engineering Secure Coding Principles & Practice Inside the Security Mind ![]()
My 5 Favorite Papers
Smashing the Stack
Penetration Studies Covert Channel Analysis of Trusted Systems DoD Trusted Computer System Evaluation Criteria NSA Security Recommendation Guides ![]()
Archives
June 2006
May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 December 2003 November 2003 October 2003 September 2003 August 2003 July 2003 June 2003 May 2003 April 2003 March 2003 February 2003 January 2003 December 2002 November 2002 October 2002 September 2002 August 2002 July 2002 ![]() |
|