Directory Programming .NET

Active Directory and ADAM programming support for .NET developers
Welcome to Directory Programming .NET Sign in | Join | Help
in Search

This access control list is not in canonical form and therefore cannot be modified.

Last post 02-25-2010, 11:35 AM by joe. 1 replies.
Sort Posts: Previous Next
  •  02-25-2010, 5:28 AM 7869

    This access control list is not in canonical form and therefore cannot be modified.

    Hi everyone,

    I'm attempting to assign security to a Distribution Group with the code shown below but I keep getting a "This access control list is not in canonical form and therefore cannot be modified." exception.

    This is the only Distribution Group I have trouble applying security to. I've compared the Active Directory attributes with the other Distribution Groups we have in our organisation and the only difference is hideDLMembership=TRUE. This attribute is not set to TRUE (or even evident)  in any of the other Groups. Would this make a difference or is it something totally different? Any nudges in the right direction would be greatly appreciated. Thanks.

                        DirectoryEntry myEntry = new DirectoryEntry(groupPath, sovLogin, sovPassword,      AuthenticationTypes.Secure);

                        myEntry.Options.SecurityMasks = SecurityMasks.Dacl;

                        ActiveDirectorySecurity adSecurity = myEntry.ObjectSecurity;

                        byte[] clientSID = GetGroupSID(login);//gets the sid of the user to implicitly identify the user

                        SecurityIdentifier sid = new SecurityIdentifier(clientSID, 0);

                        Guid myGuid = new Guid("bf9679c0-0de6-11d0-a285-00aa003049e2");

                        ActiveDirectoryAccessRule rule = new ActiveDirectoryAccessRule(sid, ActiveDirectoryRights.WriteProperty, AccessControlType.Allow, myGuid);
                        adSecurity.AddAccessRule(rule);



  •  02-25-2010, 11:35 AM 7872 in reply to 7869

    Re: This access control list is not in canonical form and therefore cannot be modified.

    I'm guessing that something modified the DACL previously in an unsupported way and so the existing DACL is now no longer "canonical". I would probably examine it with something like the GUI Security Descriptor editor in ldp.exe to see what's in it compared to other objects to see if you can see what might be wrong with it. I'm not really sure though.
View as RSS news feed in XML