From 36ca654ae23ee72cd8b7b26ee5bbb514b4fee4c0 Mon Sep 17 00:00:00 2001 From: wj32 Date: Sun, 6 Nov 2011 07:17:48 +0000 Subject: [PATCH] add (None) text when there are no token security attributes git-svn-id: svn://svn.code.sf.net/p/processhacker/code@4801 21ef857c-d57f-4fe0-8362-d861dc6d29cd --- 2.x/trunk/ProcessHacker/tokprp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/2.x/trunk/ProcessHacker/tokprp.c b/2.x/trunk/ProcessHacker/tokprp.c index 03aebbf12..f9f8221eb 100644 --- a/2.x/trunk/ProcessHacker/tokprp.c +++ b/2.x/trunk/ProcessHacker/tokprp.c @@ -1631,7 +1631,7 @@ BOOLEAN NTAPI PhpAttributeTreeNewCallback( PATTRIBUTE_NODE PhpAddAttributeNode( __in PATTRIBUTE_TREE_CONTEXT Context, __in_opt PATTRIBUTE_NODE Parent, - __in_opt PPH_STRING Text + __in_opt __assumeRefs(1) PPH_STRING Text ) { PATTRIBUTE_NODE node; @@ -1649,7 +1649,7 @@ PATTRIBUTE_NODE PhpAddAttributeNode( else PhAddItemList(Context->RootList, node); - PhSwapReference(&node->Text, Text); + PhSwapReference2(&node->Text, Text); return node; } @@ -2039,6 +2039,9 @@ INT_PTR CALLBACK PhpTokenAttributesPageProc( { PhpInitializeAttributeTreeContext(&tokenPageContext->AuthzTreeContext, tnHandle); PhpAddTokenAttributes(tokenPageContext, tnHandle); + + if (tokenPageContext->AuthzTreeContext.RootList->Count == 0) + PhpAddAttributeNode(&tokenPageContext->AuthzTreeContext, NULL, PhCreateString(L"(None)")); } break; case WM_DESTROY: