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

UMASK and UMASK_DIR are modes, not umasks

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 10.1.45, 10.2.32, 10.3.23, 10.4.13, 10.5.4
    • N/A
    • Configuration
    • None

    Description

      MariaDB reads the UMASK and UMASK_DIR environment variables to determine what permissions to use when creating new files.

      However, these environment variables are not actually used as umasks. They are just used as regular file system permission modes.

      You can see the environment variables are read here:

      https://github.com/MariaDB/server/blob/mariadb-10.5.4/mysys/my_init.c#L83

      And then they are used as the mode argument when creating new files with open() here:

      https://github.com/MariaDB/server/blob/mariadb-10.5.4/mysys/my_open.c#L55

      This is pretty confusing behavior. If the environment variables have UMASK in the name, then shouldn't they be used as umasks? And if the environment variables are used as file system permission modes, then shouldn't the names reflect that?

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.