Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-1783

alterSentryRoleGrantPrivilegeCore does more persistence work than required

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.0, 2.0.0
    • Fix Version/s: 1.8.0, 2.0.0
    • Component/s: sentrystore
    • Labels:
      None

      Description

      In the end of alterSentryRoleGrantPrivilegeCore() there is the following code:

      mPrivilege.appendRole(mRole);
      pm.makePersistent(mRole);
      pm.makePersistent(mPrivilege);
      

      I think the second makePersistent call isn't needed and can only cause troubles (extra potential for deadlock). When the role is made persistent, the associated privilege should be updated as well.

        Attachments

        1. SENTRY-1783.001.patch
          1 kB
          Alex Kolbasov

          Activity

            People

            • Assignee:
              akolb Alex Kolbasov
              Reporter:
              akolb Alex Kolbasov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: