Skip to content
Snippets Groups Projects
  1. Dec 22, 2022
    • Vladimir Davydov's avatar
      box: reset system space formats for bootstrap · 85ebbcc0
      Vladimir Davydov authored
      We disable system space triggers to generate a bootstrap snapshot,
      but this doesn't turn off space format checks. As a result, if
      a space format is updated during the upgrade sequence, it may turn
      out that data inserted earlier doesn't match the new format.
      We encountered this issue only once, when we added new fields to
      the _func system space, see commit 200a492a ("box: introduce Lua
      persistent functions"). Back then, we simply added the new fields
      to the earlier update function. However, modifying the update history
      looks ugly. We're planning to add new fields to the _user system
      space so we should find a way to avoid that.
      
      The fix is simple: we clear all system space formats before disabling
      system space triggers and reset them back after the bootstrap is done.
      To achieve that, we have to eliminate usage of any functions that access
      tuple fields by name.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/298
      Needed for https://github.com/tarantool/tarantool-ee/issues/299
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      85ebbcc0
  2. Dec 21, 2022
    • Ilya Verbin's avatar
      box: do not close xlog file descriptors in the atfork handler · ec1af129
      Ilya Verbin authored
      Use O_CLOEXEC flag instead.
      
      If Tarantool is forked before executing box.cfg{}, e.g. using io.popen(),
      the child process could start with stdin linked to /dev/urandom.
      This happens because wal_writer_singleton and vy_log_writer are not yet
      initialized, i.e. `fd' fields are 0, then atfork child handler wal_atfork()
      is called. It checks that xlog is opened (the check succeeded as 0 != -1)
      and closes its fd 0, in fact closing stdin (twice). Next, Tarantool opens
      the file /dev/urandom during initialization, and it receives the lowest
      unused file descriptor, which is 0. Then luaL_loadfile() loads stdin as a
      Lua chunk, in effect reading random numbers.
      
      This happens on glibc 2.28 and older, as newer versions do not invoke
      atfork handlers during io.popen():
      https://sourceware.org/bugzilla/show_bug.cgi?id=17490
      
      Closes #7886
      
      NO_DOC=bugfix
      NO_TEST=Tested by test/app-luatest/gh_5747_crash_multiple_args_test.lua
      ec1af129
    • Mergen Imeev's avatar
      sql: correctly calculate argument types · 1c80ce2d
      Mergen Imeev authored
      This patch fixes an issue where collation could change the computed
      type of a built-in function argument when choosing a function
      implementation.
      
      Closes #7992
      
      NO_DOC=bugfix
      1c80ce2d
    • Nick Volynkin's avatar
      ci: test stable branches with SDK · 60a2ee11
      Nick Volynkin authored
      Workflow submodule_update now brings latest commits in stable branches
      further to tarantool/sdk, where integration tests can run with other
      enterprise products and modules.
      
      In tarantool/tarantool-ee a pull request is still opened, so the
      maintainers can merge it at any time.
      
      In tarantool/sdk the test branches are named in the following pattern:
      `TarantoolBot/test-ce-master`
      `TarantoolBot/test-ce-2.10`
      and so on. This pattern can be easily distinguished by workflows,
      which run integration tests and alert developers on failures.
      It is also consistent with branches with the same purpose of integration
      testing, that are created by the sdk_test workflow:
      `TarantoolBot/test-ce-{feature_branch_name}`
      
      NO_DOC=CI
      NO_TEST=CI
      NO_CHANGELOG=CI
      
      Resolves tarantool/sdk#355
      60a2ee11
    • Nick Volynkin's avatar
      ci: run submodule_update on lightweight runners · e4b79ca5
      Nick Volynkin authored
      The submodule_update workflow only works with git repositories and
      doesn't require computational power. It's mostly limited by the network
      throughput. So it makes sense to run this workflow on lightweight
      runners, labeled with `flavor-1-2` (that is, 1 CPU and 2Gb RAM).
      
      New runners have granular labels: `self-hosted`, OS, arch and flavor.
      
      NO_DOC=CI
      NO_TEST=CI
      NO_CHANGELOG=CI
      e4b79ca5
  3. Dec 20, 2022
    • Vladislav Shpilevoy's avatar
      test: fix flaky 'sigterm during box.cfg' test · fb69a2d7
      Vladislav Shpilevoy authored
      The test sends SIGTERM to the process while it is writing a
      snapshot. Using `g.server.process:kill('TERM')`.
      
      On a next line the test was doing `g.server:stop()` which also
      sends SIGTERM. Apparently, the second SIGTERM sometimes killed the
      server immediately.
      
      It usually happened inside fiber_free(). Sometimes right after the
      file tt_exit_file.txt.inprogress was created but before it was
      renamed to tt_exit_file.txt.
      
      The reason is in signal_free() being called quite early. After
      that any signal becomes fatal and is not caught by the handlers.
      
      The patch also increases on-shutdown timeout not to depend on it
      for certain. Although it shouldn't be a problem right now.
      
      Follow-up #7743
      
      NO_DOC=test
      NO_CHANGELOG=test
      fb69a2d7
    • Mergen Imeev's avatar
      sql: refactor memory allocation system · 91fd360c
      Mergen Imeev authored
      This patch refactors the SQL memory allocation system. There are three
      main changes:
      1) now, when allocating memory, no additional 8 bytes are allocated to
      remember the size of the allocated memory, so instead of
      sql_malloc()/sqlRealloc()/sql_free(), the malloc()/realloc()/free()
      functions are used;
      2) the malloc()/realloc() functions were used through the
      xmalloc()/xrealloc() macros, so checks for memory allocation errors were
      removed;
      3) there is no need for an explicit "sql *db" argument for most of the
      functions, so it has been omitted.
      
      Part of #1544
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      91fd360c
    • Vladimir Davydov's avatar
      box: add password strength check stubs · 396e6879
      Vladimir Davydov authored
      This commit adds:
       - Call to box.internal.check_password in box.schema.user.passwd and
         box.schema.user.create to check the provided password. The function
         will be implemented in EE.
       - A set of new box configuration options that specify how a password is
         checked. They are available only if box.internal.check_password is
         defined, i.e. in EE.
       - A new error code that will be raised if the password is weak.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/297
      
      NO_DOC=ee
      NO_TEST=ee
      NO_CHANGELOG=ee
      396e6879
    • Vladimir Davydov's avatar
      box: hide EE configuration options · ccf6da41
      Vladimir Davydov authored
      Currently, all the EE configuration options are visible in CE, but an
      attempt to set them either fails or ignored. Let's be consistent and
      simply hide those options from CE, like we do with the feedback daemon.
      The only problem here is that some tests print the whole config to the
      result file: box/cfg, box/admin, app-tap/init_script. We fixed box/cfg
      and box/admin tests by adding EE keys to the cfg_filter if tests are
      run by a EE binary. This should make the output the same between CE and
      EE. As for app-tap/init_script, since it doesn't use cfg_filter, we
      removed printing of the whole config to the result file and instead
      print just box.cfg.memtx_memory - it should be enough to check that
      box.cfg is accessible from an init script.
      
      Note, we use explicit 'if' statement in ifdef_XXX functions rather than
      'a and b or c', because the latter doesn't work as expected if 'b' is
      boolean false.
      
      While we are at it, make cfg_getb helper return a boolean value instead
      of integer, and false instead of -1 in case of nil. (I've no idea why
      it was made to return -1 in case of nil in the first place.)
      
      NO_DOC=undocumented
      NO_CHANGELOG=undocumented
      ccf6da41
    • Ilya Verbin's avatar
      test: do jit.flush() after jit.off() on arm64 · 2695f66a
      Ilya Verbin authored
      JIT has been disabled for these 3 tests on arm64 to avoid weird fails, but
      they are still flaky in CI. Perhaps the JIT traces from other tests affect
      them. Let's try to do jit.flush() together with jit.off().
      
      Also disable JIT for pagination_netbox_test.lua, which suffers from the
      same problem as pagination_test.lua.
      
      Part of #6599
      Part of #7739
      Part of #8011
      
      NO_DOC=testing stuff
      NO_CHANGELOG=testing stuff
      2695f66a
    • Mergen Imeev's avatar
      sql: fix possible memleak in lemon.c · 1da1ac53
      Mergen Imeev authored
      This patch fixes possible memleak.
      
      NO_DOC=Possible bug
      NO_TEST=No proper way to test
      NO_CHANGELOG=Possible bug
      1da1ac53
  4. Dec 19, 2022
    • Vladimir Davydov's avatar
      net.box: use authentication method received in IPROTO_ID by default · 3243883b
      Vladimir Davydov authored
      If the authentication method isn't specified with the user credentials,
      the client uses the one received in reply to IPROTO_ID. If it's unknown
      to the client, it falls back on AUTH_METHOD_DEFAULT.
      
      A test and a changelog will be added to the Enterprise Edition, which
      supports more than one authentication method.
      
      Part of #7989
      
      NO_DOC=ee
      NO_TEST=ee
      NO_CHANGELOG=ee
      3243883b
    • Vladimir Davydov's avatar
      applier: use authentication method received in IPROTO_ID by default · 17b21fcb
      Vladimir Davydov authored
      If the authentication method isn't specified with the user credentials,
      the client uses the one received in reply to IPROTO_ID. If it's unknown
      to the client, it falls back on AUTH_METHOD_DEFAULT.
      
      A test and a changelog will be added to the Enterprise Edition, which
      supports more than one authentication method.
      
      Part of #7989
      
      NO_DOC=ee
      NO_TEST=ee
      NO_CHANGELOG=ee
      17b21fcb
    • Vladimir Davydov's avatar
      iproto: send default authentication method in reply to IPROTO_ID · 13b0ce9c
      Vladimir Davydov authored
      Part of #7989
      
      @TarantoolBot document
      Title: Document IPROTO_AUTH_TYPE - new key of IPROTO_ID
      
      A new key was added to the `IPROTO_ID` response:
      name `IPROTO_AUTH_TYPE`, code 0x5b, value type `MP_STR`.
      
      Its value equals the name of the authentication method that is
      currently used on the server for generating user authentication
      data from a password `box.schema.passwd()`. It's configured with
      `box.cfg.auth_type`.
      
      In Community Edition, the only authentication method currently
      available is 'chap-sha1'. Other authentication methods may be used
      in Enterprise Edition.
      
      A client can use the received value as the authentication method
      that should be used by default, in case it isn't specified explicitly
      along with the user credentials.
      13b0ce9c
    • Vladimir Davydov's avatar
      applier: send IPROTO_ID to master · e5ffaedc
      Vladimir Davydov authored
      We need it to retrieve the default authentication method that should be
      used by the applier if not set explicitly in URI. In future, we may also
      use it for other things, e.g. fetching the master's name.
      
      The IPROTO_ID request is sent only if the master's version is >= 2.10.0.
      An error received in reply to IPROTO_ID is logged, but doesn't abort
      replication, because IPROTO_ID is optional.
      
      Needed for #7989
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      e5ffaedc
  5. Dec 16, 2022
    • Yaroslav Lobankov's avatar
      test: mv interactive_tarantool.lua to ./test/ dir · 5493db7c
      Yaroslav Lobankov authored
      The ./test/luatest_helpers/interactive_tarantool.lua module is not
      a luatest helper. So moving it to the ./test/ dir and removing empty
      ./test/luatest_helpers/.
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      5493db7c
    • Yaroslav Lobankov's avatar
      test: use luatest modules instead of internal ones · 62ffc72c
      Yaroslav Lobankov authored
      Some internal modules have been recently copied to luatest repo [1] and
      now they can be safely removed, and the corresponding functionality from
      luatest can be used instead.
      
      Affected modules:
      
      - test/luatest_helpers/cluster.lua
      
      [1] tarantool/luatest#271
      
      Closes tarantool/luatest#237
      Closes tarantool/luatest#269
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      62ffc72c
    • Yaroslav Lobankov's avatar
      test: bump test-run to version w/ updated luatest · 903211df
      Yaroslav Lobankov authored
      Bump test-run to new version with the following improvements:
      
      - Bump luatest to 0.5.7-20-g48c406a [1]
      
      [1] tarantool/test-run#366
      
      Part of tarantool/luatest#237
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      903211df
    • Maxim Kokryashkin's avatar
      lua: use cur_L in cord_on_yield · dfe79b9a
      Maxim Kokryashkin authored
      Before the patch, fiber->storage.lua.stack is used for
      `panic` calls. However, some fibers don't have any Lua
      state saved in their storage (for example, space
      triggers).
      
      After the patch, the Lua state pointed by `cur_L` is
      used to make those calls, as it is always present.
      
      Closes #6647
      NO_DOC=bugfix
      dfe79b9a
  6. Dec 15, 2022
    • Vladimir Davydov's avatar
      box: let authentication method require encryption · c8ef9176
      Vladimir Davydov authored
      If an IO stream is encrypted, it should set flag IOSTREAM_IS_ENCRYPTED.
      If an authentication method requires the channel to be encrypted, it
      should set flag AUTH_METHOD_REQUIRES_ENCRYPTION. An attempt to use an
      authentication method that requires encryption over an unencrypted IO
      stream will raise an error ER_UNSUPPORTED("Authentication method '%s'
      does not support unencrypted connection"). This check is performed by
      both net.box and applier.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/322
      
      NO_DOC=ee
      NO_TEST=ee
      NO_CHANGELOG=ee
      c8ef9176
  7. Dec 14, 2022
    • Vladimir Davydov's avatar
      core: eliminate dependency of core lib headers on libunwind.h · 943f7d15
      Vladimir Davydov authored
      The only reason why libunwind.h is included into backtrace.h (and then
      transitively into fiber.h) is use of unw_word_t type. Let's replace it
      with uintptr_t and use unw_word_t only for interacting with the unwind
      library.
      
      This commit partially reverts commit 6d088b56 ("build: fix
      libunwind.h search in test files"), because we don't need to
      include libunwind.h into tests anymore.
      
      Fixes #8025
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=changelogs/unreleased/fix-libunwind-h-search.md
      943f7d15
    • Ilya Verbin's avatar
      log: call log_write_flightrec regardless of the log level · 86c0c8e3
      Ilya Verbin authored
      Before commit 24323448 ("log: add log.new() function that creates a
      new logger"), log_write_flightrec() was called from log_vsay() regardless
      of the log level. After, the log level is checked in Lua, so log_vsay()
      may not be called. This patch restores the original behaviour by moving
      log_write_flightrec() calls to say_default() and say().
      
      Part of https://github.com/tarantool/tarantool-ee/issues/320
      
      NO_DOC=bugfix
      NO_CHANGELOG=unreleased
      NO_TEST=will be enabled in EE, because there are no flightrec in CE
      86c0c8e3
    • Nikolay Shirokovskiy's avatar
      log: take into account env vars on log.cfg call · eb0a4c90
      Nikolay Shirokovskiy authored
      If env vars like TT_LOG, TT_LOG_LEVEL etc that specify log options are set
      then log.cfg() should take them into account if called before box.cfg().
      
      Closes #6011
      Closes #7461
      
      @TarantoolBot document
      Title: log: take into account env vars on log.cfg call
      Since: 2.11
      
      If env vars like TT_LOG, TT_LOG_LEVEL etc that specify log options are set
      then log.cfg() take them into account if called before box.cfg().
      eb0a4c90
    • Vladimir Davydov's avatar
      vinyl: fix potential null-ptr dereference in vy_read_view_merge · de175b97
      Vladimir Davydov authored
      The 'copy' ptr is checked for NULL after dereferencing. Found by PVS.
      
      https://jira.vk.team/browse/TNT-698
      
      It can hardly result in a null-ptr dereference, because vy_stmt_dup()
      uses malloc(), which doesn't normally fail (instead, the OOM killer just
      kills the process if there's a severe shortage of memory, see #3534).
      Still, PVS rightfully complains about it so let's fix it.
      
      Fixes commit 902d212b ("vinyl: zap vy_write_iterator->format")
      
      NO_DOC=bug fix
      NO_TEST=unreproducible
      NO_CHANGELOG=unreproducible
      de175b97
  8. Dec 13, 2022
    • Vladimir Davydov's avatar
      box: add stub functions to init extra security features · 3bca175d
      Vladimir Davydov authored
      This commit adds function stubs security_init and security_free that
      are called after auth_init and before auth_free, respectively. We'll
      define them in the EE repository along with the enabling macros:
      ENABLE_SECURITY and SECURITY_SOURCES. We'll start with adding extra
      authentication methods in security_init. Later on, we'll implement more
      security features, like password strength enforcement or authentication
      delay.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/295
      
      NO_DOC=internal
      NO_TEST=internal
      NO_CHANGELOG=internal
      3bca175d
    • Vladimir Davydov's avatar
      box: ensure requested auth method matches user's · 9dcc824b
      Vladimir Davydov authored
      After checking that the received authentication method and type are
      compatible with auth_request_check(), authenticate() tries to
      authenticate it using the user's authentication method with
      authenticate_request(). The problem is the user may use a different
      authenticate method from the one received in the request while
      authenticate_request() expects the request to be valid. As a result,
      it may crash in this case. Fix this by ensuring that the user's
      authentication method matches the one received in the request.
      
      Follow-up commit b5754d3f ("box: make auth subsystem pluggable")
      Follow-up #7986
      
      NO_DOC=bug fix
      NO_CHANGELOG=unreleased
      NO_TEST=will be added to EE, because CE supports just one auth method
      9dcc824b
    • Vladimir Davydov's avatar
      applier: allow to specify authentication method · 2574ff1a
      Vladimir Davydov authored
      The authentication method can be specified via the 'auth_type' uri
      parameter, e.g.
      
        box.cfg({replication = 'user:password@host:port?auth_type=chap-sha1'})
      
      The only authentication method supported by Community Edition (CE)
      is 'chap-sha1' so we don't document or announce this feature in CE.
      More methods and tests will be added to Enterprise Edition (EE).
      
      Part of #7988
      
      NO_DOC=ee
      NO_CHANGELOG=ee
      2574ff1a
    • Vladimir Davydov's avatar
      net.box: allow to specify authentication method · 387f7d1b
      Vladimir Davydov authored
      This commit adds a new option for net.box.connect - auth_type.
      The option takes an authentication method name (string) that will
      be used to authenticate the client on connect. Like user name and
      password, the new option may also be passed via uri parameters, e.g.
      
        net.connect('host:port', {
            user = 'user',
            password = 'password',
            auth_type = 'chap-sha1',
        })
        net.connect('user:password@host:port?auth_type=chap-sha1')
      
      The only authentication method supported by Community Edition (CE)
      is 'chap-sha1' so we don't document or announce this feature in CE.
      More methods and tests will be added to Enterprise Edition (EE).
      
      Part of #7988
      
      NO_DOC=ee
      NO_CHANGELOG=ee
      387f7d1b
    • Vladimir Davydov's avatar
      box: add box.cfg.auth_type configuration option · 17783f57
      Vladimir Davydov authored
      This commit adds a new box configuration option - box.cfg.auth_type.
      The option takes an authentication method name (string) that will be
      used by box.schema.user.passwd to generate user authentication data.
      
      The only authentication method supported by Community Edition (CE)
      is 'chap-sha1' so we don't document or announce this feature in CE.
      More methods and tests will be added to Enterprise Edition (EE).
      
      Part of #7988
      
      NO_DOC=ee
      NO_CHANGELOG=ee
      17783f57
    • Alexander Turenko's avatar
      build: drop libunwind build dependency from rpm/deb · f7c4d484
      Alexander Turenko authored
      The dependency is redundant, because the library is now bundled into
      tarantool (see PR #6877).
      
      There is a practical reason to remove it: this way we'll verify that
      presence of system libunwind headers is not necessary to build
      tarantool. In other words, we'll verify that #8025 will not appear
      again.
      
      Follows up #8025
      Follows up #6877
      Part of #6998
      
      NO_DOC=No user visible changes, just some validation for a build fix.
      NO_TEST=See NO_DOC.
      NO_CHANGELOG=See a changelog entry in the previous commit.
      f7c4d484
    • Alexander Turenko's avatar
      build: don't include fiber.h into a merger test · 763ef780
      Alexander Turenko authored
      The problem is described in a previous commit. In short: inclusion of
      `fiber.h` leads to inclusion of `libunwind.h`, but it is not necessarily
      in include paths that used for testing sources.
      
      We can add the include path or eliminate the `fiber.h` dependency. I
      have no strict preference here. However the latter allows to write
      public API and internal API calls differently in the testing code and it
      looks more clean.
      
      The implementation is based on the `tnt_internal_symbol()` function,
      which was introduced to make a dark magic of this kind. See commit
      395c30e8 ("fiber_channel: add accessor to internal functions").
      
      Fixes #8025
      
      NO_DOC=It is a fix of a build failure.
      NO_TEST=It is a fix of a build failure.
      763ef780
    • Alexander Turenko's avatar
      build: fix libunwind.h search in test files · 6d088b56
      Alexander Turenko authored
      ## The problem
      
      Case: a build host has no libunwind installed into the system. Dispite
      that tarantool has libunwind bundled as a git submodule (see PR #6877),
      the build fails in the case:
      
      NO_WRAP
      ```
      In file included from <...>/src/lib/core/fiber.h:47,
                       from <..some test/**/*.{c,cc} file..>:
      <...>/src/lib/core/backtrace.h:14:10: fatal error: libunwind.h: No such file or directory
         14 | #include "libunwind.h"
            |          ^~~~~~~~~~~~~
      ```
      NO_WRAP
      
      The problem appears when `ENABLE_BACKTRACE` and
      `ENABLE_BUNDLED_LIBUNWIND` CMake options are enabled. They're enabled by
      default for most targets.
      
      The compilation fails for testing files, which include `fiber.h`. The
      `fiber.h` header includes `backtrace.h`, which includes `libunwind.h`.
      The `libunwind.h` header couldn't be found if appropriate include
      directory is not passed to a compiler.
      
      Almost half (45/102) of unit tests includes `fiber.h` directly or
      indirectly. Swim fuzzers include it too.
      
      ## The solution
      
      Just add libunwind's include directory to compilation of those files.
      
      The include path is added as a system one to suppress warnings from the
      third party project. It follows the way the directory is included into
      tarantool's build, see PR #6877.
      
      The uri unit test includes `fiber.h`, but actually doesn't use it. The
      test has no CMake dependency on the `core` library and so the build
      system may attempt to build it before `libunwind.h` is installed into
      `LIBUNWIND_INCLUDE_DIR`. Eliminated redundant includes from the test.
      
      Note: this commit solves only a part of the problem: it fixes
      compilation of unit tests and fuzzers. There are other test files that
      include `fiber.h` and it'll be fixed in the next commit.
      
      Part of #8025
      
      NO_DOC=It is a fix of a build failure.
      NO_TEST=It is a fix of a build failure.
      NO_CHANGELOG=Only part of the problem is solved here. A following commit
                   will add a changelog entry.
      6d088b56
    • Nick Volynkin's avatar
      ci: use actions/checkout@v3.1.0 with FreeBSD · a79d32b1
      Nick Volynkin authored
      ChristopherHX/github-act-runner@0.4.1, which we use on FreeBSD,
      is incompatible with newest actions/checkout@v3.2.0, aliased to @v3.
      Until this is resolved, FreeBSD workflows will use fixed version
      actions/checkout@v3.1.0.
      
      actions/checkout@v3.2.0 fails with an unclear error:
      
      > :star:  Run actions/checkout@v3
      >   :cloud:  git clone 'https://github.com/actions/checkout' # ref=v3
      > Error: Unable to resolve v3: unsupported object type
      > Error: Unable to resolve v3: unsupported object type
      > Error:   :x:  Failure - actions/checkout@v3
      > Error: unsupported object type
      
      NO_DOC=CI
      NO_TEST=CI
      NO_CHANGELOG=CI
      a79d32b1
  9. Dec 12, 2022
    • Alexander Turenko's avatar
      lua: load scripts or modules pointed by env var · 435e5efe
      Alexander Turenko authored
      Fixes #7714
      
      @TarantoolBot document
      Title: TT_PRELOAD
      
      A script file or a module may be specified in the `TT_PRELOAD`
      environment variable to load before the main script. For example:
      
      ```shell
      $ TT_PRELOAD=/path/to/foo.lua tarantool main.lua
      ```
      
      The `foo.lua` script will be executed before `main.lua`.
      
      ```shell
      $ TT_PRELOAD=foo.bar.baz tarantool main.lua
      ```
      
      The `foo.bar.baz` module will be loaded before executing `main.lua`.
      
      A value that ends with `.lua` is considered as a script file, otherwise
      it is considered as a module name.
      
      Several files or modules may be passed as a semicolon separated list:
      
      ```shell
      $ TT_PRELOAD="/path/to/foo.lua;foo.bar.baz" tarantool main.lua
      ```
      
      Don't forget quotes, a shell interprets a semicolon on its own.
      
      Redundant (duplicated, leading, trailing) semicolons are ignored.
      
      If something goes wrong at script/module execution, tarantool reports
      the problem and exits.
      
      A script receives a path to the file in `...`, a module gets the module
      name. `arg` is the same as for the main script.
      435e5efe
    • Yaroslav Lobankov's avatar
      cd: eliminate OpenSUSE related code from RPM spec · e5704327
      Yaroslav Lobankov authored
      Support for OpenSUSE 15.1/15.2 has been recently dropped.
      There is no sense to keep the dead code. So removing it.
      
      Follows up #8021
      
      NO_DOC=cd
      NO_TEST=cd
      NO_CHANGELOG=cd
      e5704327
    • Vladimir Davydov's avatar
      Drop internal SHA1 implementation · 3aafa0ed
      Vladimir Davydov authored
      Not used anywhere anymore. No need in it, because SHA1 is provided by
      the OpenSSL library.
      
      Closes #7987
      
      NO_DOC=code cleanup
      NO_TEST=code cleanup
      NO_CHANGELOG=code cleanup
      3aafa0ed
    • Vladimir Davydov's avatar
      lua/digest: use OpenSSL version of SHA1 · c029e63f
      Vladimir Davydov authored
      Since commit f6ea7180 ("Try to load several variants of libssl.")
      the digest module uses an internal version of SHA1. Back then, we didn't
      link the OpenSSL library. Instead, we tried to load it dynamically.
      Since on some distributions the library could be missing, it was decided
      to implement an internal version of SHA1, see #405.
      
      However, since commit 59a55740 ("Link against libssl and libcrypto.
      Issue #1382") we link the OpenSSL library unconditionally so there's no
      need in having an internal implementation of SHA1. Let's drop it and
      switch the digest module to the version of SHA1 implemented by the
      crypto module using OpenSSL.
      
      Part of #7987
      
      NO_DOC=code cleanup
      NO_TEST=code cleanup
      NO_CHANGELOG=code cleanup
      c029e63f
    • Vladimir Davydov's avatar
      box: use OpenSSL version of SHA1 in chap-sha1 implementation · 2479ce76
      Vladimir Davydov authored
      We added an internal version of SHA1, because initially we didn't link
      the OpenSSL library. However, since commit 59a55740 ("Link against
      libssl and libcrypto. Issue #1382") we do so there's no need in it.
      
      Part of #7987
      
      NO_DOC=code cleanup
      NO_TEST=code cleanup
      NO_CHANGELOG=code cleanup
      2479ce76
    • Vladimir Davydov's avatar
      box: merge scramble into chap-sha1 implementation · fbf4fdc8
      Vladimir Davydov authored
      Scramble is used only by the chap-sha1 authentication mechanism,
      which has a proper API. There's no need in a standalone scramble lib.
      
      Part of #7987
      
      NO_DOC=code cleanup
      NO_TEST=code cleanup
      NO_CHANGELOG=code cleanup
      fbf4fdc8
    • Vladimir Davydov's avatar
      box: assert that auth salt size is correct · 574ca42d
      Vladimir Davydov authored
      Authentication salt is expected to be 20 byte long (SCRAMBLE_SIZE).
      However, IPROTO sends 36 bytes (IPROTO_SALT_SIZE). Let's add a few
      assertions ensuring that we never pass less than 20 bytes to
      authentication methods.
      
      Part of #7987
      
      NO_DOC=code cleanup
      NO_TEST=code cleanup
      NO_CHANGELOG=code cleanup
      574ca42d
Loading