@@ -806,9 +806,32 @@ or Label.NTAuthStore
806806 IsPermissionForOwnerRightsSid = isPermissionForOwnerRightsSid ,
807807 IsInheritedPermissionForOwnerRightsSid = isInheritedPermissionForOwnerRightsSid ,
808808 } ;
809- else if ( objectType is Label . CertTemplate ) {
810- if ( aceType == ACEGuids . PKIEnrollmentFlag )
809+ else if ( objectType is Label . User or Label . Computer && aceType == ACEGuids . WriteAltSecurityIdentities )
811810 yield return new ACE {
811+ PrincipalType = resolvedPrincipal . ObjectType ,
812+ PrincipalSID = resolvedPrincipal . ObjectIdentifier ,
813+ IsInherited = inherited ,
814+ RightName = EdgeNames . WriteAltSecurityIdentities ,
815+ InheritanceHash = aceInheritanceHash ,
816+ IsPermissionForOwnerRightsSid = isPermissionForOwnerRightsSid ,
817+ IsInheritedPermissionForOwnerRightsSid = isInheritedPermissionForOwnerRightsSid ,
818+ } ;
819+ else if ( objectType is Label . User or Label . Computer && aceType == ACEGuids . WritePublicInformation )
820+ yield return new ACE
821+ {
822+ PrincipalType = resolvedPrincipal . ObjectType ,
823+ PrincipalSID = resolvedPrincipal . ObjectIdentifier ,
824+ IsInherited = inherited ,
825+ RightName = EdgeNames . WritePublicInformation ,
826+ InheritanceHash = aceInheritanceHash ,
827+ IsPermissionForOwnerRightsSid = isPermissionForOwnerRightsSid ,
828+ IsInheritedPermissionForOwnerRightsSid = isInheritedPermissionForOwnerRightsSid ,
829+ } ;
830+ else if ( objectType is Label . CertTemplate )
831+ {
832+ if ( aceType == ACEGuids . PKIEnrollmentFlag )
833+ yield return new ACE
834+ {
812835 PrincipalType = resolvedPrincipal . ObjectType ,
813836 PrincipalSID = resolvedPrincipal . ObjectIdentifier ,
814837 IsInherited = inherited ,
@@ -818,7 +841,8 @@ or Label.NTAuthStore
818841 IsInheritedPermissionForOwnerRightsSid = isInheritedPermissionForOwnerRightsSid ,
819842 } ;
820843 else if ( aceType == ACEGuids . PKINameFlag )
821- yield return new ACE {
844+ yield return new ACE
845+ {
822846 PrincipalType = resolvedPrincipal . ObjectType ,
823847 PrincipalSID = resolvedPrincipal . ObjectIdentifier ,
824848 IsInherited = inherited ,
0 commit comments