/// <summary> /// Change the password on the principal /// </summary> /// <param name="p">Principal to modify</param> /// <param name="oldPassword">Current password</param> /// <param name="newPassword">New password</param> internal override void ChangePassword(AuthenticablePrincipal p, string oldPassword, string newPassword) { Debug.Assert(p.fakePrincipal == false); // Shouldn't be being called if this is the case Debug.Assert(p.unpersisted == false); Debug.Assert(p != null); Debug.Assert(newPassword != null); // but it could be an empty string Debug.Assert(oldPassword != null); // but it could be an empty string DirectoryEntry de = (DirectoryEntry)p.UnderlyingObject; Debug.Assert(de != null); SetupPasswordModification(p); SDSUtils.ChangePassword(de, oldPassword, newPassword); }