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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 5.5.55
    • Fix Version/s: 5.5.56
    • Component/s: Compiling
    • Labels:
      None
    • Environment:
      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

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                alp Alexander Pyhalov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: