Skip to content
Snippets Groups Projects
  1. Sep 24, 2019
  2. Sep 20, 2019
    • Simon McVittie's avatar
      Assert we are not setuid before looking at the environment · f32aa5c5
      Simon McVittie authored
      
      While reviewing !56, Emil pointed out that real
      ICD loaders normally use secure_getenv(), which ignores environment
      variables if it detects that the process is running with elevated
      privileges, whereas we are using the GLib equivalent of plain getenv().
      
      This library is not designed to be used in a privileged process, never
      mind a setuid one: it trusts various aspects of its execution environment,
      and it executes subprocesses that will have similar behaviour. As such,
      I'm treating "we are not setuid" as a precondition check rather than as
      a normal situation, and considering execution of this library in a setuid
      context to be a programming error.
      
      setuid/setgid/setcap executables inherit their execution environment
      (environment variables, current working directory, file descriptors,
      controlling terminal, process group and other inheritable state) from a
      less-privileged and potentially hostile caller, so they are a privilege
      boundary, and can only safely use libraries if those libraries are also
      specifically designed to distrust their caller.
      
      The name of the function only contains "setuid" for brevity, but in fact
      it checks for all aspects of elevated privileges, including setgid and
      setcap: the AT_SECURE auxiliary value is the same one used by
      secure_getenv(). The fallback implementation used if getauxval() fails
      only checks for setuid and setgid.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      f32aa5c5
    • Simon McVittie's avatar
    • Simon McVittie's avatar
      Add some missing precondition checks · 74927afe
      Simon McVittie authored
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      74927afe
  3. Sep 19, 2019
  4. Sep 17, 2019
  5. Sep 16, 2019
  6. Sep 12, 2019
  7. Sep 11, 2019
  8. Sep 10, 2019
  9. Sep 09, 2019
  10. Sep 06, 2019
  11. Sep 05, 2019
  12. Aug 28, 2019
  13. Aug 27, 2019
    • Simon McVittie's avatar
      Add checks for locales and locale-related issues · 10c2771b
      Simon McVittie authored
      
      Some Steam games assume that the en_US.UTF-8 locale is available, and
      it's reasonably likely that others assume that the C.UTF-8 locale is
      available, or that the locale environment variables are set to usable
      values.
      
      Having checks for locale properties will also help us when experimenting
      with containers: we can check whether the locale that was set outside
      the container is available inside the container.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      10c2771b
  14. Aug 22, 2019
Loading