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

mysys/mysys_priv.h shouldn't use O_EXEC as O_PATH on illumos

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 5.5.55
    • 5.5.56
    • Compiling
    • None
    • OpenIndiana Hipster

    Description

      In mysys_priv.h MariaDB defines:

      #if !defined(O_PATH) && defined(O_EXEC) /* FreeBSD */
      #define O_PATH O_EXEC
      #endif
      

      This makes mariadb server trying to do:

      	openat64(-1, "/var", O_EXEC|O_NOFOLLOW)		Err#8 ENOEXEC
      

      which errors out.
      Solaris uses POSIX O_SEARCH for this. The following would work:

      #if !defined(O_PATH)
      #if defined(O_SEARCH)  /* illumos */
      #define O_PATH O_SEARCH
      #elif defined(O_EXEC) /* FreeBSD */
      #define O_PATH O_EXEC
      #endif
      #endif
      

      Or better switch to using O_SEARCH (as it's posix-compliant ) and defining it on systems which don't have it.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              alp Alexander Pyhalov
              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.