Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13732

User with SELECT privilege can ALTER sequence

Details

    Description

      A user with only the SELECT privilege cannot use NEXTVAL (understandably, which requires the INSERT privilege), but can ALTER the sequence.

      SHOW GRANTS FOR CURRENT_USER();
      +-----------------------------------------------------------------------------------------------------------+
      | Grants for s@localhost                                                                                    |
      +-----------------------------------------------------------------------------------------------------------+
      | GRANT SELECT ON *.* TO 's'@'localhost' IDENTIFIED BY PASSWORD '*7B9EBEED26AA52ED10C0F549FA863F13C39E0209' |
      +-----------------------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
       
      SELECT NEXTVAL(s5);
      ERROR 1142 (42000): INSERT command denied to user 's'@'localhost' for table 's5'
       
      ALTER SEQUENCE s5 RESTART 50;
      Query OK, 0 rows affected (0.000 sec)
      

      Attachments

        Issue Links

          Activity

            greenman Ian Gilfillan created issue -
            greenman Ian Gilfillan made changes -
            Field Original Value New Value
            elenst Elena Stepanova made changes -
            Component/s Authentication and Privilege System [ 13101 ]
            Fix Version/s 10.3 [ 22126 ]
            Assignee Michael Widenius [ monty ]
            monty Michael Widenius made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            monty Michael Widenius made changes -
            Fix Version/s 10.3.5 [ 22905 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            monty Michael Widenius made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 82398 ] MariaDB v4 [ 152770 ]

            People

              monty Michael Widenius
              greenman Ian Gilfillan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.