Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-758

zkpython segfaults on invalid acl with missing key

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.0, 3.4.0
    • 3.3.1, 3.4.0
    • contrib-bindings
    • None
    • ubuntu lucid (10.04)

    • Reviewed

    Description

      Currently when setting an acl, there is a minimal parse to ensure that its a list of dicts, however if one of the dicts is missing a required key, the subsequent usage doesn't check for it, and will segfault.. for example using an acl of [

      {"schema":id, "id":world, permissions:PERM_ALL}

      ] will segfault if used, because the scheme key is missing (its been purposefully typo'd to schema in example).

      I've expanded the check_acl macro to include verifying that all keys are present and added some unit tests against trunk in the attachments.

      Attachments

        1. invalid-acl-fix-and-test.diff
          2 kB
          Kapil Thangavelu
        2. ZOOKEEPER-758.patch
          2 kB
          Henry Robinson
        3. ZOOKEEPER-758.patch
          2 kB
          Henry Robinson

        Activity

          People

            kapilt Kapil Thangavelu
            kapilt Kapil Thangavelu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: