Skip to content
Snippets Groups Projects
  1. Feb 13, 2018
  2. Jan 31, 2018
  3. Jan 25, 2018
  4. Dec 30, 2016
  5. Dec 28, 2016
  6. Dec 26, 2016
    • Lasse Collin's avatar
    • Lasse Collin's avatar
      xz: Add support for sandboxing with Capsicum (disabled by default). · ce2542d2
      Lasse Collin authored
      In the v5.2 branch this feature is considered experimental
      and thus disabled by default.
      
      The sandboxing is used conditionally as described in main.c.
      This isn't optimal but it was much easier to implement than
      a full sandboxing solution and it still covers the most common
      use cases where xz is writing to standard output. This should
      have practically no effect on performance even with small files
      as fork() isn't needed.
      
      C and locale libraries can open files as needed. This has been
      fine in the past, but it's a problem with things like Capsicum.
      io_sandbox_enter() tries to ensure that various locale-related
      files have been loaded before cap_enter() is called, but it's
      possible that there are other similar problems which haven't
      been seen yet.
      
      Currently Capsicum is available on FreeBSD 10 and later
      and there is a port to Linux too.
      
      Thanks to Loganaden Velvindron for help.
      ce2542d2
    • Lasse Collin's avatar
      Fix bugs and otherwise improve ax_check_capsicum.m4. · 3ca1d5e6
      Lasse Collin authored
      AU_ALIAS was removed because the new version is incompatible
      with the old version.
      
      It no longer checks for <sys/capability.h> separately.
      It's enough to test for it as part of AC_CHECK_DECL.
      The defines HAVE_CAPSICUM_SYS_CAPSICUM_H and
      HAVE_CAPSICUM_SYS_CAPABILITY_H were removed as unneeded.
      HAVE_SYS_CAPSICUM_H from AC_CHECK_HEADERS is enough.
      
      It no longer does a useless search for the Capsicum library
      if the header wasn't found.
      
      Fixed a bug in ACTION-IF-FOUND (the first argument). Specifying
      the argument omitted the default action but the given action
      wasn't used instead.
      
      AC_DEFINE([HAVE_CAPSICUM]) is now always called when Capsicum
      support is found. Previously it was part of the default
      ACTION-IF-FOUND which a custom action would override. Now
      the default action only prepends ${CAPSICUM_LIB} to LIBS.
      
      The documentation was updated.
      
      Since there as no serial number, "#serial 2" was added.
      3ca1d5e6
    • Lasse Collin's avatar
      Add m4/ax_check_capsicum.m4 for detecting Capsicum support. · 5f3a742b
      Lasse Collin authored
      The file was loaded from this web page:
      https://github.com/google/capsicum-test/blob/dev/autoconf/m4/ax_check_capsicum.m4
      
      Thanks to Loganaden Velvindron for pointing it out for me.
      5f3a742b
    • Lasse Collin's avatar
      liblzma: Fix a memory leak in error path of lzma_index_dup(). · d74377e6
      Lasse Collin authored
      lzma_index_dup() calls index_dup_stream() which, in case of
      an error, calls index_stream_end() to free memory allocated
      by index_stream_init(). However, it illogically didn't
      actually free the memory. To make it logical, the tree
      handling code was modified a bit in addition to changing
      index_stream_end().
      
      Thanks to Evan Nemerson for the bug report.
      d74377e6
    • Lasse Collin's avatar
      Update THANKS. · f5807322
      Lasse Collin authored
      f5807322
    • Lasse Collin's avatar
      tuklib_cpucores: Add support for sched_getaffinity(). · 88d7a7fd
      Lasse Collin authored
      It's available in glibc (GNU/Linux, GNU/kFreeBSD). It's better
      than sysconf(_SC_NPROCESSORS_ONLN) because sched_getaffinity()
      gives the number of cores available to the process instead of
      the total number of cores online.
      
      As a side effect, this commit fixes a bug on GNU/kFreeBSD where
      configure would detect the FreeBSD-specific cpuset_getaffinity()
      but it wouldn't actually work because on GNU/kFreeBSD it requires
      using -lfreebsd-glue when linking. Now the glibc-specific function
      will be used instead.
      
      Thanks to Sebastian Andrzej Siewior for the original patch
      and testing.
      88d7a7fd
  7. Jun 30, 2016
  8. Jun 28, 2016
Loading